:root {
    --bg-ink: #0B0B0C;
    --bg-surface: #111113;
    --bg-surface-elevated: #17171A;
    --bg-surface-recessed: #08080A;
    --bg-gold: #C9A24A;
    --bg-gold-light: #E7CE8E;
    --bg-hairline: rgba(201, 162, 74, 0.24);
    --bg-hairline-neutral: rgba(255, 255, 255, 0.06);
    --bg-text: #E6DFD2;
    --bg-text-secondary: #8A8375;
    --bg-thinking: #C4BCA8;
    --bg-error: #D98B6A;
    --bg-champagne: #F0E3BC;
    --bg-xxs: 2px;
    --bg-xs: 4px;
    --bg-sm: 8px;
    --bg-md: 12px;
    --bg-lg: 16px;
    --bg-xl: 20px;
    --bg-xxl: 24px;
    --bg-xxxl: 32px;
    --bg-huge: 48px;
    --bg-side: 26px;
    --bg-tap: 44px;
    --bg-radius-sharp: 0px;
    --bg-radius-content: 2px;
    --bg-radius-sheet: 38px;
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-ui: "Jost", system-ui, sans-serif;
    --tab-h: 68px;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-ink);
    color: var(--bg-text);
    font-family: var(--font-ui);
    font-size: 17px;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
a { color: var(--bg-gold-light); text-decoration: none; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }

.screen {
    min-height: 100dvh;
    padding: 74px var(--bg-side) 32px;
    max-width: 480px;
    margin: 0 auto;
    /* Her ekranin gold dikdortgen cercevesi (ANALYSIS.md --bg-gold). */
    border: 1px solid var(--bg-gold);
}
.screen-tab {
    min-height: calc(100dvh - var(--tab-h) - env(safe-area-inset-bottom));
    padding-bottom: 32px;
    margin-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

.display {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 34px;
    line-height: 1.15;
    margin: 0 0 var(--bg-md);
}
.display-title { font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.15; margin: 0; }
.display-compact { font-family: var(--font-display); font-weight: 500; font-size: 28px; margin: 0; }
.display-section { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0; }
.eyebrow {
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(230, 223, 210, 0.55);
    margin: 0 0 var(--bg-sm);
}
.muted { color: var(--bg-text-secondary); }
.micro { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bg-text-secondary); }

.btn {
    min-height: var(--bg-tap);
    width: 100%;
    border: 0;
    border-radius: var(--bg-radius-content);
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.btn:disabled { opacity: 0.4; }
.btn-primary { background: transparent; color: var(--bg-gold-light); border: 1px solid var(--bg-hairline); }
.btn-prominent { background: var(--bg-gold); color: var(--bg-ink); }
.btn-quiet { background: transparent; color: var(--bg-text-secondary); }
.btn-row { margin-top: var(--bg-lg); }

.field {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--bg-hairline-neutral);
    color: var(--bg-text);
    border-radius: var(--bg-radius-content);
    padding: 14px 16px;
    font-size: 17px;
    min-height: var(--bg-tap);
}
.field:focus { outline: 1px solid var(--bg-gold); }
textarea.field { min-height: 140px; resize: vertical; }

.err { color: var(--bg-error); font-size: 14px; margin: var(--bg-sm) 0; }
.hairline { height: 1px; background: var(--bg-hairline); border: 0; }
.hairline-n { height: 1px; background: var(--bg-hairline-neutral); border: 0; }

.app-shell { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.app-body { min-height: 100dvh; }

.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(480px, 100%);
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 11, 12, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--bg-hairline-neutral);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 20;
}
.tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--bg-text-secondary);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    min-height: var(--bg-tap);
}
.tabbar a.active { color: var(--bg-gold); }
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.3; }

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bg-hairline);
    color: inherit;
    background: none;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    width: 100%;
    text-align: left;
}
.list-row.neutral { border-bottom-color: var(--bg-hairline-neutral); }
.chevron { color: var(--bg-gold); font-size: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; -webkit-overflow-scrolling: touch; }
.chip {
    flex: 0 0 auto;
    border: 1px solid var(--bg-hairline-neutral);
    background: transparent;
    color: var(--bg-text-secondary);
    padding: 8px 12px;
    font-size: 12px;
    letter-spacing: 0.12em;
    min-height: 36px;
}
.chip.on { border-color: var(--bg-hairline); color: var(--bg-gold-light); }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--bg-hairline);
    padding: var(--bg-lg);
    margin-bottom: var(--bg-md);
}
.card-button {
    display: block;
    width: 100%;
    text-align: left;
    color: inherit;
    cursor: pointer;
}
.card-button.hero { padding: 22px var(--bg-lg); }
.card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin: 8px 0 4px; }
.badge { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bg-gold); border: 1px solid var(--bg-hairline); padding: 4px 8px; display: inline-block; }

.bubble-user { background: var(--bg-surface-elevated); padding: 12px 14px; margin: 12px 0 12px 24px; }
.bubble-ai { padding: 8px 0 16px; white-space: pre-wrap; }
.referral {
    border: 1px solid var(--bg-hairline);
    padding: 16px;
    margin-top: 12px;
}
.composer {
    position: sticky;
    bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
    background: var(--bg-ink);
    padding: 8px 0 12px;
    display: flex;
    gap: 8px;
}
.composer input { flex: 1; }
.composer button { width: auto; min-width: 72px; }

.option {
    display: block;
    width: 100%;
    text-align: left;
    background: var(--bg-surface);
    border: 1px solid var(--bg-hairline-neutral);
    color: var(--bg-text);
    padding: 14px 16px;
    margin-bottom: 8px;
    min-height: var(--bg-tap);
}
.option.on { border-color: var(--bg-gold); color: var(--bg-gold-light); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--bg-gold);
    opacity: 0.24;
}
.svc { padding: 20px 0; border-bottom: 1px solid var(--bg-hairline-neutral); }
.svc .num { color: var(--bg-gold); font-size: 11px; letter-spacing: 0.2em; }
.svc h2 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 6px 0 8px; }

.empty, .error-box { text-align: center; padding: 48px 12px; color: var(--bg-text-secondary); }
.check { color: var(--bg-gold); }
.sheet-legal { white-space: pre-wrap; font-size: 14px; color: var(--bg-text-secondary); }
.draft-band { border: 1px solid var(--bg-hairline); color: var(--bg-gold); font-size: 11px; letter-spacing: 0.16em; padding: 8px; margin-bottom: 16px; text-transform: uppercase; }
.back {
    display: inline-flex;
    align-items: center;
    min-height: var(--bg-tap);
    color: var(--bg-gold-light);
    background: none;
    border: 0;
    padding: 0;
    font-size: 14px;
}
.wheat { width: 48px; height: 80px; margin: 0 auto 16px; display: block; }
.splash-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80dvh; text-align: center; }

#blazor-error-ui {
    background: var(--bg-surface);
    color: var(--bg-error);
    bottom: 0; left: 0; width: 100%;
    padding: 12px 20px;
    position: fixed;
    z-index: 1000;
    display: none;
}
.validation-message { color: var(--bg-error); font-size: 13px; }
