/* Mesquite & Iron intake desk. Desk grey, white paper, ballpoint-blue reviewer ink, highlighter for extraction. */
:root {
  color-scheme: light;
  --desk: #E3E6EB;
  --desk-2: #D6DAE1;
  --rail: #EEF0F3;
  --paper: #FFFFFF;
  --ink: #141821;
  --ink-2: #353C4A;
  --muted: #5E6778;
  --faint: #8A93A3;
  --line: #CDD3DC;
  --line-2: #E4E7EC;
  --accent: #2340D9;
  --accent-ink: #1A30A8;
  --accent-soft: #E9EDFF;
  --hl: #FFE77A;
  --hl-on: #FFD02B;
  --warn: #8F4E00;
  --warn-line: #E2A54B;
  --warn-soft: #FFF4E2;
  --risk: #B4302A;
  --risk-soft: #FCECEA;
  --ok: #17704A;
  --ok-soft: #E3F2EA;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "Spline Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --mast: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--mast) + 8px); }
body { margin: 0; background: var(--desk); color: var(--ink); font: 16px/1.55 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background-color .18s, border-color .18s, transform .12s; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-ink); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #262C38; }
.btn--quiet { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn--quiet:hover { border-color: var(--ink-2); }
.btn--sm { min-height: 38px; padding: 0 13px; font-size: 14px; border-radius: 9px; }
.btn--big { min-height: 54px; font-size: 16.5px; width: 100%; border-radius: 12px; }
.btn .ic { width: 17px; height: 17px; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 10px; color: var(--muted); }
.iconbtn:hover { background: var(--desk); color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 2px; }
.linkbtn .ic { width: 15px; height: 15px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font: 600 11.5px/1 var(--mono); letter-spacing: .01em; white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; }
.chip--new { background: var(--ink); color: #fff; }
.chip--warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px #F0D2A4; }
.chip--ready { background: var(--accent-soft); color: var(--accent-ink); }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--quiet { background: var(--desk); color: var(--ink-2); }
.chip--lock { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

/* Demo pill */
.demo-pill { position: fixed; z-index: 60; display: flex; align-items: center; gap: 2px; background: rgba(20, 24, 33, .92); color: #fff; border-radius: 999px; padding: 0 0 0 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: .78rem; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); }
.demo-pill[hidden] { display: none; }
.demo-pill__link { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; }
.demo-pill .pvt-book { display: inline-flex; align-items: center; min-height: 44px; }
body .pvt-band a.pvt-home, body .pvt-band a.pvt-mail { display: inline-flex; align-items: center; min-height: 44px; }
.demo-pill__link:hover { text-decoration: underline; }
.demo-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hl); box-shadow: 0 0 0 3px rgba(255, 231, 122, .25); }
.demo-pill__close { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #C9CEDA; display: grid; place-items: center; }
.demo-pill__close::before { content: ""; position: absolute; inset: -6px; }
.demo-pill__close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.demo-pill__close .ic { width: 14px; height: 14px; }
@media (min-width: 1100px) { .demo-pill { left: 20px; bottom: 20px; transform: none; } }
.demo-pill__mini { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 14px; border: 0; background: transparent; color: #fff; font: inherit; font-weight: 600; }
@media (min-width: 1100px) {
  body.pill-mini .demo-pill:not(.is-open) { padding: 0; }
  body.pill-mini .demo-pill:not(.is-open) > :not(.demo-pill__mini) { display: none; }
  body.pill-mini .demo-pill:not(.is-open) .demo-pill__mini { display: inline-flex; }
}
@media (max-width: 1099px) { body.in-desk .demo-pill { display: none; } }

/* Masthead */
.mast { position: sticky; top: 0; z-index: 50; height: var(--mast); display: flex; align-items: center; gap: 20px; padding: 0 max(16px, env(safe-area-inset-left)); background: rgba(227, 230, 235, .9); backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand__mark { width: 34px; height: 34px; flex: none; display: block; }
.brand__mark svg { width: 100%; height: 100%; display: block; }
.brand__mark rect { fill: var(--ink); }
.brand__mark path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand__txt strong { font-size: 17px; font-weight: 800; letter-spacing: -.015em; }
.brand__txt span { font: 500 11px/1.3 var(--mono); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.mast__nav { display: none; gap: 2px; margin-left: 8px; }
.mast__nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 9px; }
.mast__nav a:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.gate { margin-left: auto; display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 10px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); min-height: 40px; }
.gate .ic { width: 17px; height: 17px; color: var(--ink-2); }
.gate__txt { display: flex; flex-direction: column; line-height: 1.15; }
.gate__txt strong { font-size: 12.5px; }
.gate__txt span { font: 500 11px/1.2 var(--mono); color: var(--muted); }
.gate__txt span span { white-space: nowrap; }
.gate.has-q { box-shadow: inset 0 0 0 1.5px var(--accent); }
.gate.has-q .ic { color: var(--accent); }
.mast__reset span { display: none; }
.mast__reset { padding: 0; width: 44px; }
@media (min-width: 720px) { .mast__reset span { display: inline; } .mast__reset { width: auto; padding: 0 14px; } .mast__nav { display: flex; } }
@media (max-width: 420px) { .gate__txt strong { display: none; } .gate { padding: 6px 10px; } .brand__txt span { display: none; } }

/* Intro */
.intro { padding: clamp(28px, 4.2vw, 56px) clamp(16px, 3vw, 40px) clamp(22px, 3vw, 34px); }
.intro__in { max-width: 1240px; }
.eyebrow { font: 600 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.intro h1 { font-size: clamp(29px, 3.6vw, 50px); line-height: 1.04; letter-spacing: -.03em; font-weight: 750; max-width: 22ch; }
.intro h1 br { display: none; }
@media (min-width: 900px) { .intro h1 { max-width: none; } .intro h1 br { display: inline; } }
.intro__lede { margin-top: 16px; max-width: 64ch; font-size: clamp(16px, 1.25vw, 18px); color: var(--ink-2); }
.intro__lede strong { color: var(--ink); }
.h-short { display: none; }
.intro__act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.intro__note { font: 500 12px var(--mono); color: var(--muted); }
@media (max-width: 1099px) {
  .intro { padding-top: 22px; padding-bottom: 20px; }
  .h-long { display: none; }
  .h-short { display: inline; }
  .intro h1 { font-size: clamp(27px, 7vw, 40px); max-width: 16ch; }
  .intro__lede { margin-top: 10px; font-size: 15.5px; }
  .eyebrow { margin-bottom: 10px; }
  .intro__act { margin-top: 14px; }
  .intro__act .btn { flex: 1 1 auto; }
}

/* ============ Desk ============ */
.desk { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--desk); }
.msteps { display: none; }
.rail { background: var(--rail); display: flex; flex-direction: column; min-height: 0; }
.rail__head { padding: 18px 16px 12px; }
.rail__foot { padding: 10px 12px 76px; border-top: 1px solid var(--line); }
.rail__paste { width: 100%; border-style: dashed; }
.dt-short { display: none; }
.g-short { display: none; }
.only-step { display: none; }
@media (max-width: 560px) { .g-long { display: none; } .g-short { display: inline; } }
.rail__title { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.rail__date { font: 500 11.5px/1.35 var(--mono); color: var(--muted); margin-top: 3px; }
.seg { display: flex; gap: 4px; margin: 0 16px 10px; padding: 3px; background: var(--desk); border-radius: 10px; }
.seg button { flex: 1; min-height: 36px; border: 0; background: transparent; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 33, .12); }
.seg em { font: 500 12px var(--mono); color: var(--muted); font-style: normal; margin-left: 3px; }
.queue { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.qi { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; width: 100%; text-align: left; padding: 12px 12px 13px 14px; border: 0; border-radius: 10px; background: transparent; margin-bottom: 2px; }
.qi:hover { background: rgba(255, 255, 255, .6); }
.qi[aria-current="true"] { background: var(--paper); box-shadow: 0 1px 2px rgba(20, 24, 33, .08), 0 0 0 1px var(--line-2); }
.qi[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--accent); }
.qi__top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.qi__from { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi--new .qi__from::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 7px; vertical-align: 2px; }
.qi__time { font: 500 11.5px var(--mono); color: var(--muted); flex: none; }
.qi__subj { grid-column: 1 / -1; display: flex; gap: 6px; align-items: flex-start; font-size: 14px; font-weight: 550; color: var(--ink); line-height: 1.3; }
.qi__kind { width: 15px; height: 15px; margin-top: 1px; color: var(--muted); }
.qi__snip { grid-column: 1 / -1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .chip { justify-self: start; margin-top: 5px; }
.qi__att { grid-column: 2; grid-row: 4; align-self: end; display: inline-flex; gap: 3px; align-items: center; font: 500 11px var(--mono); color: var(--muted); }
.qi__att .ic { width: 13px; height: 13px; }
.qempty { margin: 12px 8px; padding: 22px 18px; border: 1.5px dashed var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.qempty strong { color: var(--ink); font-size: 15px; }

/* Source / paper */
.source { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.source__bar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--desk); min-height: 56px; }
.doctabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; }
.doctabs button, .doctabs__one { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.doctabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 33, .12); }
.doctabs .ic { width: 16px; height: 16px; }
.source__scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 22px 22px 60px; scroll-behavior: auto; }
.sheet { position: relative; overflow: hidden; background: var(--paper); max-width: 680px; margin: 0 auto 18px; padding: 34px 40px 38px; border-radius: 3px; box-shadow: 0 1px 1px rgba(20, 24, 33, .05), 0 14px 34px -14px rgba(20, 24, 33, .28); }
.mh { border-bottom: 1px solid var(--line-2); padding-bottom: 16px; margin-bottom: 18px; }
.mh__subj { font-size: 21px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; margin-bottom: 12px; }
.mh__dl { display: grid; grid-template-columns: 76px 1fr; gap: 3px 10px; margin: 0; font-size: 13.5px; }
.mh__dl dt { font: 600 10.5px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.mh__dl dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.mh__att { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.attach { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: #FAFBFC; text-align: left; }
.attach:hover { border-color: var(--accent); }
.attach .ic { width: 26px; height: 26px; color: var(--risk); stroke-width: 1.5; }
.attach strong { display: block; font-size: 13.5px; }
.attach small { font: 500 11px var(--mono); color: var(--muted); }
.mb { font-family: var(--serif); font-size: 17px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; color: #1C2029; }
.fwd { margin-top: 22px; padding: 14px 0 0 16px; border-left: 3px solid var(--line); }
.fwd__tag { display: flex; align-items: center; gap: 6px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 8px; }
.fwd__tag .ic { width: 14px; height: 14px; }
.fwd__head { font: 12.5px/1.6 var(--mono); color: var(--muted); white-space: pre-wrap; margin-bottom: 12px; overflow-wrap: anywhere; }
.sheet--reply { border-top: 3px solid var(--accent); }
.reply__tag { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 650; font-size: 14px; margin-bottom: 12px; }
.reply__tag span { font: 500 11px var(--mono); color: var(--muted); }
.reply__tag .ic { color: var(--accent); }

/* Work-request form (PDF preview) */
.pdfbar { max-width: 680px; margin: 0 auto 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 500 12px var(--mono); color: var(--muted); flex-wrap: wrap; }
.pdfbar span { display: inline-flex; align-items: center; gap: 6px; }
.pdfbar .ic { width: 15px; height: 15px; }
.pdfbar a { font: 600 13px var(--ui); min-height: 36px; display: inline-flex; align-items: center; }
.sheet--form { padding: 32px 34px 26px; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; }
.wf__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.wf__org { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #4A4F59; }
.wf__title { font-size: 23px; font-weight: 700; letter-spacing: -.01em; margin-top: 6px; }
.wf__note { font-size: 10.5px; color: #8A8F99; margin-top: 4px; }
.wf__no { border: 1.2px solid #1F232B; padding: 7px 12px 8px; min-width: 128px; }
.wf__no span { display: block; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #4A4F59; }
.wf__no strong { font-size: 17px; }
.wf__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-top: 1.2px solid #1F232B; border-left: 1.2px solid #1F232B; }
.wf__box2 { border-right: 1.2px solid #1F232B; border-bottom: 1.2px solid #1F232B; padding: 7px 9px 11px; min-height: 58px; min-width: 0; }
.wf__box2.tall { min-height: 104px; }
.s4 { grid-column: span 4; } .s3 { grid-column: span 3; } .s5 { grid-column: span 5; } .s7 { grid-column: span 7; } .s12 { grid-column: span 12; }
.wf__l { display: block; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5A5F69; margin-bottom: 5px; }
.wf__v { display: block; font-size: 15px; line-height: 1.45; color: #111; overflow-wrap: anywhere; }
.wf__checks { display: flex; flex-wrap: wrap; gap: 6px 30px; padding-top: 3px; }
.wf__ck { display: inline-flex; align-items: center; gap: 8px; }
.wf__box { width: 15px; height: 15px; border: 1.2px solid #1F232B; display: inline-grid; place-items: center; flex: none; }
.wf__box .ic { width: 14px; height: 14px; stroke-width: 2.6; color: #111; }
.wf__foot { font-size: 10.5px; color: #8A8F99; margin-top: 12px; }

/* Highlights */
mark.m { color: inherit; background-color: transparent; background-image: linear-gradient(var(--hl), var(--hl)); background-repeat: no-repeat; background-position: 0 0; background-size: 0% 100%; border-radius: 2px; padding: 0 1px; margin: 0 -1px; cursor: pointer; transition: background-size .5s var(--ease), box-shadow .2s; }
mark.m.lit { background-size: 100% 100%; }
mark.m:hover { box-shadow: inset 0 -2px 0 rgba(35, 64, 217, .45); }
mark.m.on { background-image: linear-gradient(var(--hl-on), var(--hl-on)); background-size: 100% 100%; box-shadow: inset 0 -2px 0 var(--accent); }
mark.m.flash { animation: flash .9s var(--ease); }
@keyframes flash { 0%, 100% { outline: 0 solid rgba(35, 64, 217, 0); } 30% { outline: 3px solid rgba(35, 64, 217, .45); outline-offset: 2px; } }
.sheet.scanning::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; background: linear-gradient(to bottom, rgba(35, 64, 217, 0), rgba(35, 64, 217, .08)); border-bottom: 2px solid rgba(35, 64, 217, .7); animation: scan .6s var(--ease) forwards; }
@keyframes scan { from { transform: translateY(-100px); } to { transform: translateY(calc(var(--h, 900px))); opacity: .2; } }

/* Thread */
.thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: visible; opacity: 0; transition: opacity .2s; }
.thread.is-on { opacity: 1; }
.thread path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 600; stroke-dashoffset: 0; }
.thread.is-on path { animation: draw .5s var(--ease); }
@keyframes draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.thread circle { fill: var(--paper); stroke: var(--accent); stroke-width: 1.6; }

/* Ticket */
.ticket { background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ticket__bar { display: none; }
.ticket__in { flex: 1; overflow-y: auto; min-height: 0; }
.tk__head { position: sticky; top: 0; z-index: 3; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); padding: 18px 24px 0; border-bottom: 1px solid var(--line-2); }
.tk__kicker { font: 500 11.5px/1.4 var(--mono); color: var(--muted); }
.tk__title { font-size: 21px; line-height: 1.2; letter-spacing: -.02em; font-weight: 750; margin: 5px 0 12px; }
.stages { display: flex; gap: 2px; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
.stages::-webkit-scrollbar { display: none; }
.stage { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border: 0; background: none; font-weight: 650; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.stage::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px; background: transparent; }
.stage[aria-selected="true"] { color: var(--ink); }
.stage[aria-selected="true"]::after { background: var(--ink); }
.stage[disabled] { opacity: .45; cursor: not-allowed; }
.stage__n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11.5px var(--mono); box-shadow: inset 0 0 0 1.5px currentColor; }
.stage.is-done .stage__n { background: var(--ink); color: #fff; box-shadow: none; }
.stage.is-done .stage__n .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.stage.is-warn .stage__n { color: var(--warn); }
.stage--log { margin-left: auto; }
.stage--log .ic { width: 17px; height: 17px; }
.stage__b { font: 600 11px var(--mono); font-style: normal; background: var(--warn-soft); color: var(--warn); padding: 2px 6px; border-radius: 5px; }
.tk__body { padding: 18px 24px 90px; }
.tk__sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14.5px; }
.tk__sum .ok { display: inline-flex; gap: 5px; align-items: center; color: var(--ok); font-weight: 600; }
.tk__hint { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.tk__foot { display: flex; justify-content: flex-end; margin-top: 20px; }
.sec { font-size: 13px; font-weight: 700; letter-spacing: .01em; color: var(--ink); margin: 0 0 10px; padding: 0; }
.sec__s { font-weight: 500; color: var(--muted); margin-left: 6px; }

/* Field rows */
.fields { border-top: 1px solid var(--line-2); }
.fr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; border-bottom: 1px solid var(--line-2); transition: background-color .2s; }
.fr::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: transparent; }
.fr__pick { display: grid; grid-template-columns: 148px minmax(0, 1fr); grid-template-areas: "l v" "l m" "l n"; gap: 2px 14px; text-align: left; border: 0; background: none; padding: 11px 6px 11px 12px; min-height: 52px; width: 100%; }
.fr__l { grid-area: l; font: 600 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 2px; }
.fr__l i { display: block; font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--faint); font-size: 10.5px; }
.fr__v { grid-area: v; font-size: 15.5px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; font-weight: 500; }
.fr__v em { font-style: normal; color: var(--warn); font-weight: 600; }
.fr__m { grid-area: m; display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.fr__mt { font: 500 11.5px var(--mono); color: var(--muted); }
.fr__note { grid-area: n; font-size: 13px; color: var(--warn); margin-top: 3px; line-height: 1.4; }
.conf { width: 44px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; flex: none; }
.conf b { display: block; height: 100%; width: calc(var(--c) * 100%); background: var(--ink-2); border-radius: 2px; transition: width .6s var(--ease); }
.fr__edit { margin-top: 4px; }
.fr:hover { background: #FAFBFC; }
.fr.is-on { background: var(--accent-soft); }
.fr.is-on::before { background: var(--accent); }
.fr--warn::before, .fr--miss::before { background: var(--warn-line); }
.fr--warn .conf b { background: var(--warn-line); }
.fr--rev .conf b { background: var(--accent); }
.fr--rev .fr__mt { color: var(--accent-ink); }
.fr--miss { background: var(--warn-soft); }
.fr--empty .fr__v em { color: var(--faint); }
.fr.is-pending .fr__v, .fr.is-pending .fr__m, .fr.is-pending .fr__note { opacity: 0; }
.fr.is-pending .fr__pick::after { content: ""; position: absolute; left: 174px; top: 16px; width: 40%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), #F4F5F7, var(--line-2)); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
.fr.is-arrive .fr__v, .fr.is-arrive .fr__m, .fr.is-arrive .fr__note { animation: arrive .4s var(--ease) both; }
.fr.is-arrive { animation: rowflash 1s var(--ease); }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes rowflash { 0% { background: rgba(255, 231, 122, .55); } 100% { background: transparent; } }
.fr--edit { display: block; padding: 14px 12px 16px; background: var(--accent-soft); }
.fr--edit .fr__l { display: block; margin-bottom: 6px; }
.fr--edit input, .fr--edit select, .fr--edit textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1.5px solid var(--accent); border-radius: 9px; background: #fff; font-size: 16px; }
.fr--edit textarea { resize: vertical; line-height: 1.45; }
.fr__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.err { color: var(--risk); font-size: 13.5px; font-weight: 600; margin-top: 6px; }

/* Banners & states */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; margin: 0 0 14px; }
.banner > .ic { margin-top: 1px; }
.banner ul { margin: 6px 0 0; padding-left: 18px; }
.banner li { margin: 3px 0; }
.banner--err { background: var(--risk-soft); color: #5D1712; box-shadow: inset 0 0 0 1px #F2C4BF; }
.banner--err > .ic { color: var(--risk); }
.banner--risk { background: var(--risk-soft); color: #5D1712; }
.banner--risk > .ic { color: var(--risk); }
.banner--ok { background: var(--ok-soft); color: #0F4A31; }
.banner--ok > .ic { color: var(--ok); }
.banner--note { background: var(--desk); color: var(--ink-2); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 28px; max-width: 420px; margin: 0 auto; }
.empty__ic { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.4; margin-bottom: 4px; }
.empty__t { font-size: 20px; font-weight: 750; letter-spacing: -.015em; }
.empty__s { color: var(--muted); font-size: 14.5px; margin-bottom: 10px; }
.empty--desk { padding-top: 90px; }
.empty--desk .empty__ic { color: var(--muted); }
.allgood { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 12px; background: var(--ok-soft); margin-bottom: 14px; color: #0F4A31; font-size: 14.5px; }
.allgood__ic { width: 26px; height: 26px; color: var(--ok); stroke-width: 2.2; }
.allgood__t { font-weight: 700; font-size: 16px; color: var(--ink); }

/* Check stage */
.issues { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line-2); }
.iss { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.iss__ic { width: 19px; height: 19px; margin-top: 2px; color: var(--warn); }
.iss--check .iss__ic { color: var(--muted); }
.iss__b p:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.iss__r { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.dup { border: 1.5px solid var(--accent); border-radius: 12px; padding: 16px 16px 14px; margin-bottom: 16px; background: linear-gradient(180deg, var(--accent-soft), #fff 70%); }
.dup__k { display: flex; align-items: center; gap: 6px; font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.dup__k .ic { width: 15px; height: 15px; }
.dup h3 { font-size: 18px; letter-spacing: -.015em; margin: 6px 0 10px; }
.dup__job { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px; font-size: 13.5px; color: var(--ink-2); }
.dup__job strong { font-size: 14.5px; color: var(--ink); }
.dup__why { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.dup__why li { display: inline-flex; gap: 4px; align-items: center; }
.dup__why .ic { width: 15px; height: 15px; color: var(--accent); stroke-width: 2.4; }
.dup__act { display: flex; flex-wrap: wrap; gap: 8px; }
.draft { margin-top: 6px; padding: 16px; border-radius: 12px; background: #F7F8FA; box-shadow: inset 0 0 0 1px var(--line-2); }
.draft--closed { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.draft--closed p { font-size: 14px; color: var(--ink-2); max-width: 40ch; }
.draft--closed .sec { margin-bottom: 3px; }
.draft__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.draft__head .sec { margin: 0; }
.draft__meta { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 10px; overflow-wrap: anywhere; }
.draft__meta span { font: 600 10.5px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); width: 58px; flex: none; }
.draft__text { width: 100%; margin-top: 10px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: 15.5px/1.55 var(--serif); resize: vertical; min-height: 240px; }
.draft__text:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(35, 64, 217, .15); }
.draft__act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.sim { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--ink-2); }

/* Approve stage */
.ap { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
fieldset.ap legend { padding: 0; }
.sumdl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14.5px; }
.sumdl dt { font: 600 10.5px/2 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.sumdl dd { margin: 0; overflow-wrap: anywhere; }
.sumdl dd.nil { color: var(--warn); font-weight: 600; }
.techs__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tech { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 58px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.tech input, .slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tech:has(input:focus-visible), .slot:has(input:focus-visible) { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.tech.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.tech__av { width: 34px; height: 34px; border-radius: 50%; background: var(--desk); display: grid; place-items: center; font: 600 12px var(--mono); flex: none; }
.tech.is-on .tech__av { background: var(--accent); color: #fff; }
.tech__t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tech__t strong { font-size: 14.5px; }
.tech__t small { font-size: 12px; color: var(--muted); }
.tech .chip { margin-left: auto; }
.slots__days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.day__l { font: 600 11.5px var(--mono); color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.day__s { display: flex; flex-direction: column; gap: 6px; }
.slot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.slot em { font: 600 10px var(--mono); font-style: normal; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .04em; }
.slot small { font: 500 10.5px var(--mono); color: var(--faint); }
.slot.is-busy { cursor: not-allowed; color: var(--faint); background: repeating-linear-gradient(-45deg, #F6F7F9 0 6px, #EEF0F3 6px 12px); border-style: dashed; }
.slot.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.slot.is-on em { color: #fff; }
.slot--now { margin-bottom: 10px; border-color: var(--risk); color: var(--risk); }
.slot--now span { display: inline-flex; gap: 7px; align-items: center; }
.slot--now.is-on { background: var(--risk); border-color: var(--risk); color: #fff; }
.gatebox { border-radius: 14px; padding: 16px; background: var(--ink); color: #E8EAF0; }
.gatebox__k { display: flex; gap: 8px; align-items: center; font-weight: 700; color: #fff; font-size: 15px; }
.gatebox ul { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 6px; font-size: 14px; }
.gatebox li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gatebox li span { font: 500 12px var(--mono); color: #9AA2B4; }
.gatebox li .ic { color: #9AA2B4; }
.gatebox__s { font-size: 13px; color: #B5BCCB; margin-bottom: 14px; }
.gatebox .btn--accent { background: #4C66FF; }
.gatebox .btn--accent:hover { background: #6177FF; }
.gatebox__hint { font: 500 12px var(--mono); color: #FFC97A; margin-top: 8px; text-align: center; }

/* Work order */
.wo__top .banner { margin-bottom: 14px; }
.wosheet { position: relative; border: 1px solid var(--line); border-top: 5px solid var(--ink); border-radius: 4px; padding: 20px 22px 18px; background: #fff; overflow: hidden; }
.wosheet__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.wosheet__brand { display: flex; gap: 10px; align-items: center; }
.wosheet__brand .brand__mark { width: 30px; height: 30px; }
.wosheet__brand strong { display: block; font-size: 15px; font-weight: 800; }
.wosheet__brand small { font: 500 11px var(--mono); color: var(--muted); }
.wosheet__no { text-align: right; }
.wosheet__no span { display: block; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wosheet__no strong { font: 600 22px var(--mono); letter-spacing: -.02em;  white-space: nowrap; }
.wosheet__t { font-size: 17px; line-height: 1.35; margin: 14px 0 12px; max-width: 46ch; font-weight: 650; }
.wosheet__dl { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: 14px; }
.wosheet__dl dt { font: 600 10.5px/1.9 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.wosheet__dl dd { margin: 0; overflow-wrap: anywhere; }
.wosheet__f { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); font: 500 11px/1.5 var(--mono); color: var(--muted); }
.stamp { float: right; margin: 16px 2px 10px 14px; transform: rotate(-7deg); border: 2.5px solid var(--accent); color: var(--accent); border-radius: 8px; padding: 5px 12px 6px; text-align: center; background: rgba(255, 255, 255, .85); }
.stamp span { display: block; font: 700 17px/1.1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.stamp small { font: 500 10px var(--mono); }
.stamp--in { animation: stamp .55s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes stamp { from { transform: rotate(-16deg) scale(1.9); opacity: 0; } to { transform: rotate(-7deg) scale(1); opacity: 1; } }
.wo__act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin: 14px 0 24px; }
.ob { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.obm { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px 14px 14px; background: #FBFBFC; }
.obm__h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.obm__h > .ic { width: 20px; height: 20px; color: var(--ink-2); }
.obm__h > span:not(.chip) { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.obm__h strong { font-size: 14.5px; }
.obm__h small { font: 500 11.5px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.obm__s { font-weight: 650; font-size: 14px; margin-top: 10px; }
.obm__b { margin-top: 6px; white-space: pre-wrap; font: 14px/1.55 var(--serif); color: var(--ink-2); overflow-wrap: anywhere; }
.log { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line-2); margin-left: 6px; }
.log li { position: relative; display: grid; grid-template-columns: 74px 1fr; gap: 0 12px; padding: 0 0 16px 18px; font-size: 14px; }
.log li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--ink-2); }
.log li:first-child::before { background: var(--accent); box-shadow: none; }
.log__t { font: 500 12px/1.6 var(--mono); color: var(--muted); grid-row: span 2; }
.log__w { font-weight: 700; font-size: 13px; }
.log__x { color: var(--ink-2); overflow-wrap: anywhere; }

/* Desktop desk */
@media (min-width: 1100px) {
  .desk { display: grid; grid-template-columns: 296px minmax(0, 1fr) minmax(0, 1.04fr); height: clamp(640px, calc(100vh - var(--mast)), 980px); }
  .rail { border-right: 1px solid var(--line); }
  .mview { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .desk { grid-template-columns: 264px minmax(0, 1fr) minmax(0, 1fr); }
  .sheet { padding: 28px 28px 32px; }
  .fr__pick { grid-template-columns: 124px minmax(0, 1fr); }
  .source__scroll { padding: 18px 16px 60px; }
}

/* Step flow (phone and tablet) */
@media (max-width: 1099px) {
  .msteps { display: flex; position: sticky; top: var(--mast); z-index: 40; background: rgba(227, 230, 235, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 6px max(10px, env(safe-area-inset-left)); gap: 4px; }
  .msteps button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 0; background: transparent; border-radius: 10px; font-weight: 650; font-size: 15px; color: var(--muted); }
  .msteps button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 33, .12); }
  .msteps button[disabled] { opacity: .45; }
  .msteps .n { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px var(--mono); box-shadow: inset 0 0 0 1.5px currentColor; }
  .msteps button[aria-selected="true"] .n { background: var(--ink); color: #fff; box-shadow: none; }
  .desk > .rail, .desk > .source, .desk > .ticket { display: none; }
  .desk[data-mstep="inbox"] > .rail { display: flex; }
  .desk[data-mstep="review"][data-mview="source"] > .source { display: flex; }
  .desk[data-mstep="review"][data-mview="fields"] > .ticket, .desk[data-mstep="approve"] > .ticket { display: flex; }
  .desk { min-height: 70vh; }
  .rail { background: var(--rail); }
  .rail__head { padding: 18px 16px 12px; }
  .queue { padding: 0 8px 8px; overflow: visible; }
  .rail__foot { padding: 10px 12px 90px; border-top: 0; }
  .source__bar { position: sticky; top: calc(var(--mast) + 57px); z-index: 30; padding: 8px 12px; flex-wrap: nowrap; gap: 8px; }
  .source__bar .mview { max-width: 176px; flex: none; }
  .doctabs { flex: 1; }
  .doctabs button, .doctabs__one { padding: 0 9px; }
  .source__scroll { overflow: visible; padding: 14px 12px 90px; }
  .ticket { border-left: 0; }
  .ticket__bar { display: block; position: sticky; top: calc(var(--mast) + 57px); z-index: 30; padding: 8px 12px; background: var(--desk); border-bottom: 1px solid var(--line); }
  .desk[data-mstep="approve"] .ticket__bar { display: none; }
  .ticket__in { overflow: visible; }
  .tk__head { position: static; padding: 16px 16px 0; }
  .tk__body { padding: 16px 16px 96px; }
  .mview { display: flex; gap: 4px; padding: 3px; background: var(--desk-2); border-radius: 10px; width: 100%; max-width: 420px; }
  .source__bar .mview { order: -1; }
  .mview button { flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: 8px; font-weight: 650; font-size: 14.5px; color: var(--ink-2); }
  .mview button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 33, .12); }
  .thread { display: none; }
  .only-step { display: inline-flex; min-height: 44px; }
  .btn--sm { min-height: 44px; }
  .doctabs button, .doctabs__one { min-height: 44px; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
}
@media (max-width: 640px) {
  .sheet { padding: 22px 18px 24px; margin-bottom: 12px; }
  .sheet--form { padding: 20px 14px 18px; }
  .wf__head { flex-direction: column; }
  .wf__title { font-size: 21px; }
  .s3, .s4, .s5, .s7 { grid-column: span 6; }
  .wf__checks { flex-direction: column; gap: 6px; }
  .mb { font-size: 16.5px; }
  .mh__subj { font-size: 19px; }
  .mh__dl { grid-template-columns: 70px 1fr; }
  .fr__pick { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "v" "m" "n"; gap: 3px; padding: 12px 4px 12px 12px; }
  .fr.is-pending .fr__pick::after { left: 12px; top: 36px; }
  .tk__title { font-size: 19px; }
  .stage { padding: 0 7px; font-size: 14px; gap: 6px; }
  .stage__n { width: 20px; height: 20px; }
  .stages { margin: 0 -6px; }
  .dt-long { display: none; }
  .dt-short { display: inline; }
  .doctabs__one .ic { display: none; }
  .techs__grid { grid-template-columns: minmax(0, 1fr); }
  .slots__days { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .day__s { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sumdl, .wosheet__dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sumdl dd, .wosheet__dl dd { margin-bottom: 8px; }
  .stamp { margin: 12px 0 6px 10px; }
  .wosheet { padding: 16px 14px; }
  .wo__act .btn { flex: 1 1 100%; }
  .obm__h > span:not(.chip) { flex: 1 1 calc(100% - 34px); }
  .obm__h .chip { margin-left: 30px; }
  .wosheet__h { flex-wrap: wrap; }
  .wosheet__no { text-align: left; }
  .draft { padding: 14px 12px; }
  .iss { grid-template-columns: 22px minmax(0, 1fr); }
  .iss .btn { grid-column: 2; justify-self: start; }
}

/* Walk-through */
.how { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); background: var(--paper); border-bottom: 1px solid var(--line); }
.how__open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: center; max-width: 1320px; padding: 0 clamp(16px, 3vw, 40px); }
.how__pics { position: relative; padding-bottom: 14%; }
.how__fig { margin: 0; position: relative; }
.how__fig img { width: 100%; height: auto; object-fit: cover; border-radius: 6px; }
.how__fig--place { width: 80%; }
.how__fig--place img { aspect-ratio: 4 / 3.4; object-position: 78% 100%; }
.how__fig--work { position: absolute; right: 0; bottom: 0; width: 50%; }
.how__fig--work img { aspect-ratio: 4 / 3; object-position: 30% 50%; box-shadow: 0 0 0 6px var(--paper), 0 18px 40px -18px rgba(20, 24, 33, .5); }
.how__fig figcaption { position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 6px; background: rgba(255, 255, 255, .94); font-size: 13px; font-weight: 600; }
.how__fig figcaption span { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.how__fig--place figcaption { bottom: auto; top: 10px; }
.how__head h2 { font-size: clamp(28px, 3.3vw, 46px); line-height: 1.06; letter-spacing: -.03em; font-weight: 750; max-width: 18ch; }
.how__head p:last-child { margin-top: 14px; color: var(--ink-2); font-size: 17px; max-width: 52ch; }
.walk { margin-top: clamp(36px, 5vw, 64px); }
.walk__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 clamp(16px, 3vw, 40px); margin-bottom: 10px; }
.walk__hint { font: 500 12px var(--mono); color: var(--muted); }
.walk__nav { display: flex; gap: 6px; }
.walk__btn { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.walk__btn:hover { border-color: var(--ink); background: #fff; }
.walk__btn[disabled] { opacity: .35; cursor: default; }
.walk__track { list-style: none; margin: 0; padding: 26px clamp(16px, 3vw, 40px) 8px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(320px, 440px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 clamp(16px, 3vw, 40px); scrollbar-width: thin; position: relative; }
.walk__track:focus-visible { outline-offset: -4px; }
.wk { position: relative; scroll-snap-align: start; padding-top: 22px; }
.wk::before { content: ""; position: absolute; top: 5px; left: 0; right: -18px; height: 1.5px; background: var(--ink); }
.wk:last-child::before { right: 0; }
.wk::after { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.wk:nth-child(4)::after, .wk:nth-child(5)::after { background: var(--accent); box-shadow: none; }
.wk__k { display: flex; align-items: baseline; gap: 10px; font-size: 19px; font-weight: 750; letter-spacing: -.015em; margin: 6px 0 10px; }
.wk__k span { font: 600 12px var(--mono); color: var(--accent); }
.wk__shot { margin: 0; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--desk); box-shadow: 0 0 0 1px var(--line), 0 14px 30px -18px rgba(20, 24, 33, .45); }
.wk__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.wk--photo .wk__shot img { object-position: 30% 50%; }
.wk__c { margin-top: 12px; font-size: 15px; color: var(--ink-2); max-width: 38ch; }
.honest { margin: clamp(36px, 5vw, 56px) clamp(16px, 3vw, 40px) 0; max-width: 1240px; padding: 22px 24px; border-radius: 12px; background: var(--desk); }
.honest h3 { font-size: 17px; margin-bottom: 10px; }
.honest ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; font-size: 14.5px; color: var(--ink-2); }
.honest strong { color: var(--ink); }
/* Desktop: keep every frame clear of the fixed "Sample" chip (left 20px + about 92px wide) */
@media (min-width: 1100px) {
  .walk__track { margin-left: 132px; padding-left: 0; scroll-padding-left: 0; }
  .walk__bar { padding-left: 132px; }
}
@media (max-width: 899px) {
  .how__open { grid-template-columns: minmax(0, 1fr); }
  .how__pics { order: 2; }
  .walk__track { grid-auto-columns: 88%; gap: 14px; }
  .wk__shot { aspect-ratio: 4 / 5; }
  .honest ul { grid-template-columns: minmax(0, 1fr); }
}

/* Footer */
.foot { padding: 28px clamp(16px, 3vw, 40px) calc(80px + env(safe-area-inset-bottom)); font-size: 13.5px; color: var(--ink-2); }
.foot__in { max-width: 1240px; display: grid; gap: 8px; }
.foot__credit { color: var(--muted); }

/* Dialog */
.dlg { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(20, 24, 33, .35); color: var(--ink); }
.dlg::backdrop { background: rgba(20, 24, 33, .45); }
.dlg__in { padding: 18px 20px 20px; display: flex; flex-direction: column; }
.dlg__head { display: flex; justify-content: space-between; align-items: center; }
.dlg__head h2 { font-size: 21px; letter-spacing: -.02em; }
.dlg__note { color: var(--ink-2); font-size: 14.5px; margin: 6px 0 14px; }
.lbl { font-weight: 650; font-size: 14px; margin-bottom: 6px; }
.dlg textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); font: 14.5px/1.5 var(--mono); resize: vertical; min-height: 220px; }
.dlg textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(35, 64, 217, .15); }
.dlg textarea[aria-invalid="true"] { border-color: var(--risk); }
.hint { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.dlg__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Toast */
.toast { position: fixed; z-index: 70; left: 50%; width: max-content; bottom: calc(64px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); pointer-events: none; opacity: 0; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 550; max-width: calc(100vw - 32px); box-shadow: 0 12px 30px rgba(20, 24, 33, .3); transition: opacity .25s, transform .25s var(--ease); }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1100px) { .toast { bottom: 28px; } }
@media (max-width: 1099px) { .toast { top: calc(var(--mast) + 6px); bottom: auto; transform: translate(-50%, -8px); text-align: center; } .toast.is-in { transform: translate(-50%, 0); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Print: only the work order */
@media print {
  body.printing > *:not(main) { display: none !important; }
  body.printing main > *:not(.desk) { display: none !important; }
  body.printing .desk { display: block !important; height: auto !important; border: 0; background: #fff; }
  body.printing .desk > *:not(.ticket) { display: none !important; }
  body.printing .ticket { display: block !important; border: 0; }
  body.printing .tk__head, body.printing .wo__top, body.printing .wo__act, body.printing .ob, body.printing .wo h3.sec { display: none !important; }
  body.printing .ticket__in, body.printing .tk__body { overflow: visible !important; padding: 0 !important; }
  body.printing .wosheet { border-color: #000; }
  .pvt-band { display: none !important; }
}
