
:root {
  --bg: #EEECE1; --surface: #FFFFFF; --surface-2: #E6ECF1;
  --ink: #1C1C1C; --muted: #565A5B; --line: #D3DADE;
  --accent: #647B85; --accent-text: #4F666F; --accent-ink: #FFFFFF; --accent-soft: #E6ECF1;
  --ok: #4F666F; --ok-soft: #E6ECF1;
  --cta-bg: #EEECE1; --cta-ink: #1C1C1C;
  --shadow: 0 1px 2px rgba(28,28,28,.04), 0 12px 32px rgba(100,123,133,.12);
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, sans-serif;
  --r: 16px; --ease: cubic-bezier(.2,.7,.2,1);
}
:root[data-theme="dark"] {
  --bg: #151819; --surface: #1E2326; --surface-2: #262D31;
  --ink: #EEECE1; --muted: #A7B0B3; --line: #36424A;
  --accent: #8FA8B3; --accent-text: #A9C0CA; --accent-ink: #101314; --accent-soft: #27343A;
  --ok: #A9C0CA; --ok-soft: #27343A;
  --cta-bg: #B8CBD3; --cta-ink: #101314;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.num { font-variant-numeric: tabular-nums; }

/* Topbar + journey */
.topbar { max-width: 1320px; margin: auto; padding: 20px 40px; display: flex; align-items: center; gap: 24px; }
.wordmark { font: 700 22px var(--sans); letter-spacing: 5px; }
.wordmark small { display: block; font: 400 12px var(--sans); letter-spacing: 0; color: var(--muted); margin-top: 2px; }
.journey { flex: 1; display: flex; justify-content: center; gap: 8px; }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 44px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; }
.step i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1.5px solid var(--line); }
.step.done i { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.step.active { background: var(--ink); color: var(--bg); }
.step.active i { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tools { display: flex; gap: 8px; }
.chipbtn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: background .15s; }
.chipbtn:hover { background: var(--surface-2); }

/* Layout */
main { max-width: 1320px; margin: auto; padding: 8px 40px 120px; display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 40px; align-items: start; }
.eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--accent-text); margin: 24px 0 12px; }
h1 { font: 500 clamp(36px, 4.4vw, 56px)/1.08 var(--serif); letter-spacing: -1px; margin: 0 0 12px; }
h1 em { font-style: italic; color: var(--accent-text); }
.lede { color: var(--muted); font-size: 18px; max-width: 56ch; margin: 0 0 32px; }
h2 { font: 600 14px var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 40px 0 16px; }

