/* ============================================
   Kalkulačka složeného úročení — Leadcore
   Krémová paleta, oblé tvary, magazínový styl
   ============================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    --bg: #faf7f0;
    --bg-card: #ffffff;
    --bg-soft: #f3eee2;
    --ink: #2a1f3d;
    --ink-soft: #5b4d77;
    --ink-mute: #8a7ea3;
    --line: #e8e0cf;
    --line-soft: #f0e9d8;
    --primary: #4a2d8a;
    --primary-soft: #6b4caf;
    --gold: #c9952f;
    --gold-soft: #e8b85a;
    --green: #5a8c6f;

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ur-app {
    padding: 28px 16px 56px;
    position: relative;
    overflow-x: hidden;
}

.ur-app::before {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 149, 47, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ur-app::after {
    content: '';
    position: fixed;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(74, 45, 138, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.ur-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* === Header === */
.ur-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 12px;
}

.ur-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ur-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 22px;
    flex-shrink: 0;
}

.ur-brand-text {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.ur-brand-text span {
    color: var(--ink-mute);
    font-weight: 400;
}

.ur-meta {
    font-size: 12px;
    color: var(--ink-mute);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* === Hero === */
.ur-hero {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 8px;
}

.ur-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-soft);
    color: var(--ink-soft);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.ur-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(28px, 5.5vw, 56px);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin-bottom: 18px;
    color: var(--ink);
}

.ur-title em {
    font-style: italic;
    color: var(--primary);
    font-weight: 300;
}

.ur-title-amount {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--gold);
    font-weight: 500;
    font-style: italic;
}

.ur-subtitle {
    font-size: 16px;
    color: var(--ink-soft);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.55;
}

/* === Card === */
.ur-card {
    background: var(--bg-card);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 4px 32px rgba(74, 45, 138, 0.06);
    border: 1px solid var(--line-soft);
    margin-bottom: 24px;
}

@media (max-width: 720px) {
    .ur-card { padding: 20px; border-radius: 20px; }
}

@media (max-width: 480px) {
    .ur-app { padding: 20px 12px 40px; }
    .ur-card { padding: 16px; border-radius: 16px; }
}

.ur-card-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
    align-items: start;
}

@media (max-width: 880px) {
    .ur-card-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* === Section title === */
.ur-section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 24px;
}

/* === Field === */
.ur-field { margin-bottom: 24px; }

.ur-field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    gap: 12px;
}

.ur-field-label {
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 500;
}

.ur-field-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
    text-align: right;
    white-space: nowrap;
}

.ur-field-value-unit {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--ink-mute);
    margin-left: 6px;
    font-weight: 500;
}

/* === Slider === */
.ur-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--line);
    outline: none;
    cursor: pointer;
    border-radius: 100px;
    margin-top: 8px;
    touch-action: pan-y;
}

.ur-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--bg-card);
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 45, 138, 0.25);
    transition: transform 0.15s;
}

.ur-slider::-webkit-slider-thumb:hover,
.ur-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

.ur-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--bg-card);
    border: 3px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(74, 45, 138, 0.25);
}

.ur-slider:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

@media (pointer: coarse) {
    .ur-slider { height: 8px; }
    .ur-slider::-webkit-slider-thumb { width: 28px; height: 28px; }
    .ur-slider::-moz-range-thumb { width: 28px; height: 28px; }
}

.ur-slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ink-mute);
    margin-top: 8px;
    font-weight: 500;
}

/* === Result hero === */
.ur-result-hero {
    text-align: center;
    padding: 28px 16px;
    background: linear-gradient(135deg, var(--bg-soft) 0%, #f7f0e0 100%);
    border-radius: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.ur-result-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201, 149, 47, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.ur-result-label {
    font-size: 12px;
    color: var(--ink-soft);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.ur-result-big {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(34px, 7vw, 64px);
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--primary);
    line-height: 1;
    font-style: italic;
    position: relative;
    z-index: 1;
    word-break: break-word;
}

.ur-result-big-unit {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--ink-soft);
    font-weight: 500;
    font-style: normal;
    margin-left: 8px;
    letter-spacing: 0.02em;
}

.ur-result-multiplier {
    margin-top: 12px;
    font-size: 14px;
    color: var(--ink-soft);
    position: relative;
    z-index: 1;
}

.ur-result-multiplier strong {
    color: var(--gold);
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: 17px;
}

/* === Graph === */
.ur-graph-wrap {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 8px;
    border: 1px solid var(--line-soft);
}

.ur-graph {
    width: 100%;
    height: auto;
    display: block;
}

.ur-legend {
    display: flex;
    gap: 20px;
    padding: 12px 8px 4px;
    font-size: 12px;
    color: var(--ink-soft);
    flex-wrap: wrap;
}

.ur-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

/* === Stats === */
.ur-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .ur-stats { grid-template-columns: 1fr; }
}

.ur-stat {
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--line-soft);
}

.ur-stat-label {
    font-size: 11px;
    color: var(--ink-mute);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ur-stat-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(16px, 2.2vw, 20px);
    font-weight: 500;
    color: var(--ink);
    word-break: break-word;
}

