:root {
    --cream: #fff8ee;
    --paper: #fffdf9;
    --white: #fff;
    --ink: #2d2030;
    --muted: #756b72;
    --line: #eadfd5;
    --orange: #ff6b35;
    --orange-dark: #d94d1e;
    --orange-soft: #fff0e5;
    --plum: #53294f;
    --plum-soft: #f4eaf3;
    --green: #2e7051;
    --green-soft: #e9f4ed;
    --yellow: #ffd15c;
    --red: #a93737;
    --red-soft: #fbeaea;
    --shadow: 0 18px 55px rgba(67, 39, 54, .09);
    --radius-lg: 28px;
    --radius: 18px;
    --radius-sm: 12px;
    --shell: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--plum); text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, .button { -webkit-tap-highlight-color: transparent; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 820px); margin-inline: auto; }
.page { padding-block: 48px 72px; }
.page-compact { padding-block: 32px 64px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--cream) 91%, transparent);
    border-bottom: 1px solid rgba(83, 41, 79, .08);
    backdrop-filter: blur(16px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark {
    width: 40px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    color: var(--white);
    background: var(--orange);
    border-radius: 13px 13px 13px 5px;
    font-weight: 900;
    transform: rotate(-3deg);
    box-shadow: 0 7px 18px rgba(255, 107, 53, .25);
}
.brand > span:last-child { display: grid; line-height: 1.04; }
.brand strong { font-size: 1.15rem; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 650; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a, .nav-link { color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 720; }
.header-nav form { margin: 0; }
.nav-link { padding: 0; border: 0; background: none; cursor: pointer; }
.header-nav .nav-cta { padding: 10px 15px; color: var(--orange-dark); background: var(--orange-soft); border-radius: 999px; }

h1, h2, h3 { margin: 0 0 .55em; font-weight: 850; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.35rem, 6vw, 5.25rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.45rem); }
h3 { font-size: 1.12rem; letter-spacing: -.018em; }
p { margin: 0 0 1em; }
.lead { max-width: 700px; color: #5f535c; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.eyebrow { margin-bottom: 14px; color: var(--orange-dark); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.kicker { color: var(--plum); font-size: .83rem; font-weight: 800; }

.button, button.primary, button.secondary {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--white);
    background: var(--orange);
    box-shadow: 0 10px 24px rgba(255, 107, 53, .22);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.button:hover, button.primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 13px 28px rgba(217, 77, 30, .25); }
.button.secondary, button.secondary { color: var(--plum); background: var(--white); border-color: var(--line); box-shadow: none; }
.button.ghost { color: var(--plum); background: transparent; border-color: rgba(83, 41, 79, .2); box-shadow: none; }
.button.big { min-height: 58px; padding-inline: 25px; border-radius: 17px; font-size: 1.02rem; }
.button.full, button.full { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

.card {
    padding: 26px;
    background: var(--paper);
    border: 1px solid rgba(83, 41, 79, .09);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(67, 39, 54, .05);
}
.card.flat { box-shadow: none; }
.card.tint-orange { background: var(--orange-soft); border-color: #ffd6bf; }
.card.tint-plum { background: var(--plum-soft); border-color: #e4cfe2; }
.card.tint-green { background: var(--green-soft); border-color: #cae6d5; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: start; }
.stack { display: grid; gap: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.section-head p { margin: 0; color: var(--muted); }

.hero { position: relative; overflow: hidden; padding-block: 76px 82px; }
.hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -190px;
    top: -230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 209, 92, .5), rgba(255, 107, 53, 0) 68%);
    pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 58px; align-items: center; }
.hero h1 { max-width: 760px; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero-actions { margin-top: 28px; }
.trust-line { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: var(--muted); font-size: .86rem; }
.trust-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.hero-board { position: relative; min-height: 450px; padding: 30px; background: var(--plum); border-radius: 34px; box-shadow: var(--shadow); color: var(--white); }
.hero-board::after { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(255,255,255,.11); border-radius: 24px; pointer-events: none; }
.flow-chip { position: relative; z-index: 1; padding: 17px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); border-radius: 16px; }
.flow-chip + .flow-chip { margin-top: 13px; }
.flow-chip small { display: block; color: rgba(255,255,255,.65); font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.flow-chip strong { display: block; margin-top: 4px; font-size: 1.12rem; }
.flow-chip.accent { margin-top: 25px; color: var(--ink); background: var(--yellow); transform: rotate(-1.5deg); }
.flow-arrow { position: relative; z-index: 1; margin-block: 7px; padding-left: 15px; color: rgba(255,255,255,.55); font-weight: 900; }

.feature-section { padding-block: 70px; background: var(--paper); border-block: 1px solid rgba(83,41,79,.07); }
.feature-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 21px; border-radius: 13px; background: var(--orange-soft); font-size: 1.25rem; }
.feature-card p { margin: 0; color: var(--muted); }
.steps-section { padding-block: 76px; }
.number-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.number-step { padding: 23px; border-top: 3px solid var(--line); }
.number-step::before { counter-increment: step; content: "0" counter(step); display: block; margin-bottom: 20px; color: var(--orange); font-weight: 900; }
.number-step p { color: var(--muted); font-size: .9rem; }

.page-heading { margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
.profile-banner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 29px; background: var(--plum); color: var(--white); border-radius: var(--radius-lg); }
.profile-banner p { margin: 0; color: rgba(255,255,255,.72); }
.profile-banner .button { flex: none; }
.meta-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.pill, .badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 5px 10px; border-radius: 999px; font-size: .73rem; font-weight: 800; }
.pill { color: rgba(255,255,255,.83); background: rgba(255,255,255,.11); }
.badge.silpo, .badge.verified { color: var(--green); background: var(--green-soft); }
.badge.reference, .badge.partial { color: #8a5a00; background: #fff1c9; }
.badge.estimate, .badge.blocked { color: var(--red); background: var(--red-soft); }
.badge.joy { color: var(--orange-dark); background: var(--orange-soft); }
.badge.plum { color: var(--plum); background: var(--plum-soft); }
.badge.neutral { color: #615a5f; background: #f0ece9; }

.list-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.list-card:last-child { padding-bottom: 0; border-bottom: 0; }
.list-card:first-child { padding-top: 0; }
.list-card a { color: var(--ink); font-weight: 800; text-decoration: none; }
.list-card small { display: block; margin-top: 4px; color: var(--muted); }

.form-shell { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.form-section { padding: 28px; background: var(--paper); border: 1px solid rgba(83,41,79,.09); border-radius: var(--radius); }
.form-section + .form-section { margin-top: 16px; }
.form-section-head { display: flex; gap: 15px; margin-bottom: 23px; }
.form-number { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--white); background: var(--plum); border-radius: 10px; font-size: .78rem; font-weight: 900; }
.form-section-head p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #463b43; font-size: .82rem; font-weight: 800; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #daced4;
    border-radius: 12px;
    outline: none;
}
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,107,53,.1); }
.field-help { color: var(--muted); font-size: .75rem; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 43px;
    padding: 9px 11px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: .8rem;
    font-weight: 650;
    cursor: pointer;
}
.choice input { accent-color: var(--orange); }
.form-aside { position: sticky; top: 95px; display: grid; gap: 14px; }
.context-list { display: grid; gap: 12px; margin-top: 16px; }
.context-item { display: flex; gap: 10px; color: var(--muted); font-size: .84rem; }
.context-item strong { display: block; color: var(--ink); }
.form-submit { margin-top: 17px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { padding: 14px; text-align: left; background: var(--orange-soft); border-radius: 13px; }
.stat strong { display: block; color: var(--orange-dark); font-size: 1.25rem; }
.stat span { color: var(--muted); font-size: .72rem; font-weight: 720; }
.calc-note { margin: 10px 0 0; color: var(--muted); font-size: .75rem; }

.agent-card { padding: 35px; background: var(--plum); border-radius: var(--radius-lg); color: var(--white); box-shadow: var(--shadow); }
.agent-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.agent-head h1 { font-size: clamp(1.8rem, 5vw, 3.1rem); }
.agent-orb { flex: none; width: 62px; height: 62px; position: relative; border-radius: 50%; background: var(--yellow); }
.agent-orb::after { content: ""; position: absolute; inset: -8px; border: 1px solid rgba(255,209,92,.35); border-radius: inherit; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .35; } }
.progress-list { display: grid; gap: 7px; }
.progress-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.48); }
.progress-step .dot { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-size: .68rem; }
.progress-step.active { color: var(--white); background: rgba(255,255,255,.1); }
.progress-step.active .dot { color: var(--ink); background: var(--yellow); border-color: var(--yellow); }
.progress-step.done { color: rgba(255,255,255,.78); }
.progress-step.done .dot { color: var(--white); background: var(--green); border-color: var(--green); }
.technical-log { margin-top: 18px; padding: 16px; background: rgba(19,9,22,.24); border-radius: 13px; }
.technical-log summary { cursor: pointer; font-size: .8rem; font-weight: 750; }
.step-log { max-height: 230px; overflow: auto; margin-top: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; color: rgba(255,255,255,.62); }
.step-log div { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); }