/* Packages */
.packages { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; padding-top: 14px; }
.pkg { position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 6px; min-height: 150px; transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s; }
.pkg:hover { border-color: var(--muted); }
.pkg b { font: 500 22px var(--serif); }
.pkg span { font-size: 14px; color: var(--muted); }
.pkg .from { margin-top: auto; font-weight: 600; font-size: 15px; color: var(--ink); }
.pkg[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.pkg[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.badge { position: absolute; top: -12px; left: 16px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

/* Category chips */
.cats { position: sticky; top: 0; z-index: 4; background: linear-gradient(var(--bg) 85%, transparent); padding: 12px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.cat { flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; transition: all .15s; }
.cat[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat .n { color: var(--accent-text); font-weight: 700; margin-left: 4px; }
.cat[aria-pressed="true"] .n { color: var(--accent-soft); }

/* Modules */
.modules { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 8px; }
.mod { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); display: grid; grid-template-rows: auto 1fr auto; min-height: 232px; overflow: hidden; transition: border-color .2s var(--ease), background .2s; }
.mod-body { text-align: left; padding: 20px 20px 8px; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mod-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tick { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 16px; color: var(--muted); transition: all .2s var(--ease); }
.mod h3 { font: 500 20px/1.25 var(--serif); margin: 0; }
.mod p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.mod-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 16px; border-top: 1px solid var(--line); min-height: 64px; }
.price { font-weight: 700; font-size: 17px; } .price small { font-weight: 400; font-size: 13px; color: var(--muted); }
.qty { display: flex; align-items: center; visibility: hidden; }
.qty button { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }
.qty button:hover { background: var(--surface-2); }
.qty output { min-width: 28px; text-align: center; font-weight: 600; }
.mod.on { border-color: var(--accent); background: var(--accent-soft); }
.mod.on .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.05); }
.mod.on .qty { visibility: visible; }
.mod.on .mod-foot { border-top-color: color-mix(in srgb, var(--accent) 25%, transparent); }

/* Summary panel */
aside { position: sticky; top: 24px; }
.panel { background: var(--ink); color: var(--bg); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
:root[data-theme="dark"] .panel { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.panel .lbl { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; opacity: .7; }
.total { font: 500 60px/1.05 var(--serif); letter-spacing: -2px; margin: 10px 0 2px; }
.total small { font: 400 18px var(--sans); letter-spacing: 0; opacity: .7; margin-left: 4px; }
.sub { font-size: 14px; opacity: .7; margin-bottom: 20px; }
.rows { border-top: 1px solid rgba(255,255,255,.16); padding: 14px 0; margin: 0; list-style: none; }
:root[data-theme="dark"] .rows { border-top-color: var(--line); }
.rows li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.rows li span:last-child { opacity: .8; }
.setup { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.16); padding-top: 14px; font-size: 14px; }
:root[data-theme="dark"] .setup { border-top-color: var(--line); }
.cta { width: 100%; min-height: 56px; margin-top: 22px; border-radius: 14px; background: var(--cta-bg); color: var(--cta-ink); font-weight: 700; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s var(--ease), filter .15s; }
.cta:hover { filter: brightness(1.08); } .cta:active { transform: scale(.98); }
.back { width: 100%; min-height: 44px; margin-top: 8px; opacity: .75; font-size: 14px; }
.note { font-size: 12px; color: var(--muted); margin: 14px 4px 0; }

/* Mobile bar */
.dock { display: none; }
@media (max-width: 1100px) {
  main { grid-template-columns: 1fr; padding-inline: 24px; }
  aside { display: none; }
  .topbar { padding-inline: 24px; flex-wrap: wrap; } .journey { order: 3; flex-basis: 100%; }
  .packages { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .modules { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dock { display: flex; position: fixed; inset: auto 0 0; z-index: 10; background: var(--ink); color: var(--bg); padding: 12px 24px max(12px, env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 16px; }
  :root[data-theme="dark"] .dock { background: var(--surface-2); color: var(--ink); border-top: 1px solid var(--line); }
  .dock .t { font: 500 30px var(--serif); letter-spacing: -1px; line-height: 1; }
  .dock .t small { display: block; font: 400 12px var(--sans); letter-spacing: 0; opacity: .7; margin-top: 4px; }
  .dock .cta { width: auto; margin: 0; padding: 0 26px; }
}
@media (max-width: 640px) {
  .packages { grid-template-columns: repeat(2, minmax(0,1fr)); } .pkg:last-child { grid-column: 1/-1; }
  .modules { grid-template-columns: 1fr; }
  .step span { display: none; } .step.active span { display: inline; }
  .tools .chipbtn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Application integration. Core studio styles above are copied from docs/mockup-studio.html. */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
a.wordmark { color: var(--ink); text-decoration: none; }
#builder, #saved, #message { grid-column: 1 / -1; min-width: 0; }
#message:empty { display: none; }
#message:not(:empty) { background: var(--accent-soft); border: 1px solid var(--line); padding: 14px 20px; border-radius: 12px; }
.studio-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 40px; align-items: start; }
.stage { min-width: 0; }
.pkg .badge { color: var(--bg); }
.studio-summary { min-width: 0; }
.search-wrap { display: block; max-width: 320px; margin: 0 0 18px; }
input, select, textarea { width: 100%; min-height: 52px; padding: 12px 14px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 400 16px/1.5 var(--sans); }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
label { display: block; font-size: 14px; font-weight: 500; }
textarea { resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.fields .full { grid-column: 1 / -1; }
.volume-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.stepper { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; overflow: hidden; }
.stepper button { flex: 0 0 44px; min-height: 52px; font-size: 20px; }
.stepper input { width: 0; min-width: 0; flex: 1; margin: 0; padding-inline: 0; text-align: center; border: 0; border-radius: 0; font-weight: 600; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mod { grid-template-rows: 1fr auto; }
.mod-body { padding-bottom: 20px; }
.mod-head { gap: 8px; }
.mod-head > span:first-child { min-width: 0; }
.tick { flex-shrink: 0; }
.mod-body:disabled { cursor: default; opacity: .65; }
.mod-foot { flex-wrap: wrap; gap: 8px; padding-inline: 16px; }
.mod-foot .price { font-size: 16px; }
.mod-foot .price small { font-size: 11px; white-space: nowrap; }
.qty output { min-width: 24px; }
button:disabled { cursor: default; opacity: .45; }
.rows li > span:first-child { min-width: 0; }
.rows li > span:last-child { flex-shrink: 0; }
.panel .total { overflow-wrap: anywhere; }
.form-section { margin-bottom: 30px; }
.form-section h2 { margin-top: 28px; }
summary { min-height: 48px; padding-block: 16px; cursor: pointer; font-size: 14px; color: var(--accent-text); }
.offer-summary { padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.offer-summary h2 { margin: 0 0 18px; }
.offer-summary h3 { font-size: 14px; margin-top: 26px; }
.offer-price { font: 500 40px/1.15 var(--serif); letter-spacing: -1px; }
.offer-price > span { display: block; font: 400 13px var(--sans); color: var(--muted); letter-spacing: 0; margin-top: 8px; }
dl { margin: 20px 0; }
dl > div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
.warning { font-size: 13px; line-height: 1.5; padding: 14px; background: #fff1d9; color: #775525; border-radius: 10px; }
dialog { width: min(540px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: 20px; padding: 28px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: #10131499; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.dialog-heading h2 { margin: 0; }
.dialog-heading .eyebrow { margin: 0 0 8px; }
.saved-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 28px; }
.saved-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.saved-card h2 { font: 500 24px var(--serif); text-transform: none; letter-spacing: 0; margin: 18px 0 8px; overflow-wrap: anywhere; }
.saved-card .eyebrow { margin: 0; }
.saved-card > strong { display: block; font: 500 30px var(--serif); margin: 20px 0; }
.saved-card small { font: 400 13px var(--sans); }
.saved-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.saved-actions button, .saved-actions a { display: inline-flex; align-items: center; min-height: 44px; background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 13px; text-decoration: none; }
.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 16px; padding: 25px; color: var(--muted); }
.empty-state h2 { margin-top: 0; }
.muted { color: var(--muted); }
.dock { flex-wrap: wrap; }
.dock > .warning { flex-basis: 100%; margin: 0; }
.dock .t { overflow-wrap: anywhere; min-width: 0; }
.login { display: block; width: min(440px,calc(100vw - 32px)); margin: 80px auto; padding: 30px; background: var(--surface); border-radius: 20px; }
.login h1 { margin-top: 35px; }
.login form { display: grid; gap: 12px; margin-top: 24px; }
.login input { width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 16px; }
.login input[name="code"] { letter-spacing: .2em; }
.login button { background: var(--ink); color: var(--bg); padding: 14px; min-height: 48px; border-radius: 12px; }
.print-page { background: var(--bg); }
.offer { max-width: 850px; margin: 35px auto; padding: 55px 65px; background: var(--surface); }
.offer-top { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 45px; font-size: 13px; }
.offer h1 { font-size: 36px; }
.offer h2 { margin-top: 28px; }
.offer table { width: 100%; border-collapse: collapse; font-size: 13px; }
.offer th, .offer td { text-align: left; border-bottom: 1px solid var(--line); padding: 14px 10px; }
.preserve { white-space: pre-wrap; }
@media (max-width:1100px) {
  .studio-layout { grid-template-columns: minmax(0,1fr); }
  .studio-summary { display: none; }
  .tools { margin-left: auto; }
  .volume-fields { max-width: 720px; }
  .saved-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px) {
  .topbar { gap: 16px; }
  .wordmark { font-size: 20px; }
  .wordmark small { font-size: 10px; }
  .chipbtn { padding-inline: 12px; }
  .journey { gap: 3px; }
  .step { padding-inline: 10px; }
  .fields, .volume-fields, .saved-grid { grid-template-columns: minmax(0,1fr); }
  .search-wrap { max-width: none; }
  .dock { padding-inline: 18px; gap: 12px; }
  .dock .cta { padding-inline: 18px; min-width: 120px; font-size: 14px; }
  .dock .t { font-size: 27px; }
  .dock .t small { font-size: 10px; }
  .offer-summary { padding: 20px; }
  .offer { margin: 0; padding: 28px; }
}
@media print {
  .print-page { background: white; }
  .offer { margin: 0; padding: 0; max-width: none; }
  .no-print { display: none; }
  table tr, dl > div { break-inside: avoid; }
  @page { size: A4; margin: 18mm; }
}
