/* Racik Paket POS · ARSWORD
   Monochrome configurator: light and dark themes, full-width three-column layout on desktop,
   single column with a summary sheet on phones. */

:root {
  color-scheme: light;
  --canvas: #ffffff;
  --panel: #fafafa;
  --sunken: #f3f3f3;
  --field: #ffffff;
  --line: #e7e7e7;
  --line-strong: #cdcdcd;
  --ctl: #929292;
  --ink: #0a0a0a;
  --ink-2: #4a4a4a;
  --ink-3: #6b6b6b;
  --inverse: #0a0a0a;
  --inverse-hover: #2d2d2d;
  --on-inverse: #ffffff;
  --thumb: #ffffff;
  --thumb-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 3px 10px rgba(0, 0, 0, .07);
  --ring: rgba(10, 10, 10, .13);
  --flash: #e9e9e9;
  --scrim: rgba(0, 0, 0, .42);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, .14);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, .1), 0 14px 36px rgba(0, 0, 0, .16);

  --font: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: clamp(1.4rem, 1.05rem + .95vw, 1.875rem);
  --fs-3xl: clamp(2.125rem, 1.1rem + 2.9vw, 3.75rem);
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --topbar: 64px;
  --rail: 272px;
  --sum: 392px;
  --gutter: clamp(20px, 3.2vw, 64px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #000000;
    --panel: #0a0a0a;
    --sunken: #161616;
    --field: #0a0a0a;
    --line: #242424;
    --line-strong: #3b3b3b;
    --ctl: #5c5c5c;
    --ink: #ededed;
    --ink-2: #b2b2b2;
    --ink-3: #8e8e8e;
    --inverse: #ededed;
    --inverse-hover: #cfcfcf;
    --on-inverse: #0a0a0a;
    --thumb: #2e2e2e;
    --thumb-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    --ring: rgba(237, 237, 237, .2);
    --flash: #232323;
    --scrim: rgba(0, 0, 0, .66);
    --shadow-sheet: 0 0 0 1px #2a2a2a;
    --shadow-float: 0 2px 6px rgba(0, 0, 0, .5), 0 14px 36px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #000000;
  --panel: #0a0a0a;
  --sunken: #161616;
  --field: #0a0a0a;
  --line: #242424;
  --line-strong: #3b3b3b;
  --ctl: #5c5c5c;
  --ink: #ededed;
  --ink-2: #b2b2b2;
  --ink-3: #8e8e8e;
  --inverse: #ededed;
  --inverse-hover: #cfcfcf;
  --on-inverse: #0a0a0a;
  --thumb: #2e2e2e;
  --thumb-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  --ring: rgba(237, 237, 237, .2);
  --flash: #232323;
  --scrim: rgba(0, 0, 0, .66);
  --shadow-sheet: 0 0 0 1px #2a2a2a;
  --shadow-float: 0 2px 6px rgba(0, 0, 0, .5), 0 14px 36px rgba(0, 0, 0, .6);
}

@media (min-width: 1536px) { :root { --rail: 288px; --sum: 420px; } }
@media (max-width: 1279.98px) { :root { --rail: 236px; --sum: 344px; } }

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 20px);
  scrollbar-color: var(--line-strong) var(--canvas);
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 var(--fs-base)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img, svg { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p { margin: 0; }
::selection { background: var(--ink); color: var(--canvas); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
input, textarea { caret-color: var(--ink); }
.rail, .sum-scroll, textarea { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.num { font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
html.no-anim *, html.no-anim *::before, html.no-anim *::after { transition: none !important; }

.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--inverse); color: var(--on-inverse); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 2vw, 28px);
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 29px; height: 28px; }
.brand-name { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.brand-sep { color: var(--line-strong); font-size: 1.25rem; font-weight: 300; line-height: 1; }
.brand-product { color: var(--ink-2); font-size: var(--fs-md); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: transparent; color: var(--ink);
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--sunken); border-color: var(--line-strong); }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}

/* ---------- shell */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--sum);
  align-items: start;
}