.summary-bar { display: grid; grid-template-columns: 1.2fr repeat(4, .7fr); gap: 1px; overflow: hidden; margin-bottom: 20px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); }
.summary-cell { padding: 18px; background: var(--paper); }
.summary-cell strong { display: block; font-size: 1.35rem; }
.summary-cell span { color: var(--muted); font-size: .73rem; font-weight: 700; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 25px; }
.status-line p { margin: 0; color: var(--muted); font-size: .87rem; }
.day-card { scroll-margin-top: 95px; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.day-head h2 { margin: 0; font-size: 1.45rem; }
.meal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 17px; }
.meal-card { padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 15px; }
.meal-type { color: var(--orange-dark); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.meal-card h3 { margin-top: 7px; min-height: 2.3em; }
.macro-line { color: var(--muted); font-size: .74rem; }
.ingredient-list { margin: 13px 0; padding: 0; list-style: none; }
.ingredient-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #eadfd5; font-size: .78rem; }
.ingredient-list li:last-child { border: 0; }
.recipe-link { font-size: .76rem; font-weight: 800; }
.meal-disclaimer { margin: 8px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.3; }
.joy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.joy-option { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.joy-option.selected { border: 2px solid var(--orange); box-shadow: 0 8px 24px rgba(255,107,53,.12); }
.joy-option img { width: 74px; height: 74px; object-fit: contain; background: var(--white); border-radius: 12px; }
.joy-option .price { font-size: 1.18rem; font-weight: 900; }
.sticky-action { position: sticky; bottom: 14px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 22px; padding: 16px 18px; background: rgba(45,32,48,.96); color: var(--white); border-radius: 17px; box-shadow: 0 12px 40px rgba(45,32,48,.24); backdrop-filter: blur(12px); }
.sticky-action p { margin: 0; color: rgba(255,255,255,.67); font-size: .8rem; }

.notice { display: flex; gap: 12px; padding: 15px 17px; border-radius: 13px; font-size: .86rem; }
.notice.warning { color: #76520a; background: #fff2c8; border: 1px solid #f1d986; }
.notice.danger { color: var(--red); background: var(--red-soft); border: 1px solid #efc7c7; }
.notice.success { color: var(--green); background: var(--green-soft); border: 1px solid #c6e0d0; }
.notice p { margin: 0; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 10px 8px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: .7rem; text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .84rem; }
.cart-table tr:last-child td { border-bottom: 0; }
.product-cell { display: grid; grid-template-columns: 50px 1fr; gap: 11px; align-items: center; }
.product-thumb { width: 50px; height: 50px; object-fit: contain; padding: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 11px; }
.delta { color: var(--green); font-weight: 900; }
.cart-total { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.cart-total strong { font-size: 1.75rem; }
.cart-total p { margin: 0; }

.result-card { padding: 38px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.result-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 21px; border-radius: 50%; font-size: 2rem; background: var(--green-soft); }
.result-card.error .result-icon { background: var(--red-soft); }
.result-card h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.validation-list { max-width: 620px; margin: 20px auto; padding: 0; list-style: none; text-align: left; }
.validation-list li { padding: 10px 12px; margin-top: 7px; background: var(--orange-soft); border-radius: 10px; font-size: .83rem; }

.site-footer { padding: 28px 0; color: var(--muted); border-top: 1px solid rgba(83,41,79,.08); font-size: .75rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 900px) {
    .hero-grid, .split, .form-shell { grid-template-columns: 1fr; }
    .hero-board { min-height: auto; }
    .form-aside { position: static; grid-template-columns: repeat(2, 1fr); }
    .card-grid, .meal-grid { grid-template-columns: repeat(2, 1fr); }
    .number-steps { grid-template-columns: repeat(2, 1fr); }
    .summary-bar { grid-template-columns: repeat(2, 1fr); }
    .summary-cell:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .shell, .narrow { width: min(calc(100% - 24px), var(--shell)); }
    .page { padding-block: 30px 52px; }
    .header-inner { min-height: 64px; }
    .brand small, .header-nav > a:first-child { display: none; }
    .header-nav { gap: 10px; }
    .header-nav .nav-cta { padding: 8px 10px; font-size: .78rem; }
    .nav-link { font-size: .78rem; }
    .hero { padding-block: 44px 52px; }
    .hero-grid { gap: 35px; }
    .hero-board { padding: 22px; border-radius: 25px; }
    .card, .form-section, .agent-card { padding: 20px; }
    .card-grid, .meal-grid, .joy-grid, .choice-grid, .fields, .form-aside, .number-steps { grid-template-columns: 1fr; }
    .profile-banner, .section-head, .status-line, .sticky-action, .cart-total { align-items: stretch; flex-direction: column; }
    .profile-banner { display: flex; }
    .profile-banner .button { width: 100%; }
    .summary-bar { grid-template-columns: 1fr 1fr; }
    .summary-cell { padding: 14px; }
    .summary-cell strong { font-size: 1.1rem; }
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr { padding: 13px 0; border-bottom: 1px solid var(--line); }
    .cart-table td { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; border: 0; text-align: right; }
    .cart-table td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; text-align: left; }
    .cart-table td.product-cell { display: grid; grid-template-columns: 50px 1fr; text-align: left; }
    .cart-table td.product-cell::before { display: none; }
    .sticky-action { position: static; }
    .sticky-action .button { width: 100%; }
    .footer-inner { flex-direction: column; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
