: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-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.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;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.password-field input {
    min-width: 0;
    border-radius: 7px 0 0 7px;
}

.password-toggle {
    min-width: 82px;
    min-height: 46px;
    padding: 8px 14px;
    color: var(--forest-dark);
    background: #eef3ef;
    border: 1px solid #a9b0aa;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #dfeae2;
    outline: 3px solid rgba(33, 79, 60, .2);
    outline-offset: 1px;
}

.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,
.form-field > 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-grid .password-field input { border-radius: 7px 0 0 7px; }

.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;
}

.credential-card {
    margin: 28px 0 36px;
    padding: clamp(24px, 4vw, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: #e7f2eb;
    border: 1px solid #bdd8c7;
    border-radius: 14px;
}

.credential-card h2 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
}

.credential-card p:last-child { margin: 0; color: var(--muted); }

.delivery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    flex: 0 0 auto;
}

@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; }
    .credential-card { align-items: stretch; flex-direction: column; }
    .delivery-actions { flex-direction: column; }
    .delivery-actions > * { justify-content: center; width: 100%; }
}

.scope-page { background: #ede9df; }
.scope-header { background: transparent; }

.scope-sheet {
    width: min(1080px, calc(100% - 32px));
    margin: 38px auto 64px;
    padding: clamp(32px, 6vw, 64px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(30, 42, 34, .08);
}

.scope-intro {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: end;
    gap: clamp(28px, 6vw, 70px);
    padding-bottom: 34px;
    border-bottom: 1px solid var(--line);
}

.scope-intro h1 {
    margin: 0;
    font-size: clamp(2.35rem, 5vw, 4.15rem);
    line-height: 1.03;
}

.scope-intro > p { margin: 0; color: var(--muted); font-size: 1.02rem; }

.scope-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(30px, 6vw, 72px);
    padding: 38px 0;
}

.scope-sheet h2 {
    margin-bottom: 16px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.5rem;
}

.scope-columns ul { margin: 0; padding-left: 20px; }
.scope-columns ul li { margin: 7px 0; padding-left: 4px; }

.scope-steps { margin: 0; padding: 0; display: grid; gap: 13px; list-style: none; }
.scope-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; }
.scope-steps strong {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--forest);
    border-radius: 50%;
    font-size: .82rem;
}

.scope-boundary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 30px;
    background: #f1eee5;
    border-radius: 10px;
}

.scope-boundary h2 { margin-bottom: 8px; font-size: 1.25rem; }
.scope-boundary p { margin: 0; color: var(--muted); }

.scope-footer {
    width: auto;
    min-height: 0;
    margin: 32px 0 0;
    padding: 24px 0 0;
    color: var(--forest-dark);
    border-top: 1px solid var(--line);
    font-weight: 700;
}

@media (max-width: 760px) {
    .scope-intro,
    .scope-columns,
    .scope-boundary { grid-template-columns: 1fr; }
    .scope-sheet { margin-top: 20px; }
}