/* ---------- left rail */
.rail {
  position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar));
  height: calc(100dvh - var(--topbar));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 28px 16px 40px;
  border-right: 1px solid var(--line);
}
.rail-progress { padding: 0 10px 4px; }
.rail-title { font-size: var(--fs-sm); color: var(--ink-3); }
.rail-count { margin: 6px 0 12px; font-size: var(--fs-md); color: var(--ink-2); }
.rail-count b { font-size: 1.625rem; font-weight: 600; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform .6s var(--ease); }
.rail-group {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 26px 0 6px; padding: 6px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; text-align: left;
  transition: background-color .15s, color .15s;
}
.rail-group:hover { background: var(--sunken); color: var(--ink); }
.rail-group.is-active { color: var(--ink); }
.rg-no {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--ctl); font-size: 11px; font-variant-numeric: tabular-nums;
}
.rail-group.is-active .rg-no { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.rail ul:not(.is-active) a { color: var(--ink-3); }
.rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.rail a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-radius: 10px;
  color: var(--ink-2); font-size: var(--fs-md); line-height: 1.3; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.rail a:hover { background: var(--sunken); color: var(--ink); }
.rail a[aria-current="true"] { background: var(--sunken); color: var(--ink); font-weight: 500; }
.ri-count { flex: none; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.ri-done { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--canvas); }
.ri-done .ico { width: 11px; height: 11px; stroke-width: 3; }

/* ---------- middle flow */
.flow { min-width: 0; padding: clamp(32px, 4vw, 72px) var(--gutter) 64px; container: flow / inline-size; }
.flow:focus { outline: none; }
.intro h1 {
  margin: 0; max-width: 17ch;
  font-size: var(--fs-3xl); font-weight: 600; line-height: 1.03; letter-spacing: -.04em;
  text-wrap: balance;
}
.lede { margin-top: 18px; max-width: 54ch; font-size: var(--fs-lg); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

.block { padding-top: clamp(56px, 5.5vw, 84px); scroll-margin-top: calc(var(--topbar) + 8px); }
.intro + .block { padding-top: clamp(40px, 4vw, 60px); }
.phrase {
  margin: 0 0 22px; max-width: 42ch;
  font-size: var(--fs-2xl); font-weight: 600; line-height: 1.2; letter-spacing: -.025em;
  color: var(--ink-3); text-wrap: balance;
}
.phrase b { color: var(--ink); font-weight: 600; }
.phrase.xl { font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem); letter-spacing: -.032em; line-height: 1.12; }
.loading { color: var(--ink-3); padding-top: 48px; }
.load-error { margin-top: 48px; padding: 24px; border: 1px solid var(--ink); border-radius: var(--r-lg); display: grid; gap: 16px; justify-items: start; }

/* step switch */
.steps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  max-width: 640px; margin-bottom: clamp(36px, 4vw, 56px); padding: 4px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--sunken);
}
.step {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 14px; border: 0; border-radius: 16px;
  background: transparent; color: var(--ink-2); text-align: left;
  transition: background-color .25s var(--ease), box-shadow .25s, color .2s;
}
.step:hover { color: var(--ink); }
.step[aria-current="step"] { background: var(--thumb); color: var(--ink); box-shadow: var(--thumb-shadow); }
.step-no {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--ctl); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .25s, border-color .25s, color .25s;
}
.step[aria-current="step"] .step-no { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.step[aria-current="step"] .step-txt small { color: var(--ink-2); }
.step-txt { display: grid; min-width: 0; line-height: 1.3; }
.step-txt b { font-size: var(--fs-md); font-weight: 600; }
.step-txt small { font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-next, .step-end { margin-top: clamp(64px, 7vw, 104px); padding-top: 48px; border-top: 1px solid var(--line); }
.step-next .phrase, .step-end .phrase { margin-bottom: 20px; }
.step-end-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.step-next .btn, .step-end-actions .btn { min-width: 260px; }

/* check mark shared by presets and feature tiles */
.check {
  display: grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--ctl); background: var(--canvas); color: transparent;
  transition: background-color .2s, border-color .2s, color .2s;
}
.check .ico { width: 14px; height: 14px; stroke-width: 2.6; transform: scale(.5); transition: transform .35s var(--ease); }
.on .check, [aria-pressed="true"] .check { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.on .check .ico, [aria-pressed="true"] .check .ico { transform: scale(1); }

/* presets */
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.preset {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name check" "price price" "desc desc";
  align-content: start; gap: 6px 12px;
  padding: 20px 20px 18px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--canvas);
  transition: border-color .2s, box-shadow .2s, transform .12s;
}
.preset:hover { border-color: var(--line-strong); }
.preset:active { transform: scale(.99); }
.preset[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.preset .check { grid-area: check; }
.pr-name { grid-area: name; font-size: var(--fs-lg); font-weight: 600; line-height: 1.35; }
.pr-price { grid-area: price; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; margin-top: 2px; }
.pr-price b { font-size: 1.625rem; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pr-price small { font-size: var(--fs-sm); color: var(--ink-3); }
.pr-desc { grid-area: desc; font-size: var(--fs-md); color: var(--ink-2); line-height: 1.45; }
.preset-note { margin-top: 14px; font-size: var(--fs-md); color: var(--ink-3); }

/* feature tiles: one per row; the inside re-flows with the width of the column */
.tiles { container: tiles / inline-size; display: grid; gap: 10px; }
.tile {
  position: relative;
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-areas: "check name price" ". desc desc" ". meta meta" ". ctl ctl";
  column-gap: 14px; row-gap: 6px; align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--canvas);
  transition: border-color .2s, box-shadow .2s, transform .12s;
}
.tile:hover { border-color: var(--line-strong); }
.tile.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tile:not(.has-ctl):not(.locked):active { transform: scale(.995); }
.tile:has(.tile-input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.tile-input { position: absolute; top: 20px; left: 20px; width: 20px; height: 20px; margin: 0; opacity: 0; pointer-events: none; }
.tile-input:focus-visible + .check { outline: 2px solid var(--ink); outline-offset: 2px; }
.tile > .check { grid-area: check; }
.tile-name { grid-area: name; font-weight: 600; line-height: 1.4; cursor: pointer; padding-top: 1px; }
.tile-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tile.locked .tile-name { cursor: default; }
.tile-price { grid-area: price; text-align: right; font-weight: 400; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.tile-price small { display: block; font-size: var(--fs-sm); color: var(--ink-3); }
.tile-desc { grid-area: desc; max-width: 68ch; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-2); }
.tile-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--ink-3); }
.tile-meta:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .ico { width: 14px; height: 14px; }
.qlink { position: relative; z-index: 1; color: var(--ink); font-weight: 500; text-decoration: none; }
.qlink:hover { text-decoration: underline; }
.tile:not(.on) .qlink { display: none; }
.tile-ctl { grid-area: ctl; position: relative; z-index: 1; margin-top: 6px; }
@container tiles (min-width: 760px) {
  .tile {
    grid-template-columns: 24px minmax(190px, 17rem) minmax(0, 1fr) minmax(7.5rem, auto);
    grid-template-areas: "check name desc price" ". meta desc price" ". . ctl ctl";
    column-gap: 24px; padding: 20px 24px;
  }
}
@container tiles (max-width: 440px) {
  .tile { grid-template-areas: "check name price" "desc desc desc" "meta meta meta" "ctl ctl ctl"; column-gap: 12px; padding: 16px; }
}

/* database tiers: a plain radio list inside the tile */
.tier { display: grid; gap: 2px; }
.tier-opt {
  position: relative;
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  min-height: 40px; margin: 0 -10px; padding: 6px 10px; border-radius: 10px;
  font-size: var(--fs-md); line-height: 1.35; cursor: pointer;
  transition: background-color .15s;
}
.tier-opt:hover { background: var(--sunken); }
.tier-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tier-dot { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ctl); transition: border-color .2s; }
.tier-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .3s var(--ease); }
.tier-opt input:checked ~ .tier-dot { border-color: var(--ink); }
.tier-opt input:checked ~ .tier-dot::after { transform: scale(1); }
.tier-opt input:checked ~ .tier-name { color: var(--ink); font-weight: 500; }
.tier-opt input:focus-visible ~ .tier-dot { outline: 2px solid var(--ink); outline-offset: 2px; }
.tier-name { color: var(--ink-2); }
.tier-price { font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; }

