:root {
  --ink: #17221d;
  --muted: #68716c;
  --line: #dde2de;
  --paper: #f4f4ef;
  --card: #fff;
  --blue: #3e63dd;
  --blue-dark: #2d4fc1;
  --blue-soft: #e9edff;
  --green: #176a49;
  --lime: #c9f36a;
  --orange: #c55b18;
  --danger: #b83a3a;
  --shadow: 0 18px 55px rgba(23,34,29,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 286px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; min-height: 100vh; max-height: 100vh; padding: 28px 20px; background: #17221d; color: #f9faf7; display: flex; flex-direction: column; overflow-y: auto; }
.brand { width: 100%; display: flex; gap: 12px; align-items: center; padding: 0 8px 26px; border: 0; border-bottom: 1px solid rgba(255,255,255,.13); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; color: #17221d; background: var(--lime); font-weight: 850; }
.brand-mark.small { width: 30px; height: 30px; border-radius: 9px; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; }
.brand small { color: #9fa9a3; margin-top: 3px; font-size: 11px; }
.dashboard-link { width: 100%; margin-top: 22px; padding: 11px 12px; border: 0; border-radius: 12px; background: transparent; color: #b6beb9; display: flex; gap: 11px; align-items: center; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; }
.dashboard-link.active, .dashboard-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.dashboard-glyph { width: 26px; font-size: 17px; text-align: center; }
.eyebrow { margin: 0 0 11px; color: #8e9993; font-size: 10px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.blue { color: var(--blue); }
.app-list { padding-top: 27px; }
.app-row { width: 100%; border: 0; border-radius: 14px; background: transparent; color: #dce1dd; padding: 10px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; cursor: pointer; margin-bottom: 6px; }
.app-row:hover, .app-row.active { color: #fff; background: rgba(255,255,255,.11); }
.app-icon { width: 40px; height: 40px; border-radius: 11px; background: #375346; display: grid; place-items: center; font-size: 11px; font-weight: 850; }
.app-row.active .app-icon { background: var(--lime); color: #17221d; }
.app-label { min-width: 0; }
.app-label strong, .app-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-label strong { font-size: 13px; }
.app-label small { color: #95a099; margin-top: 4px; font-size: 10px; }
.row-arrow { color: #87928c; font-size: 20px; }
.mini-progress { height: 3px; width: 100%; margin-top: 6px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.12); }
.mini-progress span { height: 100%; display: block; border-radius: inherit; background: var(--lime); }
.privacy-note { margin-top: auto; padding: 18px 10px 3px; border-top: 1px solid rgba(255,255,255,.13); display: flex; gap: 10px; align-items: flex-start; }
.privacy-note strong { font-size: 11px; }
.privacy-note p { color: #8f9a94; font-size: 10px; line-height: 1.45; margin: 4px 0 0; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(201,243,106,.1); }

.workspace { min-width: 0; padding: 24px clamp(24px, 5vw, 76px) 34px; }
.topbar { min-height: 44px; display: flex; justify-content: flex-end; align-items: center; margin-bottom: 46px; }
.mobile-brand { display: none; border: 0; background: transparent; align-items: center; gap: 9px; font-weight: 800; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.6); }
.language-switch button { min-width: 36px; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: #89918d; cursor: pointer; font-size: 10px; font-weight: 850; }
.language-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(23,34,29,.08); }
.secondary-button, .dark-button, .text-button { min-height: 38px; border-radius: 10px; padding: 9px 13px; cursor: pointer; font-size: 12px; font-weight: 750; }
.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.65); }
.secondary-button:hover { background: #fff; }
.dark-button { border: 1px solid #17221d; background: #17221d; color: #fff; }
.dark-button:hover { background: #29352f; }
.text-button { border: 0; background: transparent; color: var(--blue); }

.hero { max-width: 860px; }
.hero h1 { margin: 0; max-width: 800px; font-size: clamp(42px, 5.2vw, 72px); line-height: .98; letter-spacing: -.058em; font-weight: 760; }
.hero-copy { max-width: 690px; color: var(--muted); font-size: 16px; line-height: 1.65; margin: 24px 0 36px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; max-width: 1050px; }
.summary-card { border: 1px solid var(--line); border-radius: 21px; background: var(--card); padding: 23px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.summary-card:hover { transform: translateY(-2px); box-shadow: 0 22px 60px rgba(23,34,29,.09); }
.summary-top { display: flex; justify-content: space-between; align-items: flex-start; }
.large-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 12px; font-weight: 850; }
.tint-1 { background: #e8ebff; color: var(--blue); }
.tint-2 { background: #ffecdf; color: var(--orange); }
.status-label { color: #7c8580; padding: 6px 9px; background: #f2f3f0; border-radius: 999px; font-size: 10px; font-weight: 750; }
.status-label.ready { color: var(--green); background: #e4f5ec; }
.status-label.progress { color: #8a5b10; background: #fff1d6; }
.summary-card h2 { margin: 26px 0 5px; font-size: 21px; letter-spacing: -.035em; }
.summary-card > p { margin: 0; color: var(--muted); font-size: 12px; }
.progress-track { height: 5px; margin: 18px 0 22px; background: #edf0ed; border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .35s ease; }
.primary-button { width: 100%; border: 0; border-radius: 11px; padding: 12px 14px; background: #17221d; color: #fff; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 750; font-size: 12px; }
.primary-button:hover { background: #29352f; }

.insight-grid { max-width: 1050px; margin-top: 17px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 17px; }
.workflow-card, .cost-card { border: 1px solid var(--line); border-radius: 19px; padding: 22px; }
.workflow-card { background: #e9edff; border-color: #d7ddfb; }
.cost-card { background: #17221d; color: #fff; }
.workflow-card h2, .cost-card h2 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.025em; }
.workflow-card > p, .cost-card > p { margin: 0; color: #5f6b82; font-size: 12px; line-height: 1.5; }
.cost-card > p { color: #aab3ae; }
.workflow-steps { margin-top: 21px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.workflow-step { padding: 13px; border-radius: 13px; background: rgba(255,255,255,.58); }
.workflow-step span { color: var(--blue); font-size: 10px; font-weight: 850; }
.workflow-step strong { display: block; margin: 9px 0 4px; font-size: 12px; }
.workflow-step p { margin: 0; color: #697188; font-size: 10px; line-height: 1.4; }
.cost-line { margin-top: 17px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.13); }
.cost-line small { color: #9ca7a1; display: block; margin-bottom: 3px; font-size: 10px; }
.cost-line strong { font-size: 12px; }
.cost-value { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.source-link { display: inline-block; margin-top: 15px; color: var(--lime); font-size: 10px; text-decoration: none; }

.form-header { max-width: 1120px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.form-header h1 { margin: 0; font-size: clamp(34px, 4.3vw, 54px); letter-spacing: -.05em; line-height: 1; }
.form-header p { max-width: 590px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.score { flex: 0 0 auto; display: grid; grid-template-columns: 58px auto; align-items: center; gap: 12px; }
.score-ring { --score: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--score) * 1%), #e1e5e1 0); position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--paper); }
.score-ring strong { position: relative; z-index: 1; font-size: 11px; }
.score-text strong, .score-text small { display: block; }
.score-text strong { font-size: 12px; }
.score-text small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.stepper-wrap { max-width: 1120px; overflow-x: auto; margin-bottom: 17px; scrollbar-width: thin; }
.stepper { min-width: 760px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.step-button { min-width: 0; padding: 11px 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.55); color: #7a837e; cursor: pointer; text-align: left; }
.step-button:hover { background: #fff; }
.step-button.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.step-button.complete:not(.active) { color: var(--green); border-color: #b9dfcc; background: #eff9f3; }
.step-button span, .step-button strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-button span { margin-bottom: 5px; font-size: 9px; font-weight: 850; opacity: .72; }
.step-button strong { font-size: 10px; }
.form-layout { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 17px; align-items: start; }
.form-panel, .guidance-panel { border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.form-panel { padding: clamp(20px, 3.3vw, 34px); }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid #e8ebe8; }
.panel-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.035em; }
.panel-heading p { max-width: 560px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.required-legend { flex: 0 0 auto; padding-top: 5px; color: #8a928e; font-size: 9px; }
.required-star { color: var(--blue); font-weight: 850; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; padding-top: 25px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 11px; font-weight: 780; }
.field label small { color: #8a928e; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #d8ded9; border-radius: 10px; outline: 0; background: #fbfcfa; color: var(--ink); padding: 11px 12px; font-size: 12px; transition: border .15s, box-shadow .15s, background .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(62,99,221,.1); }
.field textarea { min-height: 104px; line-height: 1.5; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #adb4b0; }
.field-help { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: #87908b; font-size: 9px; line-height: 1.4; }
.counter.over { color: var(--danger); font-weight: 800; }
.check-field { grid-column: 1 / -1; }
.check-row { display: grid !important; grid-template-columns: 20px 1fr; justify-content: initial !important; align-items: start; gap: 10px !important; padding: 13px; border: 1px solid #d8ded9; border-radius: 11px; background: #fbfcfa; cursor: pointer; }
.check-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.check-copy strong, .check-copy small { display: block; }
.check-copy strong { font-size: 11px; }
.check-copy small { margin-top: 4px; color: #7e8882; font-size: 9px; line-height: 1.45; font-weight: 500; }
.section-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e8ebe8; }
.nav-button { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 13px; cursor: pointer; font-size: 11px; font-weight: 750; }
.nav-button.next { margin-left: auto; border-color: var(--ink); background: var(--ink); color: #fff; }
.guidance-panel { position: sticky; top: 24px; padding: 20px; box-shadow: none; }
.guidance-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 850; }
.guidance-panel h3 { margin: 18px 0 8px; font-size: 15px; letter-spacing: -.025em; }
.guidance-panel p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.guidance-list { margin: 17px 0 0; padding: 17px 0 0; border-top: 1px solid #e6e9e6; list-style: none; }
.guidance-list li { display: grid; grid-template-columns: 15px 1fr; gap: 7px; margin-bottom: 10px; color: #55605a; font-size: 9px; line-height: 1.45; }
.guidance-list li::before { content: "✓"; color: var(--green); font-weight: 900; }
.apple-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; color: var(--blue); font-size: 9px; font-weight: 750; text-decoration: none; }
.apple-link:hover { text-decoration: underline; }

footer { max-width: 1120px; display: flex; justify-content: space-between; gap: 20px; margin-top: 46px; padding-top: 19px; border-top: 1px solid var(--line); color: #8c948f; font-size: 9px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
.footer-links a { color: var(--blue); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.menu-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(9,16,12,.35); backdrop-filter: blur(4px); }
.export-menu { position: fixed; z-index: 50; top: 50%; left: 50%; width: min(480px, calc(100vw - 30px)); transform: translate(-50%, -50%); border-radius: 20px; background: #fff; padding: 24px; box-shadow: 0 30px 90px rgba(5,12,8,.28); }
.export-menu-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 17px; }
.export-menu-head h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; font-size: 20px; }
.export-option { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 13px 6px; border: 0; border-top: 1px solid #e8ebe8; background: transparent; text-align: left; cursor: pointer; }
.export-option:hover { background: #f8f9f7; }
.export-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 850; }
.export-option strong, .export-option small { display: block; }
.export-option strong { font-size: 12px; }
.export-option small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.credential-warning { margin: 14px 0 0; padding: 11px; border-radius: 9px; background: #fff5df; color: #7a5a18; font-size: 9px; line-height: 1.45; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 26px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 11px 15px; border-radius: 10px; background: #17221d; color: #fff; box-shadow: 0 10px 35px rgba(0,0,0,.18); font-size: 11px; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .shell { grid-template-columns: 235px minmax(0, 1fr); }
  .sidebar { padding-inline: 14px; }
  .form-layout { grid-template-columns: 1fr; }
  .guidance-panel { position: static; }
  .insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { min-height: auto; height: auto; padding: 15px; position: static; display: block; }
  .sidebar > .brand, .dashboard-link, .privacy-note, .app-list > .eyebrow { display: none; }
  .app-list { padding: 0; }
  #sidebar-apps { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
  .app-row { min-width: 185px; margin: 0; }
  .workspace { padding: 16px 16px 28px; }
  .topbar { justify-content: space-between; margin-bottom: 34px; }
  .mobile-brand { display: flex; padding: 0; }
  .secondary-button { display: none; }
  .hero h1 { font-size: 41px; }
  .summary-grid, .fields-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .workflow-steps { grid-template-columns: 1fr; }
  .form-header { display: block; }
  .score { margin-top: 19px; }
  .form-panel { padding: 20px 16px; }
  .panel-heading { display: block; }
  .required-legend { margin-top: 10px; }
  footer { display: block; }
  .footer-links { justify-content: flex-start; margin: 10px 0; }
  footer span { display: block; margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