@media print {
    @page { size: letter portrait; margin: .4in; }
    .scope-page { background: white; font-size: 9.5pt; }
    .scope-header { display: none; }
    .scope-sheet {
        width: auto;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .scope-intro h1 { font-size: 28pt; }
    .scope-intro { gap: 30px; padding-bottom: 20px; }
    .scope-columns { gap: 30px; padding: 20px 0; }
    .scope-columns ul li { margin: 3px 0; }
    .scope-steps { gap: 7px; }
    .scope-boundary { gap: 20px; padding: 18px; }
    .scope-footer { margin-top: 18px; padding-top: 14px; }
}

.catalog-page { background: #f3f1e9; }
.catalog-header { position: sticky; top: 0; z-index: 20; background: rgba(243,241,233,.96); backdrop-filter: blur(12px); }
.catalog-shell { padding: 56px 0 90px; }
.catalog-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.catalog-hero h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(2.7rem, 6vw, 5rem); }
.catalog-hero p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.demo-pill { flex: 0 0 auto; padding: 10px 14px; color: #704e10; background: #f5e7c4; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.cart-button { min-height: 44px; padding: 7px 9px 7px 15px; display: flex; align-items: center; gap: 10px; color: white; background: var(--forest); border: 0; border-radius: 999px; font-weight: 750; cursor: pointer; }
.cart-button strong { min-width: 29px; height: 29px; display: grid; place-items: center; color: var(--forest-dark); background: white; border-radius: 50%; }
.category-pills { margin: 42px 0 28px; display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px; }
.category-pills button { min-height: 42px; padding: 8px 15px; white-space: nowrap; color: var(--forest-dark); background: transparent; border: 1px solid #b8c0b9; border-radius: 999px; font-weight: 700; }
.category-pills button.active { color: white; background: var(--forest); border-color: var(--forest); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 9px 24px rgba(30,42,34,.045); }
.product-visual { min-height: 180px; padding: 18px; position: relative; display: grid; place-items: center; background: linear-gradient(145deg,#e5e8dc,#f2e9d9); }
.product-visual > span { font-size: 4.8rem; filter: drop-shadow(0 8px 8px rgba(25,35,28,.14)); }
.product-visual small { position: absolute; top: 14px; left: 14px; padding: 6px 9px; color: var(--forest-dark); background: rgba(255,255,255,.88); border-radius: 999px; font-weight: 800; }
.product-content { padding: 22px; display: flex; flex: 1; flex-direction: column; }
.stock-label { margin-bottom: 8px; font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.in-stock { color: #247044; }
.out-stock { color: #9a463c; }
.product-content h2 { margin-bottom: 8px; font-family: Georgia,"Times New Roman",serif; font-size: 1.42rem; }
.product-content > p:not(.stock-label) { color: var(--muted); font-size: .92rem; }
.product-purchase { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.product-purchase strong { font-size: 1.2rem; }
.product-purchase span { color: var(--muted); font-size: .8rem; }
.product-purchase button { min-height: 43px; padding: 8px 13px; color: white; background: var(--forest); border: 0; border-radius: 7px; font-weight: 800; cursor: pointer; }
.product-purchase button:disabled { color: #6c736e; background: #e0e1dd; cursor: not-allowed; }
.sold-out .product-visual { filter: grayscale(.8); opacity: .7; }
.cart-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(12,20,15,.42); }
.cart-drawer { width: min(470px,100%); position: fixed; inset: 0 0 0 auto; z-index: 40; padding: 28px; display: flex; flex-direction: column; background: var(--surface); box-shadow: -20px 0 50px rgba(18,28,21,.18); transform: translateX(105%); transition: transform .25s ease; }
.cart-drawer.open { transform: translateX(0); }
.cart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.cart-heading h2 { margin: 0; font-family: Georgia,"Times New Roman",serif; font-size: 2rem; }
.cart-heading > button { width: 44px; height: 44px; color: var(--ink); background: #eeeae0; border: 0; border-radius: 50%; font-size: 1.8rem; cursor: pointer; }
.cart-items { overflow-y: auto; display: grid; gap: 2px; }
.cart-item { padding: 17px 0; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.cart-item-icon { font-size: 1.8rem; }
.cart-item div:nth-child(2) { display: grid; }
.cart-item small { color: var(--muted); }
.quantity-control { display: flex; align-items: center; gap: 8px; }
.quantity-control button { width: 34px; height: 34px; color: var(--forest-dark); background: white; border: 1px solid #b5beb7; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.cart-empty { margin: auto; text-align: center; color: var(--muted); }
.cart-empty span { font-size: 3.8rem; }
.cart-footer { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--line); }
.cart-total { display: flex; align-items: center; justify-content: space-between; font-size: 1.08rem; }
.cart-total strong { font-family: Georgia,"Times New Roman",serif; font-size: 1.8rem; }
.cart-footer > p { color: var(--muted); font-size: .84rem; }
.cart-footer .primary-button { width: 100%; }
.clear-cart { width: 100%; margin-top: 8px; min-height: 42px; color: var(--muted); background: transparent; border: 0; font-weight: 700; cursor: pointer; }

@media (max-width: 900px) {
    .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .catalog-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
    .catalog-header { align-items: flex-start; padding: 14px 0; }
    .catalog-header .brand > span:last-child { display: none; }
    .catalog-header .header-actions { flex-wrap: wrap; justify-content: flex-end; }
    .catalog-shell { padding-top: 38px; }
    .product-grid { grid-template-columns: 1fr; }
    .product-visual { min-height: 160px; }
}