/* steppers (tile and summary) */
.slot-ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-md); color: var(--ink-2); }
.stepper {
  display: inline-flex; align-items: center; flex: none;
  padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--field);
}
.stepper button {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
  transition: background-color .15s, color .15s;
}
.stepper button:hover:not([aria-disabled="true"]) { background: var(--sunken); }
.stepper button[aria-disabled="true"] { color: var(--line-strong); cursor: default; }
.stepper .ico { width: 18px; height: 18px; }
.stepper input, .stepper output {
  width: 44px; padding: 0; border: 0; background: transparent;
  text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input:focus-visible { outline-offset: 1px; border-radius: 8px; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- questions */
.data { padding-top: 0; }
.data-note { max-width: 62ch; margin-top: -8px; font-size: var(--fs-md); color: var(--ink-2); }
.data-prog { display: none; margin-top: 8px; font-size: var(--fs-md); font-weight: 500; }
.req { margin-left: 3px; font-weight: 600; color: var(--ink); }
.qgroup { min-width: 0; margin: 40px 0 0; padding: 32px 0 0; border: 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--topbar) + 8px); }
.qgroup legend { float: left; width: 100%; padding: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.018em; line-height: 1.3; }
.qgroup legend + * { clear: both; }
.qg-meta { padding-top: 4px; font-size: var(--fs-md); color: var(--ink-3); }
/* each feature's questions: optional detail, a folded row until the visitor opens it (app.js) */
.qg-intro { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.qg-intro h3 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.018em; line-height: 1.3; }
.qg-intro p { margin-top: 6px; max-width: 62ch; font-size: var(--fs-md); color: var(--ink-2); }
.qg-intro + .qgroup.is-optional { margin-top: 20px; }
.qg-bar { clear: both; display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.qgroup.is-optional { margin-top: 0; padding: 18px 0; }
.qgroup.is-optional legend { font-size: var(--fs-lg); }
.qgroup.is-optional.is-open { padding-bottom: 28px; }
.qg-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-md); font-weight: 600; cursor: pointer; transition: background-color .2s, border-color .2s;
}
.qg-toggle:hover { background: var(--sunken); border-color: var(--ink-3); }
.qg-toggle .ico { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.qg-toggle[aria-expanded="true"] .ico { transform: rotate(180deg); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); align-items: start; gap: 26px 20px; margin-top: 22px; }
.q { display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin: 120px; }
.q.wide { grid-column: 1 / -1; }
.q-label { font-size: var(--fs-md); font-weight: 500; line-height: 1.4; }
.opt-tag { margin-left: 8px; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
.hint { margin-top: -2px; font-size: var(--fs-sm); color: var(--ink-3); }
.field {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--field); color: var(--ink);
  font-size: 1rem; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s;
}
.field:hover { border-color: var(--ink-3); }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ring); }
.field::placeholder { color: var(--ink-3); }
textarea.field { min-height: 104px; resize: vertical; }
.q.wide .field { max-width: 760px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 9px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-size: var(--fs-md); line-height: 1.3; cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
}
.pill span:hover { border-color: var(--ink-3); }
.pill input:checked + span { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.q-error { display: none; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; }
.q-error .ico { width: 16px; height: 16px; }
.q.missing .q-error { display: flex; }
.q.missing .field { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.q.missing .pill span { border-color: var(--ink); }
/* "Lainnya": a text field slides in under the pills */
.q-other { display: grid; gap: 6px; max-width: 420px; margin-top: 4px; animation: other-in .35s var(--ease); }
@keyframes other-in { from { transform: translateY(-4px); } }
.q-other-label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.q.missing-other .q-error { display: flex; }
.q.missing-other .q-other .field { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.form-end { margin-top: 44px; }
.text-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 0;
  border: 0; background: none; color: var(--ink-2); font-size: var(--fs-md);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px;
}
.text-btn:hover { color: var(--ink); text-decoration-color: currentColor; }
.text-btn.armed { color: var(--ink); font-weight: 600; text-decoration-color: currentColor; }

/* footer */
.site-foot {
  display: flex; align-items: center; gap: 20px;
  margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line);
  font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.7;
}
.foot-logo { display: block; flex: none; width: 88px; padding: 4px; margin: -4px; border-radius: 8px; color: var(--ink); }
.foot-logo svg { width: 100%; height: auto; aspect-ratio: 690.5 / 345; }
.site-foot a { color: var(--ink-2); }
.site-foot a:hover { color: var(--ink); }

/* ---------- summary */
.summary {
  position: sticky; top: var(--topbar);
  height: calc(100vh - var(--topbar));
  height: calc(100dvh - var(--topbar));
  display: flex; flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.sheet-handle, .sheet-close { display: none; }
.sum-head {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 10px;
  padding: 22px 24px 16px;
}
.sum-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.018em; }
.sum-badge {
  padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
}
.sum-meta { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--ink-3); overflow-wrap: anywhere; }
.sum-controls { display: grid; gap: 12px; padding: 0 24px 18px; border-bottom: 1px solid var(--line); }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--fs-md); color: var(--ink-2); }
.seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--sunken);
}
.seg label { position: relative; display: block; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; padding: 8px 14px; border-radius: var(--r-pill);
  font-size: var(--fs-md); font-weight: 500; text-align: center; color: var(--ink-2); cursor: pointer;
  transition: background-color .25s var(--ease), color .25s, box-shadow .25s;
}
.seg input:checked + span { background: var(--thumb); color: var(--ink); box-shadow: var(--thumb-shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 1px; }

.sum-scroll { flex: 1 1 auto; min-height: 96px; overflow-y: auto; overscroll-behavior: contain; padding: 16px 24px 20px; }
.sum-scroll.more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
}
.lines-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: var(--fs-sm); color: var(--ink-3); }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; justify-content: space-between; gap: 16px; margin: 0 -8px; padding: 6px 8px; border-radius: 8px; font-size: var(--fs-md); line-height: 1.4; }
.line span:first-child { color: var(--ink-2); }
.line span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.line.fresh { animation: fresh 1.2s var(--ease); }
@keyframes fresh { from { background-color: var(--flash); } to { background-color: transparent; } }
.missing-box { margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--ink); border-radius: var(--r-md); background: var(--canvas); }
.mb-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-md); font-weight: 600; }
.mb-title .ico { width: 18px; height: 18px; }
.missing-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.linkbtn {
  padding: 4px 0; border: 0; background: none; text-align: left;
  font-size: var(--fs-md); line-height: 1.4; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px;
}
.linkbtn:hover { text-decoration-color: currentColor; }
.linkbtn small { color: var(--ink-3); font-size: var(--fs-sm); }
.preview { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.preview summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.preview summary::-webkit-details-marker { display: none; }
.preview summary::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); }
.preview[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.preview summary:hover { color: var(--ink); }
.preview textarea {
  display: block; width: 100%; min-height: 220px; margin-top: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); color: var(--ink-2);
  font: 400 12.5px/1.6 var(--mono); resize: vertical;
}
.fine { margin-top: 14px; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-3); }

