:root {
    color-scheme: light;
    --ink: #17211b;
    --muted: #5f6b63;
    --paper: #f7f4ec;
    --surface: #fffdf8;
    --forest: #214f3c;
    --forest-dark: #15392a;
    --gold: #c9973f;
    --line: #dcd7ca;
    --success: #dff1e7;
    --pending: #f6ead0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}

.site-header,
main,
footer {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.08rem;
    font-weight: 750;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--forest);
    border-radius: 50%;
    font-family: Georgia, serif;
}

button { font: inherit; }

.language-button {
    min-height: 44px;
    padding: 8px 16px;
    color: var(--forest-dark);
    background: transparent;
    border: 1px solid var(--forest);
    border-radius: 999px;
    cursor: pointer;
}

.text-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions form { margin: 0; }

.hero {
    padding: clamp(72px, 12vw, 144px) 0 clamp(56px, 8vw, 96px);
    max-width: 820px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--forest);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1,
h2,
p { margin-top: 0; }

h1 {
    margin-bottom: 24px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 8vw, 5.8rem);
    font-weight: 500;
    letter-spacing: -.045em;
    line-height: .98;
}

.intro {
    max-width: 680px;
    color: var(--muted);
    font-size: clamp(1.06rem, 2vw, 1.3rem);
}

.actions { margin-top: 32px; }

.primary-button,
.primary-link {
    min-height: 52px;
    padding: 12px 22px;
    color: white;
    background: var(--forest);
    border: 0;
    border-radius: 8px;
    font-weight: 750;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.primary-button:disabled { opacity: .72; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.feature-grid article {
    padding: 36px 28px 32px 0;
}

.feature-grid article + article {
    padding-left: 28px;
    border-left: 1px solid var(--line);
}

.feature-number {
    color: var(--gold);
    font-size: .78rem;
    font-weight: 800;
}

.feature-grid h2,
.setup-status h2 {
    margin: 12px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
}

.feature-grid p,
.setup-status p { color: var(--muted); }

.setup-status {
    margin: 72px 0;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.setup-status p:last-child { margin-bottom: 0; }

.status {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 750;
}

.status-ready { background: var(--success); }
.status-pending { background: var(--pending); }

footer {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: .9rem;
}

.auth-page { min-height: 100vh; }

.auth-shell {
    width: min(520px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 72px;
}

.auth-card {
    margin-top: 48px;
    padding: clamp(28px, 6vw, 48px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.auth-card h1 {
    margin-bottom: 12px;
    font-size: clamp(2.4rem, 9vw, 4rem);
}

.auth-card form { margin-top: 28px; }

.auth-card label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 750;
}

.auth-card input {
    width: 100%;
    min-height: 50px;
    padding: 10px 12px;
    color: var(--ink);
    background: white;
    border: 1px solid #a9b0aa;
    border-radius: 7px;
    font: inherit;
}

.auth-card input:focus {
    outline: 3px solid rgba(33, 79, 60, .2);
    border-color: var(--forest);
}

.auth-card .primary-button { width: 100%; margin-top: 26px; }

.form-alert,
.form-success {
    padding: 12px 14px;
    border-radius: 7px;
    font-weight: 650;
}

.form-alert { color: #7a251f; background: #f8e2df; }
.form-success { color: var(--forest-dark); background: var(--success); }
.auth-help { margin: 26px 0 0; color: var(--muted); font-size: .9rem; }

.dashboard-shell { padding: clamp(64px, 10vw, 110px) 0; }
.dashboard-shell > h1 { max-width: 850px; }
.dashboard-grid { margin-top: 64px; }

.management-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(56px, 8vw, 96px) 0;
}

.management-page { background: #f3f1ea; }

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 34px;
}

.page-heading h1 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 5vw, 3.65rem);
    line-height: 1.05;
    letter-spacing: -.025em;
}

.page-heading p:last-child {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.heading-summary {
    min-width: 132px;
    padding: 16px 20px;
    display: grid;
    background: var(--forest);
    color: white;
    border-radius: 10px;
}

.heading-summary strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
}

.heading-summary span { margin-top: 5px; font-size: .78rem; opacity: .82; }

.management-card {
    margin-top: 36px;
    padding: clamp(24px, 4vw, 36px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(30, 42, 34, .05);
}

.section-heading {
    margin: -4px 0 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.section-heading h2 {
    margin-bottom: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
}

.section-heading p { margin: 0; color: var(--muted); font-size: .93rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.form-grid label,
.account-row label {
    display: grid;
    gap: 7px;
    font-size: .87rem;
    font-weight: 750;
}

.form-grid label > span,
.account-row label > span {
    color: #39483f;
    font-size: .8rem;
    letter-spacing: .025em;
}

.form-grid input,
.form-grid select,
.account-row select {
    width: 100%;
    min-height: 46px;
    padding: 9px 11px;
    color: var(--ink);
    background: white;
    border: 1px solid #a9b0aa;
    border-radius: 7px;
    font: inherit;
}

.form-wide { grid-column: 1 / -1; }

.form-grid .primary-button {
    width: auto;
    min-width: 190px;
    justify-self: start;
    cursor: pointer;
}

.secondary-button {
    min-height: 44px;
    padding: 9px 15px;
    color: var(--forest-dark);
    background: white;
    border: 1px solid var(--forest);
    border-radius: 7px;
    font-weight: 750;
    cursor: pointer;
}

.secondary-button:disabled { cursor: not-allowed; opacity: .5; }

.account-list { display: grid; gap: 12px; }

.account-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
    align-items: end;
    gap: 14px;
    padding: 18px;
    background: #faf9f5;
    border: 1px solid #e4e0d6;
    border-radius: 9px;
}

.account-identity { display: grid; gap: 3px; align-self: center; }
.account-identity span { color: var(--muted); font-size: .88rem; }
.account-identity .account-meta {
    margin-top: 3px;
    color: var(--forest);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .site-header { gap: 16px; }
    .header-actions { gap: 6px; }
    .language-button { padding-inline: 11px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-grid article { padding: 28px 0; }
    .feature-grid article + article {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .setup-status { align-items: flex-start; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .form-wide { grid-column: auto; }
    .account-row { grid-template-columns: 1fr; align-items: stretch; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .heading-summary { min-width: 0; width: fit-content; }
}
