/* Zerno customer portal, v2. Builds on /assets/shared/brand.css.
   Light pages like support.zerno.co, a black band for status like zerno.co,
   hairline frame lines and chamfered panels borrowed from fragment.ai. */

body.portal { background: var(--white); min-height: 100vh; display: flex; flex-direction: column; }
#app { flex: 1; display: flex; flex-direction: column; }
#app > main { flex: 1 0 auto; }
.boot { min-height: 60vh; background: var(--white); }

/* ---------- Columns. Hero and main share widths so the frame lines line up. */
.hero-inner, .shell { width: 100%; max-width: 768px; margin: 0 auto; padding-left: 24px; padding-right: 24px; position: relative; }
.hero.wide .hero-inner, .shell.wide { max-width: 1088px; }
.shell { padding-top: 8px; padding-bottom: 88px; }
.shell.stack-gap > * + * { margin-top: 16px; }
.shell > .card + .card { margin-top: 16px; }
@media (max-width: 820px) { .frame::before, .frame::after { display: none; } }
@media (max-width: 520px) { .hero-inner, .shell { padding-left: 16px; padding-right: 16px; } }

/* ---------- Site header (help center style) */
.site-head { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 2; }
.site-head.dark { background: var(--ink); border-bottom-color: var(--line-dark); }
.site-head-inner { max-width: 1088px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
@media (max-width: 520px) { .site-head-inner { padding: 0 16px; min-height: 56px; } }
.site-head .home { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.site-head .wordmark { height: 19px; }
.home-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); line-height: 19px; }
.site-head.dark .home-label { border-left-color: var(--line-dark); color: var(--muted-dark); }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-link { color: var(--ink); text-decoration: none; letter-spacing: .03em; }
.nav-link:hover { text-decoration: underline; }
.site-head.dark .nav-link { color: #fff; }
.nav-meta { display: inline-flex; align-items: center; gap: 16px; }
.site-head .chip.outline { color: var(--ink-3); }
.site-head.dark .chip.outline { color: #fff; }
@media (max-width: 640px) {
  .site-nav { gap: 14px; font-size: 13px; }
  .site-nav > .nav-link { display: none; }
  .home-label { display: none; }
}
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: none; cursor: pointer; letter-spacing: inherit; }
.linklike:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero (light by default) */
.hero { background: #fff; color: var(--text); position: relative; }
.hero .hero-inner { padding-top: 72px; padding-bottom: 48px; }
.hero.compact .hero-inner { padding-top: 48px; padding-bottom: 40px; }
.hero h1 { margin: 0 0 16px; max-width: 16ch; font-size: clamp(38px, 7vw, 57px); }
.hero.compact h1 { font-size: clamp(30px, 5vw, 44px); max-width: 22ch; }
.hero .lede { color: var(--muted); max-width: 52ch; font-size: 16px; line-height: 1.6; margin: 0; }
.hero .dial { margin-top: 40px; color: var(--ink); }
.hero.compact .dial { margin-top: 32px; }
.dial-labels span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .dial.many .dial-labels span:not(.current) { visibility: hidden; }
  .dial.many .dial-labels span.current { overflow: visible; }
  .hero .hero-inner { padding-top: 44px; }
  .hero.compact .hero-inner { padding-top: 32px; padding-bottom: 32px; }
}

/* Dark hero band: status pages */
.hero.dark { background: var(--ink); color: rgba(255, 255, 255, .78); }
.hero.dark .lede { color: var(--muted-dark); }
.hero.dark .hero-inner { padding-bottom: 88px; }
.hero.dark .dial { color: #fff; }
.status-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero.dark .chip.outline { color: #fff; }
.hero.dark .chip.bronze { background: var(--bronze); color: #fff; }
.status-main { padding-top: 0; }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.status-chips .chip.bronze { background: var(--bronze); color: #fff; border-color: var(--bronze); }

/* ---------- Panels */
.card { padding: 32px; }
@media (max-width: 520px) { .card { padding: 22px 18px; } }
.card h2 { font-size: 26px; font-weight: 400; margin-bottom: 8px; }
.card .form-title { margin: -2px 0 24px; }
.card .sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.card.dark { background: var(--ink-2); border-color: var(--ink-2); color: rgba(255, 255, 255, .8); }
.card.dark h2 { color: #fff; }
.card.dark .sub, .card.dark .muted { color: var(--muted-dark); }
.card.soft { background: var(--paper); border-color: var(--paper); }
.card .rule-title { margin-bottom: 20px; }

.form-error { color: var(--bad); font-size: 14px; margin: 14px 0 0; }
.form-error:empty { display: none; }
.flash { background: var(--warn-soft); color: var(--warn); padding: 12px 14px; font-size: 14px; margin-bottom: 16px; border-left: 2px solid var(--warn); }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.field-note { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }

.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.actions .btn-primary { min-width: 168px; }
.actions .btn-primary::after { content: '\2192'; }
.actions.end { justify-content: flex-end; }
form.card .btn-primary.btn-block { margin-top: 4px; }

/* ---------- Start */
.code-input { font-family: var(--mono); font-size: 26px !important; letter-spacing: .5em; text-align: center; padding-left: calc(14px + .25em) !important; min-height: 60px !important; }
.how { margin-top: 64px; }
.howto { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.how-tile { border: 1px solid var(--line-strong); padding: 22px 22px 24px; background: #fff; }
.how-tile .icon { color: var(--ink); }
.how-tile .n { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; }
.how-tile h3 { font-size: 20px; font-weight: 400; margin: 28px 0 6px; }
.how-tile p { color: var(--muted); font-size: 14px; margin: 0; }
@media (min-width: 720px) { .howto { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Choice tiles (outlined, like the help center playbook tiles) */
.choice-list { display: grid; gap: 16px; }
.choice {
  text-align: left; width: 100%; display: flex; flex-direction: column; align-items: flex-start; background: #fff;
  border: 1px solid var(--line-strong); padding: 24px; cursor: pointer; font: inherit; color: inherit; position: relative;
  transition: background .15s; min-height: 260px; letter-spacing: inherit;
}
.choice .icon { color: var(--ink); margin-bottom: 36px; }
.choice:hover { background: var(--paper); }
.choice[disabled] { cursor: not-allowed; border-color: var(--line); color: var(--muted); }
.choice[disabled] .icon, .choice[disabled] .choice-title { color: var(--muted); }
.choice[disabled]:hover { background: #fff; }
.choice-title { font-family: var(--display); font-size: 26px; font-weight: 400; color: var(--ink); line-height: 1.15; }
.choice-desc { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; flex: 1; }
.choice-foot { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 20px; }
.choice .arrow { font-size: 20px; color: var(--ink); transition: transform .15s; }
.choice[disabled] .arrow { visibility: hidden; }
.choice:not([disabled]):hover .arrow { transform: translateX(4px); }
@media (min-width: 640px) { .choice-list.two { grid-template-columns: 1fr 1fr; } }

/* ---------- Request list */
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.req-list li:first-child { border-top: 0; padding-top: 0; }
.req-list .grow { flex: 1; min-width: 0; }
.req-list .num { font-family: var(--mono); font-size: 13px; color: var(--ink); }

/* ---------- Items */
.item-row { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); cursor: pointer; }
.item-row:first-child { border-top: 0; padding-top: 0; }
.item-row > input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); flex: none; margin: 0; }
.item-thumb { width: 60px; height: 60px; background: var(--ink); color: #fff; flex: none; display: grid; place-items: center; overflow: hidden; font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: .02em; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb.light { background: var(--paper); color: var(--ink-3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 500; color: var(--ink); }
.item-sub { font-size: 13px; color: var(--muted); }
.item-row.is-disabled { cursor: not-allowed; }
.item-row.is-disabled .item-main, .item-row.is-disabled .item-thumb { opacity: .45; }
.stepper { display: inline-flex; align-items: center; border: 1px solid #c8c8c8; background: #fff; flex: none; }
.stepper button { width: 36px; height: 36px; border: 0; background: none; font: inherit; font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--paper); }
.stepper button[disabled] { color: var(--line); cursor: default; background: none; }
.stepper output { min-width: 26px; text-align: center; font-family: var(--mono); font-size: 14px; }

/* ---------- Radio rows */
.radio-list { display: grid; gap: 8px; }
.radio-row { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); padding: 14px 16px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; position: relative; }
.radio-row:hover { border-color: #9a9a9a; }
.radio-row:has(input:checked) { border-color: var(--ink); background: #fff; box-shadow: inset 3px 0 0 var(--bronze); }
.radio-row input { accent-color: var(--ink); width: 16px; height: 16px; margin: 3px 0 0; flex: none; }
.radio-row strong { display: block; font-weight: 500; color: var(--ink); }
.radio-row .radio-desc { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.radio-body { flex: 1; min-width: 0; display: block; }
.radio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.radio-amount { font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 560px) { .radio-list.two { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
div.field { margin-bottom: 20px; }
legend { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; padding: 0; }

/* ---------- Uploads */
.dropzone { display: block; position: relative; border: 1px dashed #b5b5b5; padding: 28px 16px; text-align: center; cursor: pointer; background: var(--paper); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--ink); background: #fff; }
.dropzone:focus-within { outline: 2px solid var(--bronze); outline-offset: 2px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone strong { display: block; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.dropzone strong::before { content: '+'; display: inline-block; margin-right: 8px; font-family: var(--mono); }
.dropzone span { font-size: 13px; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ink-2); color: #fff; display: grid; place-items: center; font-size: 11px; padding: 8px; text-align: center; word-break: break-word; white-space: pre-line; }
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.thumb .x { position: absolute; top: 0; right: 0; width: 28px; height: 28px; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; display: grid; place-items: center; }

/* ---------- Address */
.grid-2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
.privacy { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--muted); background: var(--paper); padding: 12px 14px; margin-top: 4px; }
.privacy::before { content: ''; flex: none; width: 14px; height: 8px; margin-top: 6px; border-top: 1.5px solid var(--bronze); border-bottom: 1.5px solid var(--bronze); }

/* ---------- Review */
.summary { margin: 0; }
.summary > div { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px; }
.summary > div:first-child { border-top: 0; padding-top: 0; }
.summary dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.summary dd { margin: 0; white-space: pre-line; color: var(--ink); }
@media (min-width: 560px) { .summary > div { grid-template-columns: 150px 1fr; gap: 16px; } .summary dt { padding-top: 3px; } }

/* ---------- Status: one calm column, same width as the request steps */
.status-stack { display: grid; gap: 16px; }
.status-stack > .card + .card { margin-top: 0; }
.steps.flush { margin-top: 0; }
.rule-title + .steps { border-top: 0; }
.rule-title + .steps li:first-child { padding-top: 4px; }
.status-help { font-size: 13px; color: var(--muted); margin: 8px 0 0; text-align: center; }
.status-help a { color: var(--ink); text-underline-offset: 3px; }
.resume-card .grow { flex: 1; min-width: 0; }
.resume-card .btn-row .btn { flex: 0 1 auto; }
.status-grid { display: grid; gap: 16px; }
.status-grid .col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.status-grid .col > .card + .card { margin-top: 0; }
@media (min-width: 880px) { .status-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }

.qr-card { border-color: var(--line-strong); }
.qr-wrap { background: #fff; border: 1px solid var(--line); padding: 20px; display: grid; place-items: center; margin: 20px 0 12px; position: relative; }
.qr-wrap::before, .qr-wrap::after { content: ''; position: absolute; width: 14px; height: 14px; border-color: var(--ink); border-style: solid; }
.qr-wrap::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.qr-wrap::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.qr-wrap img { width: min(100%, 300px); height: auto; display: block; image-rendering: pixelated; }
.code-big { font-family: var(--mono); font-size: clamp(22px, 6vw, 30px); letter-spacing: .18em; text-align: center; font-weight: 500; color: var(--ink); margin: 8px 0 0; word-break: break-all; }
.code-cap { text-align: center; font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.steps li::before { content: '0' counter(s); font-family: var(--mono); font-size: 11px; color: var(--bronze); letter-spacing: .08em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-child, .rule-title + .kv { border-top: 0; padding-top: 0; }
.kv .v { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.kv a.v { text-decoration: underline; text-underline-offset: 3px; }
.kv.total { border-top: 1px solid var(--ink); margin-top: 8px; padding-top: 14px; font-weight: 600; font-size: 16px; color: var(--ink); }
.kv.total .v { font-family: var(--display); font-size: 22px; font-weight: 500; }

.segmented { display: inline-flex; border: 1px solid var(--ink); margin-top: 16px; }
.segmented button { border: 0; background: #fff; font: inherit; font-size: 13px; font-weight: 500; letter-spacing: .04em; padding: 8px 16px; cursor: pointer; color: var(--ink-3); min-height: 38px; }
.segmented button + button { border-left: 1px solid var(--ink); }
.segmented button[aria-pressed=true] { background: var(--ink); color: #fff; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; font-size: 14px; color: var(--ink); padding: 12px 0 12px 22px; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; background: #fff; border: 1px solid var(--ink); }
.timeline li:first-child::before { top: 7px; }
.timeline li:last-child::before { background: var(--bronze); border-color: var(--bronze); }
.timeline time { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }

.mini-items { list-style: none; padding: 0; margin: 0; }
.mini-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.mini-items li:first-child { border-top: 0; padding-top: 0; }

.notice { display: flex; gap: 14px; align-items: flex-start; }
.notice .dot { flex: none; width: 8px; height: 8px; margin-top: 8px; background: var(--bronze); }
.notice h2 { margin-top: -2px; }

/* ---------- Footer (dark, like the help center) */
.site-foot { background: var(--ink); color: rgba(255, 255, 255, .75); margin-top: auto; padding: 56px 0 28px; }
.foot-inner { max-width: 1088px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
@media (max-width: 520px) { .foot-inner { padding: 0 16px; } }
.foot-brand .wordmark { height: 20px; margin-bottom: 16px; }
.foot-brand p { margin: 0; font-size: 14px; color: var(--muted-dark); max-width: 30ch; }
.foot-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.foot-links .eyebrow { margin-bottom: 4px; }
.foot-links a { color: #fff; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-base { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-dark); }
.foot-base { position: relative; }
.site-foot .foot-base { max-width: 1040px; padding-left: 0; padding-right: 0; }
@media (max-width: 1100px) { .site-foot .foot-base { margin-left: 24px; margin-right: 24px; } }
@media (max-width: 520px) { .site-foot .foot-base { margin-left: 16px; margin-right: 16px; } }

/* ---------- Small screens */
@media (max-width: 420px) {
  .actions .btn-primary { min-width: 0; flex: 1; }
  .choice { min-height: 0; }
  .choice .icon { margin-bottom: 24px; }
}

[tabindex="-1"]:focus { outline: none; }

/* ---------- Refund lines (several items) */
.refund-lines { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); font-size: 14px; }
.refund-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.refund-lines li .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.refund-lines li.sum { font-weight: 500; border-bottom: 0; }