.ur-stat-value.gold { color: var(--gold); }
.ur-stat-value.primary { color: var(--primary); }

.ur-stat-sub {
    font-size: 12px;
    color: var(--ink-mute);
    margin-top: 4px;
}

/* === Locked === */
.ur-locked {
    margin-top: 8px;
    padding: 36px 28px;
    text-align: center;
    background: linear-gradient(135deg, #fefcf4 0%, #faf3df 100%);
    border-radius: 24px;
    border: 1px dashed var(--gold);
}

@media (max-width: 480px) {
    .ur-locked { padding: 28px 20px; border-radius: 18px; }
}

.ur-locked-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--gold);
    color: white;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.ur-locked-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.ur-locked-desc {
    color: var(--ink-soft);
    font-size: 14px;
    max-width: 460px;
    margin: 0 auto 22px;
    line-height: 1.55;
}

/* === Buttons === */
.ur-btn {
    font-family: 'Inter', sans-serif;
    background: var(--primary);
    color: white;
    border: 0;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(74, 45, 138, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.ur-btn:hover {
    background: var(--primary-soft);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 45, 138, 0.35);
}

.ur-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.ur-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ur-btn-block { width: 100%; }

/* === Unlock banner === */
.ur-unlock-banner {
    padding: 12px 16px;
    background: #ecf5ee;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--green);
    font-weight: 500;
}

/* === Compare cards === */
.ur-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 12px;
}

@media (max-width: 600px) {
    .ur-compare { grid-template-columns: 1fr; }
}

.ur-compare-card {
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
}

.ur-compare-card.dim {
    background: var(--bg-soft);
}

.ur-compare-card.bright {
    background: linear-gradient(135deg, #f5edff 0%, #faf3df 100%);
    border-color: rgba(74, 45, 138, 0.15);
}

.ur-compare-label {
    font-size: 11px;
    color: var(--ink-mute);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ur-compare-value {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 500;
    color: var(--ink);
    word-break: break-word;
}

.ur-compare-value.primary { color: var(--primary); }

.ur-compare-sub {
    font-size: 12px;
    color: var(--ink-soft);
    margin-top: 4px;
}

/* === Breakdown === */
.ur-breakdown {
    margin-top: 20px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--line-soft);
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .ur-breakdown { padding: 18px; border-radius: 16px; }
}

.ur-breakdown-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.ur-breakdown-sub {
    font-size: 13px;
    color: var(--ink-mute);
    margin-bottom: 18px;
}

.ur-table-scroll {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ur-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 460px;
}

.ur-table th {
    text-align: right;
    padding: 10px 12px;
    color: var(--ink-mute);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--bg-card);
}

.ur-table th:first-child { text-align: left; }

.ur-table td {
    text-align: right;
    padding: 10px 12px;
    color: var(--ink);
    border-bottom: 1px solid var(--line-soft);
}

.ur-table td:first-child {
    text-align: left;
    color: var(--ink-soft);
    font-weight: 500;
}

.ur-table tr:last-child td { border-bottom: 0; }
.ur-table tr:hover td { background: var(--bg-soft); }

.ur-table .num {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
}

.ur-table .num.gold { color: var(--gold); }

/* === Footer === */
.ur-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ink-mute);
    flex-wrap: wrap;
    gap: 12px;
}

.ur-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.ur-footer a:hover { text-decoration: underline; }

/* === Modal === */
.ur-modal {
    position: fixed;
    inset: 0;
    background: rgba(42, 31, 61, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

.ur-modal[hidden] { display: none; }

.ur-modal-content {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 36px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 64px rgba(42, 31, 61, 0.18);
    margin: auto;
}

@media (max-width: 520px) {
    .ur-modal { padding: 0; align-items: flex-start; }
    .ur-modal-content {
        padding: 28px 20px;
        min-height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }
}

.ur-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--bg-soft);
    border: 0;
    color: var(--ink-soft);
    font-size: 22px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
}

.ur-modal-close:hover {
    background: var(--line);
    color: var(--ink);
}

.ur-modal-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.ur-modal-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}

.ur-modal-desc {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 24px;
    line-height: 1.55;
}

/* === Form === */
.ur-form-group { margin-bottom: 14px; }

.ur-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 380px) {
    .ur-form-row { grid-template-columns: 1fr; gap: 0; }
}

.ur-form-label {
    font-size: 12px;
    color: var(--ink-soft);
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

.ur-form-input {
    width: 100%;
    background: var(--bg-soft);
    border: 1px solid transparent;
    color: var(--ink);
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    outline: none;
    border-radius: 12px;
    transition: all 0.15s;
}

.ur-form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 45, 138, 0.08);
}

.ur-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.ur-form-error {
    background: #fef3e7;
    border-left: 3px solid var(--gold);
    padding: 12px 14px;
    font-size: 13px;
    color: #8a5a0d;
    margin-bottom: 14px;
    border-radius: 0 8px 8px 0;
    line-height: 1.5;
}

.ur-form-disclaimer {
    font-size: 11px;
    color: var(--ink-mute);
    margin-top: 16px;
    line-height: 1.5;
    text-align: center;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