.sum-foot { margin-top: auto; background: var(--panel); }
.sum-total { padding: 16px 24px 6px; border-top: 1px solid var(--line); }
.t-row { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; font-size: var(--fs-md); color: var(--ink-2); }
.t-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; }
.t-main span { font-size: var(--fs-md); color: var(--ink-2); }
.t-main strong { font-size: clamp(2rem, 1.3rem + 1.1vw, 2.625rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.t-alt { margin-top: 6px; text-align: right; font-size: var(--fs-sm); color: var(--ink-3); }

.sum-actions { display: grid; gap: 10px; padding: 12px 24px 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: var(--fs-base); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, transform .12s;
}
.btn:active { transform: scale(.985); }
.btn .ico { width: 19px; height: 19px; }
.btn.primary { background: var(--inverse); color: var(--on-inverse); }
.btn.primary:hover { background: var(--inverse-hover); }
.btn.secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.secondary:hover { background: var(--sunken); border-color: var(--ink-3); }
.sum-actions.has-wa { grid-template-columns: 1fr 1fr; }
.sum-actions.has-wa > :not(#btn-copy):not(#btn-dl) { grid-column: 1 / -1; }
.sum-actions.has-wa .btn.secondary, .sum-actions.has-wa #btn-copy { min-height: 46px; padding: 0 12px; font-size: var(--fs-md); }
.status { min-height: 1.4em; font-size: var(--fs-sm); font-weight: 500; text-align: center; }
.status:empty { display: none; }
.send-note { font-size: var(--fs-sm); color: var(--ink-3); text-align: center; }

@media (min-width: 1024px) {
  #r-foot { display: none; }
}
@media (min-width: 1024px) and (max-height: 860px) {
  .sum-head { padding: 12px 24px 8px; row-gap: 0; }
  .sum-head h2 { font-size: var(--fs-lg); }
  .sum-controls { gap: 6px; padding-bottom: 10px; }
  .sum-controls .stepper { padding: 2px; }
  .sum-controls .stepper button { width: 30px; height: 30px; }
  .seg span { padding: 5px 12px; }
  .sum-scroll { padding-top: 10px; padding-bottom: 12px; }
  .line { padding-top: 5px; padding-bottom: 5px; }
  .sum-total { padding-top: 10px; }
  .t-main { margin-top: 4px; }
  .t-main strong { font-size: 2rem; }
  .sum-actions { gap: 6px; padding: 8px 24px 12px; }
  .sum-actions .btn { min-height: 44px; }
}

/* ---------- toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  display: flex; align-items: flex-start; gap: 10px;
  width: max-content; max-width: min(460px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 14px;
  background: var(--inverse); color: var(--on-inverse);
  font-size: var(--fs-md); line-height: 1.45;
  box-shadow: var(--shadow-float);
  transform: translateX(-50%);
  animation: toast-in .35s var(--ease);
}
.toast .ico { width: 18px; height: 18px; margin-top: 1px; }
@keyframes toast-in { from { transform: translate(-50%, 10px); } }

/* ---------- mobile summary sheet */
.bottombar, .scrim { display: none; }
@media (max-width: 1023.98px) {
  :root { --topbar: 56px; --gutter: 18px; }
  .shell { display: block; }
  .rail { display: none; }
  .flow { padding-top: 32px; padding-bottom: 132px; }
  .data-prog { display: block; }

  .summary {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 60;
    height: auto; max-height: min(92dvh, 860px);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-sheet);
    transform: translateY(calc(100% + 32px)); visibility: hidden;
    transition: transform .5s var(--ease), visibility 0s linear .5s;
  }
  .summary.open { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
  .summary { overflow-y: auto; overscroll-behavior: contain; }
  .summary > * { flex-shrink: 0; }
  .sum-head { position: sticky; top: 0; z-index: 2; padding-top: 10px; background: var(--panel); box-shadow: 0 1px 0 var(--line); }
  .sheet-handle { display: block; grid-column: 1 / -1; justify-self: center; width: 40px; height: 5px; margin-bottom: 6px; border-radius: 3px; background: var(--line-strong); }
  .sheet-close { display: inline-grid; }
  .sum-controls { padding-top: 16px; }
  .sum-scroll { overflow: visible; min-height: 0; }
  .sum-scroll.more { -webkit-mask-image: none; mask-image: none; }
  .sum-foot { position: sticky; bottom: 0; z-index: 2; }
  .sum-foot::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 32px; pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--panel));
  }
  .sum-total { padding-top: 12px; }
  .t-main { margin-top: 6px; }
  .sum-actions { gap: 8px; padding-top: 10px; }
  .sum-actions .btn { min-height: 48px; }
  .sum-actions { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

  .bottombar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--canvas); border-top: 1px solid var(--line);
  }
  .bb-info { min-width: 0; }
  .bb-total { display: block; font-size: 1.25rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; white-space: nowrap; }
  .bb-sub { display: block; font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bb-open { min-height: 46px; padding: 0 18px 0 20px; gap: 6px; }
  .bb-open .ico { width: 18px; height: 18px; }

  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--scrim); opacity: 0; transition: opacity .35s; }
  .scrim.show { opacity: 1; }
  html.sheet-open { overflow: hidden; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

@container flow (max-width: 600px) {
  .presets { grid-template-columns: 1fr; gap: 10px; }
  .preset {
    grid-template-columns: auto 1fr auto; grid-template-areas: "check name price" "check desc price";
    align-items: center; gap: 2px 14px; padding: 16px;
  }
  .preset .check { align-self: center; }
  .pr-price { flex-direction: column; align-items: flex-end; gap: 0; margin: 0; text-align: right; }
  .pr-price b { font-size: 1.25rem; }
  .pr-price small { font-size: .75rem; }
  .pr-desc { font-size: var(--fs-sm); }
}
@media (max-width: 639.98px) {
  .presets { grid-template-columns: 1fr; gap: 10px; }
  .preset {
    grid-template-columns: auto 1fr auto; grid-template-areas: "check name price" "check desc price";
    align-items: center; gap: 2px 14px; padding: 16px;
  }
  .preset .check { align-self: center; }
  .pr-price { flex-direction: column; align-items: flex-end; gap: 0; margin: 0; text-align: right; }
  .pr-price b { font-size: 1.25rem; }
  .pr-price small { font-size: .75rem; }
  .pr-desc { font-size: var(--fs-sm); }
  .site-foot { align-items: flex-start; }
}
@media (max-width: 639.98px) {
  .step-next .btn, .step-end-actions .btn { width: 100%; min-width: 0; }
  .step { gap: 10px; padding: 9px 10px; }
}
@media (max-width: 419.98px) {
  .brand-sep, .brand-product { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .summary, .summary.open, .summary * { transition: none !important; }
}

@media print {
  .masthead, .topbar, .rail, .bottombar, .scrim, .toast, .sum-actions, .sheet-close { display: none !important; }
  .shell { display: block; }
  .summary { position: static; height: auto; border: 0; }
}
