@charset "utf-8";

/* ==========================================================================
   labty Common Stylesheet
   Layout: lab-label portal — sticky service nav, hero with proof figures,
   reading column of sections; GHS-diamond red as the single accent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Theme
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #f6f8f7;
  --surface: #ffffff;
  --ink: #14211e;
  --muted: #53635f;
  --line: #d9e1de;
  --accent: #c8231b;
  --accent-bg: #c8231b;
  --accent-soft: #fbe9e7;
  --teal: #0f5c52;
  --teal-soft: #e3efec;
  --on-teal: #ffffff;
  --ok: #1a7a4a;
  --warn: #c98a00;
  --r0: #2f6fd0;
  --r1: #1f8a55;
  --r2: #c99a00;
  --r3: #de6a12;
  --r4: #c8231b;
  --r0t: #2f6fd0;
  --r1t: #1a7a4a;
  --r2t: #8a6a00;
  --r3t: #b85000;
  --r4t: #c8231b;
  --f-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --s-1: .875rem;
  --s0: 1rem;
  --s1: 1.25rem;
  --s2: 1.6rem;
  --s3: 2.2rem;
  --s4: clamp(2rem, 5vw, 3.1rem);
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1514;
    --surface: #161f1d;
    --ink: #e6eeeb;
    --muted: #9db0ab;
    --line: #2a3734;
    --accent: #ff5a4e;
    --accent-bg: #d62b22;
    --accent-soft: #3a1b18;
    --teal: #5fc4b3;
    --teal-soft: #16302b;
    --on-teal: #06211d;
    --ok: #4cc38a;
    --warn: #f0b13a;
    --r0t: #6aa5ff;
    --r1t: #4cc38a;
    --r2t: #e0b52a;
    --r3t: #f59342;
    --r4t: #ff5a4e;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1514;
  --surface: #161f1d;
  --ink: #e6eeeb;
  --muted: #9db0ab;
  --line: #2a3734;
  --accent: #ff5a4e;
  --accent-bg: #d62b22;
  --accent-soft: #3a1b18;
  --teal: #5fc4b3;
  --teal-soft: #16302b;
  --on-teal: #06211d;
  --ok: #4cc38a;
  --warn: #f0b13a;
  --r0t: #6aa5ff;
  --r1t: #4cc38a;
  --r2t: #e0b52a;
  --r3t: #f59342;
  --r4t: #ff5a4e;
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box
}

html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 76px)
}

[hidden]:not([hidden=until-found i]) {
  display: none !important
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--s0);
  line-height: 1.7;
  word-break: keep-all
}

img {
  max-width: 100%
}

a {
  color: inherit
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px
}

h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 1.3;
  margin: 0
}

p {
  margin: 0
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 16px
}

/* --------------------------------------------------------------------------
   3. Header, Navigation & Brand Lockup
   -------------------------------------------------------------------------- */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--surface);
  border-bottom: 1px solid var(--line)
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  flex-wrap: nowrap;
  padding-block: 8px
}

.menu {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
  justify-content: space-evenly
}

.menu li {
  flex: none
}

header .wrap.nav {
  max-width: 1320px;
  gap: clamp(10px, 1.1vw, 14px)
}

header .brand,
header .cta-s {
  flex: none
}

.menu a {
  display: flex;
  align-items: center;
  gap: clamp(4px, calc(1vw - 6px), 6px);
  min-height: 44px;
  text-decoration: none;
  font-size: clamp(.78rem, 1.12vw, .84rem);
  font-weight: 600;
  color: var(--teal);
  padding: 7px clamp(5px, calc(2vw - 15px), 9px);
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s, color .15s
}

.menu a:hover {
  background: var(--teal-soft)
}

.menu a[aria-current="page"] {
  color: var(--on-teal);
  background: var(--teal);
  font-weight: 700
}

.menu .n {
  font-family: var(--f-mono);
  font-size: .75rem;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--accent-bg);
  color: #fff;
  margin: 0
}

.menu a[aria-current="page"] .n {
  background: var(--on-teal);
  color: var(--teal)
}

.cta-s {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: var(--s-1);
  font-weight: 700;
  text-decoration: none;
  background: var(--accent-bg);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  white-space: nowrap
}

.cta-s:hover {
  filter: brightness(1.08)
}

/* brand lockup: labty = lab + safety, mark = GHS 원자 + AI 노드 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink)
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none
}

.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1
}

.brand-en {
  font-family: "Red Hat Display", "IBM Plex Sans KR", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -.035em
}

.brand-en .safe {
  color: var(--accent)
}

.brand-ko {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap
}

.brand-ko::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: .6
}

/* --------------------------------------------------------------------------
   4. Shared Layout & UI Components
   -------------------------------------------------------------------------- */
/* hero */
.hero {
  padding-block: 56px 40px
}

.eyebrow {
  font-size: var(--s-1);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--teal)
}

.hero h1 {
  font-size: var(--s4);
  margin-top: 10px;
  max-width: 20ch
}

.hero h1 em {
  font-style: normal;
  color: var(--accent)
}

.hero .lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: var(--s1);
  max-width: 40em
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  align-items: center
}

.hero-grid.wide {
  grid-template-columns: minmax(0, 1fr) 360px
}

.hero-text {
  min-width: 0
}

.ocr-points {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px
}

.ocr-points li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: var(--muted)
}

.ocr-points b {
  color: var(--ink);
  flex: none;
  min-width: 5.5em;
  padding-left: 18px;
  position: relative
}

.ocr-points b::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 7px;
  height: 7px;
  border: 2px solid var(--accent);
  transform: rotate(45deg)
}

.phone {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
  border: 6px solid #1b1f1e;
  box-shadow: 0 24px 48px -20px rgba(10, 30, 25, .45)
}

.phone figcaption {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500
}

.proof {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px
}

.proof div {
  padding: 20px 22px;
  min-width: 0
}

.proof div+div {
  border-left: 1px solid var(--line)
}

.proof b {
  display: block;
  font-family: var(--f-mono);
  font-size: var(--s3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1
}

.proof span {
  color: var(--muted);
  font-size: var(--s-1)
}

.proof-src {
  margin-top: 8px;
  font-size: .8rem;
  color: var(--muted)
}

.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--ink)
}

.btn.primary {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
  color: #fff
}

/* references & section blocks */
.refs {
  border-block: 1px solid var(--line);
  background: var(--surface);
  padding-block: 18px
}

.refs .wrap {
  display: flex;
  gap: 10px 28px;
  align-items: center;
  flex-wrap: wrap
}

.refs small {
  color: var(--muted);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .06em
}

.refs ul {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 700
}

section.blk {
  padding-block: 64px 8px
}

.blk h2 {
  font-size: var(--s3)
}

.blk .sub {
  color: var(--muted);
  margin-top: 10px;
  max-width: 42em
}

/* photos & video */
.photos {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.75fr);
  gap: 16px
}

.photos figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0
}

.photos img,
.photos video {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--line)
}

.photos figcaption {
  font-size: var(--s-1);
  color: var(--muted)
}

.vbox {
  position: relative
}

.vplay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 92, 82, .88);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  transition: transform .15s, background .15s
}

.vplay:hover {
  background: #0f5c52;
  transform: translate(-50%, -50%) scale(1.08)
}

.vplay:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px
}

.vplay svg {
  width: 30px;
  height: 30px;
  margin-left: 5px
}

.vbox.playing .vplay {
  display: none
}

/* compare table */
.cmp {
  margin-top: 28px;
  overflow-x: auto
}

.cmp table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden
}

.cmp th,
.cmp td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top
}

.cmp thead th {
  font-size: var(--s-1);
  color: var(--muted)
}

.cmp thead th.us {
  color: var(--teal)
}

.cmp tbody th {
  font-weight: 700;
  white-space: nowrap;
  width: 18%
}

.cmp td.us {
  background: var(--teal-soft);
  font-weight: 500
}

.cmp tr:last-child>* {
  border-bottom: 0
}

/* cards & grids */
.grid4 {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px
}

.grid3 {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.card .fig {
  font-family: var(--f-mono);
  font-size: var(--s2);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2
}

.card h3 {
  font-size: var(--s1)
}

.card p {
  color: var(--muted)
}

/* steps */
.steps {
  margin-top: 28px;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  counter-reset: st
}

.steps li {
  counter-increment: st;
  border-top: 3px solid var(--ink);
  padding-top: 14px;
  min-width: 0
}

.steps li::before {
  content: counter(st, decimal-leading-zero);
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--accent);
  display: block
}

.steps b {
  display: block;
  margin-top: 2px
}

.steps p {
  color: var(--muted);
  font-size: var(--s-1);
  margin-top: 4px
}

.steps .where {
  font-size: .75rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .04em
}

/* flow diagram */
.flow {
  margin: 28px 0 0;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px
}

.flow svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
  font-family: var(--f-body)
}

.flow .lane {
  fill: var(--surface)
}

.flow .lane.alt {
  fill: var(--teal-soft)
}

.flow .lane-t {
  fill: var(--teal);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em
}

.flow .bx {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 1.5
}

.flow .bx.key {
  stroke: var(--teal);
  stroke-width: 2.5
}

.flow .dm {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2
}

.flow .db {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5
}

.flow .num {
  fill: var(--accent);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600
}

.flow .bt {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 700
}

.flow .bs {
  fill: var(--muted);
  font-size: 12px
}

.flow .bs.strong {
  fill: var(--ink);
  font-weight: 700
}

.flow .ar {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6
}

.flow .ar.acc {
  stroke: var(--accent)
}

.flow .ar.dash {
  stroke: var(--muted);
  stroke-dasharray: 4 4
}

.flow .al {
  fill: var(--muted);
  font-size: 12px
}

.flow .acc-t {
  fill: var(--accent);
  font-weight: 700
}

.flow .f-ink {
  fill: var(--ink)
}

.flow .f-acc {
  fill: var(--accent)
}

.flow .frame {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5
}

.flow .frame.acc {
  stroke: var(--accent);
  stroke-dasharray: 6 4
}

.flow .frame-t {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700
}

.flow .life {
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
  fill: none
}

.flow .act {
  fill: var(--teal-soft);
  stroke: var(--teal);
  stroke-width: 1.5
}

.flow .act.acc {
  fill: var(--accent-soft);
  stroke: var(--accent)
}

.flow .ml {
  fill: var(--ink);
  font-size: 13px
}

.flow .ml .num {
  fill: var(--accent);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 12px
}

.flow .ml.dim {
  fill: var(--muted);
  font-size: 12px
}

/* outputs, after, faq, contact, footer */
.outs {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  list-style: none;
  padding: 0
}

.outs li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 500
}

.outs li small {
  display: block;
  color: var(--muted);
  font-weight: 400
}

.after {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px
}

.after a {
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0
}

.after a:hover {
  border-color: var(--teal)
}

.after .n {
  color: var(--teal);
  font-weight: 700;
  font-size: var(--s-1)
}

.after b {
  font-size: var(--s1)
}

.after p {
  color: var(--muted);
  font-size: var(--s-1)
}

.faq {
  margin-top: 24px;
  border-top: 1px solid var(--line)
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: 7px
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding-block: 9px
}

.faq p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 44em
}

.contact {
  margin-block: 72px 48px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap
}

.contact h2 {
  font-size: var(--s2)
}

.contact p {
  opacity: .8;
  margin-top: 6px
}

.contact .mt {
  margin-top: 16px;
  opacity: 1
}

.contact .btn.primary {
  border-color: var(--accent-bg)
}

.contact .btn.ghost-l {
  border-color: var(--bg);
  color: var(--bg);
  margin-left: 6px
}

.contact dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums
}

.contact dt {
  opacity: .7
}

.contact dd {
  margin: 0;
  user-select: all
}

footer {
  border-top: 1px solid var(--line);
  padding-block: 20px;
  color: var(--muted);
  font-size: .8rem
}

footer .footer-access-links {
  white-space: nowrap
}

.note {
  margin-top: 14px;
  font-size: .8rem;
  color: var(--muted)
}

/* --------------------------------------------------------------------------
   5. Page Sections
   -------------------------------------------------------------------------- */
/* home page */
[data-pagebody="home"] .hero h1 {
  max-width: none;
  font-size: clamp(1.9rem, 4vw, 2.6rem)
}

.nw {
  white-space: nowrap
}

.cycle {
  margin: 0;
  min-width: 0
}

.cycle svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--f-body)
}

.cycle .c-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 4 6
}

.cycle .c-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5
}

.cycle .c-head {
  fill: var(--accent)
}

.cycle .c-node rect {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 1.5
}

.cycle a:hover rect,
.cycle a:focus rect {
  stroke: var(--teal);
  stroke-width: 2.5
}

.cycle .c-num {
  fill: var(--teal);
  font-size: 12px;
  font-weight: 700
}

.cycle .c-lab {
  fill: var(--ink);
  font-size: 14px;
  font-weight: 700
}

.cycle .c-mid {
  fill: var(--ink);
  font-size: 17px;
  font-weight: 700
}

.cycle .c-hub circle {
  fill: var(--teal-soft);
  stroke: var(--teal);
  stroke-width: 2
}

.cycle a:hover .c-hub circle,
.cycle a:focus .c-hub circle {
  stroke-width: 3
}

.cycle .c-sub {
  fill: var(--muted);
  font-size: 12px
}

.proof.four {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.proof.four b {
  font-size: var(--s2)
}

.svc {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px
}

.svc-card {
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0
}

.svc-card:hover {
  border-color: var(--teal)
}

.svc-card .n {
  color: var(--teal);
  font-weight: 700;
  font-size: var(--s-1)
}

.svc-card h3 {
  font-size: var(--s2)
}

.svc-card p {
  color: var(--muted)
}

.svc-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: var(--s-1);
  font-weight: 500
}

.svc-card li {
  padding-left: 18px;
  position: relative
}

.svc-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .6em;
  width: 6px;
  height: 6px;
  border: 2px solid var(--accent);
  transform: rotate(45deg)
}

.svc-card .more {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 700;
  font-size: var(--s-1)
}

.svc-card.wide {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px 32px;
  align-items: center;
  background: var(--teal-soft);
  border-color: var(--teal)
}

.svc-card.wide .wide-l {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.try {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  background: var(--teal-soft);
  border-radius: 12px;
  padding: 24px
}

.try p {
  max-width: 40em
}

/* ocr page */
.autoform {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden
}

.af-head,
.af-row {
  display: grid;
  grid-template-columns: minmax(0, 10em) minmax(0, 1fr) 5em;
  gap: 12px;
  padding: 12px 18px;
  align-items: center;
  border-bottom: 1px solid var(--line)
}

.af-head {
  font-size: var(--s-1);
  color: var(--muted);
  font-weight: 700
}

.af-row>span:first-child {
  font-weight: 700
}

.af-row:last-child {
  border-bottom: 0
}

.af-row.man {
  background: var(--accent-soft)
}

.af-row .mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums
}

.chip {
  font-style: normal;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-block
}

.chip.auto {
  background: var(--teal-soft);
  color: var(--teal)
}

.chip.hand {
  background: var(--accent-bg);
  color: #fff
}

.status {
  margin-top: 24px;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden
}

.status li {
  padding: 16px 18px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px
}

.status li+li {
  border-left: 1px solid var(--line)
}

.status b {
  font-size: var(--s1)
}

.status span {
  color: var(--muted);
  font-size: var(--s-1)
}

.status li.opt b {
  color: var(--muted)
}

.status li.done {
  background: var(--teal-soft)
}

.status li.done b {
  color: var(--teal)
}

/* msds page */
.feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 18px 40px -24px rgba(10, 30, 25, .35);
  min-width: 0
}

.feed-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px
}

.feed-h span {
  font-size: .75rem;
  color: var(--muted)
}

.feed ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0
}

.feed li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-block: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--s-1)
}

.feed li b {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums
}

.feed .chip {
  min-width: 3.6em;
  text-align: center
}

.feed-f {
  margin-top: 10px;
  font-size: .75rem;
  color: var(--muted)
}

.flowrow li {
  position: relative
}

/* compat page */
.mix {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 18px 40px -24px rgba(10, 30, 25, .35);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.mix-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  /* align-items: center */
}

.mix-sub {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0
}

.mix-sub .mono {
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums
}

.mix-sub b {
  word-break: auto-phrase;
}

.mix-sub small {
  color: var(--muted);
  font-size: .75rem;
  overflow-wrap: anywhere
}

.mix-plus {
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--muted);
  margin-top: 50px;
}

.lights {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  border-radius: 999px;
  background: var(--bg);
  width: max-content;
  margin-inline: auto
}

.lights .dot,
.legend .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  opacity: .22;
  flex: none
}

.lights .dot.on,
.legend .dot.on {
  opacity: 1
}

.l-ok {
  background: var(--ok)
}

.l-warn {
  background: var(--warn)
}

.l-danger {
  background: var(--accent)
}

.lights .dot.on {
  box-shadow: 0 0 0 4px var(--accent-soft)
}

.mix-res {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: var(--s-1)
}

.mix-res b {
  color: var(--accent);
  margin-right: 6px
}

.legend {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: var(--muted);
  font-size: var(--s-1)
}

.legend>span {
  display: flex;
  align-items: center;
  gap: 8px
}

.legend b {
  color: var(--ink)
}

.pains {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0
}

.pains li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  font-weight: 500
}

.feat {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 40px;
  align-items: center
}

.feat+.feat {
  margin-top: 40px
}

.feat figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  min-width: 0
}

.feat img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px
}

.feat .ft {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0
}

.feat .ft .n {
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--accent)
}

.feat h3 {
  font-size: var(--s2)
}

.feat p {
  color: var(--muted)
}

.feat.rev figure {
  order: 2
}

/* 혼재위험성 분류 기준 */
.std-flow {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px
}

.std-flow>div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  position: relative
}

.std-flow>div+div::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
  transform: translateY(-50%) rotate(45deg)
}

.std-flow b {
  font-family: var(--f-mono);
  font-size: var(--s2);
  color: var(--teal);
  line-height: 1.1
}

.std-flow span {
  font-weight: 700
}

.std-flow small {
  color: var(--muted);
  font-size: .78rem
}

.std-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 16px
}

.std-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  min-width: 0
}

.std-box .g-h {
  margin: 0 0 12px
}

.cls {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px
}

.cls li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: var(--s-1);
  min-width: 0
}

.cls .cls-k,
.zcell b {
  font-style: normal;
  font-family: var(--f-mono);
  font-weight: 700
}

.cls .cls-k {
  flex: none;
  min-width: 2.6em;
  text-align: center;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--c);
  color: var(--t, #fff);
  font-size: .78rem
}

.zb {
  display: grid;
  gap: 8px
}

.zb-row {
  display: grid;
  grid-template-columns: 5.2em minmax(0, 1fr);
  gap: 8px;
  align-items: center
}

.zb-row>span {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 700
}

.zb-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px
}

.zcell {
  background: var(--c);
  color: var(--t, #fff);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-size: .75rem;
  line-height: 1.3
}

.zcell b {
  font-size: .8rem
}

.k-1 {
  --c: #f2b01e;
  --t: #2a1d00
}

.k-1a {
  --c: #f08a1c;
  --t: #2a1400
}

.k-2 {
  --c: #1f6fd1
}

.k-3 {
  --c: #d7262e
}

.k-4 {
  --c: #e9751a
}

.k-5 {
  --c: #222
}

.k-6 {
  --c: #2aa6df
}

.k-7 {
  --c: #6b6b6b
}

.k-8 {
  --c: #7b2fa8
}

.k-9 {
  --c: #8cc63f;
  --t: #142000
}

.k-10 {
  --c: #0f8f80
}

.k-g {
  --c: #5fd3b0;
  --t: #06261d
}

.z-a {
  --c: #d7262e
}

.z-aex {
  --c: #6b6b6b
}

.z-ahr {
  --c: #2aa6df
}

.z-b1 {
  --c: #f2c300;
  --t: #2a2200
}

.z-b2 {
  --c: #f08a1c;
  --t: #2a1400
}

.z-b3 {
  --c: #1f6fd1
}

.z-c1 {
  --c: #e9751a
}

.z-c2 {
  --c: #222
}

.z-c3 {
  --c: #6b6b6b
}

.z-d1 {
  --c: #7b2fa8
}

.z-d2 {
  --c: #2e9b46
}

.z-d3 {
  --c: #0f8f80
}

.z-g {
  --c: #5fd3b0;
  --t: #06261d
}

.std-h3 {
  margin: 28px 0 0;
  font-size: var(--s1)
}

.prio td:first-child {
  font-weight: 700;
  white-space: nowrap
}

.rx {
  margin: 12px 0 0;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px
}

.rx li {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: var(--s-1)
}

.rx b {
  flex: none;
  font-family: var(--f-mono);
  min-width: 2.2em;
  text-align: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: .78rem
}

.std-src {
  margin-top: 16px;
  font-size: .78rem;
  color: var(--muted)
}

/* sms page */
.todo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 18px 40px -24px rgba(10, 30, 25, .35);
  min-width: 0
}

.todo ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0
}

.todo li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-block: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--s-1)
}

.todo li b {
  font-size: .8rem
}

.todo .chip {
  min-width: 3.8em;
  text-align: center
}

.status.five {
  grid-template-columns: repeat(5, minmax(0, 1fr))
}

.ai {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px
}

.ai-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: ai
}

.ai-steps li {
  counter-increment: ai;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 16px 58px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px
}

.ai-steps li::before {
  content: counter(ai);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--on-teal);
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .85rem
}

.ai-steps span {
  color: var(--muted);
  font-size: var(--s-1)
}

.g-h {
  font-weight: 700
}

.g-f {
  margin-top: 12px;
  font-size: .75rem;
  color: var(--muted)
}

.qr-wrap {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center
}

.qrl {
  margin: 0;
  width: min(440px, 100%);
  min-height: 176px;
  aspect-ratio: 40/16;
  background: #fff;
  color: #111;
  border: 1px solid #c9d2cf;
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 12px;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .4)
}

.qrl-code {
  grid-row: 1/3;
  height: 100%;
  width: auto;
  aspect-ratio: 1;
  fill: #111
}

.qrl-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  font-size: clamp(.75rem, 1.6vw, .82rem)
}

.qrl-name {
  font-size: 1.25em
}

.qrl-row {
  display: flex;
  justify-content: space-between;
  gap: 8px
}

.qrl-row .mono {
  font-family: var(--f-mono)
}

.qrl-reg {
  color: #b0201a;
  font-weight: 700
}

.qrl-grp {
  background: #d7262e;
  color: #fff;
  font-weight: 700;
  font-size: clamp(.75rem, 1.6vw, .8rem);
  border-radius: 4px;
  padding: 2px 8px;
  justify-self: start
}

.qr-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  flex: 1;
  min-width: min(100%, 260px)
}

.qr-list li {
  padding-left: 18px;
  position: relative
}

.qr-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .6em;
  width: 6px;
  height: 6px;
  border: 2px solid var(--accent);
  transform: rotate(45deg)
}

.risk-f {
  margin: 14px 0 0;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.risk-f li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--s-1)
}

.risk-f b {
  margin-right: 6px
}

.risk {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line)
}

.risk .r {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  border-top: 6px solid var(--rc);
  background: var(--surface)
}

.risk b {
  font-family: var(--f-mono);
  font-size: var(--s2);
  color: var(--rt, var(--rc))
}

.risk span {
  font-weight: 700
}

.risk small {
  color: var(--muted);
  font-size: .78rem
}

.r0 {
  --rc: var(--r0);
  --rt: var(--r0t)
}

.r1 {
  --rc: var(--r1);
  --rt: var(--r1t)
}

.r2 {
  --rc: var(--r2);
  --rt: var(--r2t)
}

.r3 {
  --rc: var(--r3);
  --rt: var(--r3t)
}

.r4 {
  --rc: var(--r4);
  --rt: var(--r4t)
}

.logos {
  margin-top: 22px;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.logos li {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: var(--s-1);
  font-weight: 500
}

.values {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px
}

.values>div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0
}

.values b {
  color: var(--teal)
}

.values span {
  color: var(--muted);
  font-size: var(--s-1)
}

.tabs {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.tabs button {
  font: inherit;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: left;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 2px
}

.tabs button small {
  font-weight: 500;
  color: var(--muted);
  font-size: .78rem
}

.tabs button[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--on-teal)
}

.tabs button[aria-selected="true"] small {
  color: var(--on-teal);
  opacity: .85
}

.map {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px
}

.orbit {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  margin-inline: auto;
  container-type: inline-size
}

.orbit::before {
  content: "";
  position: absolute;
  inset: 13%;
  border: 2px dashed var(--line);
  border-radius: 50%
}

.hub {
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background: var(--teal-soft);
  border: 2px solid var(--teal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 8px
}

.hub b {
  font-size: clamp(.9rem, 2vw, 1.05rem);
  line-height: 1.3;
  color: var(--ink)
}

.hub span {
  font-size: .75rem;
  color: var(--muted)
}

.node {
  --a: calc(360deg / var(--n) * var(--i) - 90deg);
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(86px, 22%, 118px);
  transform: translate(-50%, -50%) rotate(var(--a)) translate(clamp(130px, 37cqw, 190px)) rotate(calc(-1 * var(--a)));
  font: inherit;
  font-size: clamp(.75rem, 1.5vw, .82rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: border-color .15s, background .15s
}

.node .node-n {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: .75rem;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--accent-bg);
  color: #fff;
  display: grid;
  place-items: center
}

.node:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.node.on:hover {
  color: #fff
}

.node.on {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
  color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft)
}

.node.on .node-n {
  background: #fff;
  color: var(--accent-bg)
}

.node.on .node-ai {
  background: #fff;
  color: var(--accent-bg)
}

.detail article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 4px solid var(--accent);
  padding-left: 18px
}

.map-hint {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  font-size: var(--s-1);
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 14px 6px 10px
}

.map-hint svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none
}

.d-n {
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--accent);
  font-size: var(--s1)
}

.detail h3 {
  font-size: var(--s2)
}

.detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px
}

.detail li {
  padding-left: 18px;
  position: relative
}

.detail li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .6em;
  width: 6px;
  height: 6px;
  border: 2px solid var(--teal);
  transform: rotate(45deg)
}

.d-m {
  font-size: var(--s-1);
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  padding: 8px 12px
}

.sample {
  min-width: 760px
}

.sample td,
.sample th {
  font-size: var(--s-1);
  white-space: nowrap
}

.sample .mono {
  font-family: var(--f-mono)
}

.lv {
  display: inline-block;
  font-weight: 700;
  font-size: .78rem;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff
}

.lv.l2 {
  background: #f2c300;
  color: #1a1400
}

.zone {
  display: inline-block;
  font-weight: 700;
  font-size: .75rem;
  padding: 2px 9px;
  border-radius: 6px;
  white-space: nowrap
}

.za {
  background: #d7262e;
  color: #fff
}

.case-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--on-teal);
  background: var(--teal);
  border-radius: 999px;
  padding: 1px 9px;
  margin-right: 6px;
  vertical-align: 1px
}

.vs {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.vs>div {
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0
}

.vs-a {
  background: var(--surface);
  border: 1px solid var(--line)
}

.vs-b {
  background: var(--teal-soft);
  border: 1px solid var(--teal)
}

.vs-h {
  font-weight: 700;
  font-size: var(--s-1);
  color: var(--muted)
}

.vs-b .vs-h {
  color: var(--teal)
}

.vs-ex {
  font-weight: 700;
  font-size: var(--s1)
}

.vs b {
  color: var(--accent);
  margin-right: 6px
}

.vs-b b {
  color: var(--teal)
}

.vs p:last-child {
  color: var(--muted);
  font-size: var(--s-1)
}

.zones {
  background: var(--teal-soft);
  border-radius: 12px;
  padding: 18px 20px;
  min-width: 0
}

.zones ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px
}

.zones li {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: var(--s-1);
  font-weight: 500
}

.zones .zone {
  min-width: 5.6em;
  text-align: center
}

.edu {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: center
}

.edu-nums {
  display: grid;
  gap: 10px
}

.edu-nums div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column
}

.edu-nums b {
  font-family: var(--f-mono);
  font-size: var(--s2);
  color: var(--teal)
}

.edu-nums span {
  color: var(--muted);
  font-size: var(--s-1)
}

.edu-txt {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.edu-flow {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  counter-reset: ef
}

.edu-flow li {
  counter-increment: ef;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700;
  font-size: var(--s-1);
  border-radius: 999px;
  padding: 6px 14px
}

.edu-flow li::before {
  content: counter(ef) ". "
}

.d-fig {
  margin: 4px 0 0;
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px
}

.d-fig img {
  width: 140px;
  height: auto;
  flex: none;
  border-radius: 6px;
  background: #fff
}

.d-fig figcaption {
  font-size: var(--s-1);
  color: var(--muted)
}

.cabs {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px
}

.cabs figure {
  margin: 0;
  min-width: 0
}

.cabs img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600/810;
  object-fit: cover;
  border-radius: 10px;
  background: var(--line)
}

.cabs-cap {
  margin-top: 10px;
  font-size: var(--s-1);
  color: var(--muted)
}

.cabs-cap b {
  color: var(--ink);
  margin-right: 6px
}

.aibox {
  border: 1.5px solid var(--teal);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface)
}

.aibox-h {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.ai-tag,
.node-ai {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(90deg, #0f5c52, #2f6fd0);
  border-radius: 999px;
  padding: 2px 8px
}

.node-ai {
  padding: 0 6px;
  vertical-align: 1px
}

.aibox-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  counter-reset: ab
}

.aibox-steps li {
  counter-increment: ab;
  font-size: var(--s-1);
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: baseline
}

.aibox-steps li::before {
  content: counter(ab);
  flex: none;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: .75rem;
  font-weight: 600
}

.aibox-steps b {
  color: var(--ink);
  flex: none
}

.detail .aibox-steps li {
  padding-left: 0
}

.detail .aibox-steps li::before {
  position: static;
  transform: none;
  border: 0;
  top: auto;
  left: auto;
  width: 1.5em;
  height: 1.5em
}

.aibox-demo {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 8px;
  font-size: .8rem
}

.ad-in,
.ad-out {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0
}

.ad-in span {
  color: var(--muted);
  font-size: .75rem
}

.ad-in b {
  margin-bottom: 4px
}

.ad-step {
  align-self: flex-start;
  font-weight: 700;
  font-size: .75rem;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 4px;
  padding: 1px 8px;
  margin-bottom: 2px
}

.ad-out b {
  color: var(--accent);
  margin-right: 6px
}

.aibox-note {
  font-size: .75rem;
  color: var(--muted)
}

.chat-fig {
  margin: 24px 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.chat-fig img {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 8px;
  margin-inline: auto
}

.chat-fig figcaption {
  text-align: center;
  font-size: var(--s-1);
  color: var(--muted);
  padding: 0 4px
}

.chat-cols {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.chat-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  min-width: 0
}

.chat-h {
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px
}

.chat-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px
}

.chat-col li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--s-1);
  color: var(--muted);
  padding-left: 16px;
  position: relative
}

.chat-col li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .6em;
  width: 6px;
  height: 6px;
  border: 2px solid var(--accent);
  transform: rotate(45deg)
}

.chat-col b {
  color: var(--ink);
  font-size: var(--s0)
}

/* consult page */
.cs-head {
  padding-block: 48px 0
}

.cs-title {
  font-size: var(--s4);
  margin-top: 8px
}

.cs-tel {
  margin-top: 14px;
  font-size: var(--s-1);
  color: var(--muted)
}

.cs-tel b {
  color: var(--ink);
  font-family: var(--f-mono);
  font-weight: 600
}

.cs-form {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px
}

.cs-form em {
  color: var(--accent);
  font-style: normal
}

.cs-types {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.cs-types legend {
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0
}

.cs-types label {
  cursor: pointer;
  position: relative
}

.cs-types input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.cs-types span {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: var(--s-1);
  font-weight: 500
}

.cs-types input:checked+span {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 700
}

.cs-types input:focus-visible+span {
  outline: 2px solid var(--accent);
  outline-offset: 2px
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px
}

.cs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0
}

.cs-field.full {
  grid-column: 1/-1
}

.cs-field>span {
  font-weight: 700;
  font-size: var(--s-1)
}

.cs-field small {
  color: var(--muted);
  font-size: .78rem
}

.cs-form input[type=text],
.cs-form input[type=tel],
.cs-form input[type=email],
.cs-form input[type=password],
.cs-form select,
.cs-form textarea,
.cs-search input,
.cs-search select,
.cs-authrow input {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
  width: 100%
}

.cs-form textarea {
  resize: vertical
}

.cs-cap {
  display: flex;
  gap: 10px;
  align-items: center
}

.cs-cap output {
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: .35em;
  padding: 6px 14px;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--teal-soft) 0 6px, var(--surface) 6px 12px);
  color: var(--teal);
  user-select: none
}

.cs-ghost {
  font: inherit;
  font-size: var(--s-1);
  font-weight: 700;
  background: none;
  border: 0;
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
  min-height: 44px;
  padding: 4px 10px
}

.cs-agree {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px
}

.cs-agree label {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer
}

.cs-privacy {
  flex-basis: 100%;
  margin: 6px 0 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: var(--s-1)
}

.cs-privacy dt {
  font-weight: 700
}

.cs-privacy dd {
  margin: 0;
  color: var(--muted)
}

.cs-err {
  color: var(--accent);
  font-weight: 700;
  font-size: var(--s-1)
}

.cs-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.cs-actions .btn,
.cs-search .btn,
.cs-authrow .btn {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: none;
  color: var(--ink)
}

.cs-actions .btn.primary,
.cs-authrow .btn.primary {
  background: var(--accent-bg);
  border-color: var(--accent-bg);
  color: #fff
}

.cs-search .btn,
.cs-authrow .btn {
  padding: 9px 16px
}

.cs-done {
  background: var(--teal-soft);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px
}

.cs-done b {
  color: var(--teal)
}

.cs-done small {
  color: var(--muted)
}

.cs-listhead {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between
}

.cs-listhead h2 {
  font-size: var(--s3)
}

.cs-search {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center
}

.cs-search select {
  width: auto
}

.cs-search input,
.cs-search #cs-q-type {
  width: 220px
}

#consult-list .cs-search select,
#consult-list .cs-search .btn {
  min-height: calc(1.7em + 22px)
}

.cs-table td {
  vertical-align: middle
}

.cs-table td:first-child,
.cs-table td:nth-child(5) {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap
}

.cs-table button {
  font: inherit;
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  text-align: left
}

.cs-table button:hover {
  color: var(--teal);
  text-decoration: underline
}

.cs-lock {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 6px;
  vertical-align: 1px
}

.cs-st {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap
}

.cs-st.done {
  background: var(--teal-soft);
  color: var(--teal)
}

.cs-st.wait {
  background: var(--accent-soft);
  color: var(--accent)
}

.cs-auth {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.cs-authrow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.cs-authrow input {
  width: min(180px, 100%)
}

.cs-consult-detail {
  margin-top: 0;
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere
}

.cs-consult-detail .cs-detail-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line)
}

.cs-consult-detail .cs-detail-heading-text {
  min-width: 0
}

.cs-consult-detail .cs-detail-heading h3 {
  font-size: var(--s2);
  line-height: 1.5;
  text-wrap: wrap
}

.cs-consult-detail .cs-detail-date {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--s-1)
}

.cs-consult-detail .cs-detail-status {
  padding-top: 6px
}

.cs-consult-detail .cs-detail-value {
  min-width: 0;
  min-height: 50px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: var(--s0);
  overflow-wrap: anywhere
}

.cs-consult-detail .cs-detail-content {
  min-height: 180px;
  white-space: pre-wrap;
  overflow-wrap: anywhere
}

.cs-consult-detail .cs-detail-answer {
  border-top: 1px solid var(--line);
  padding-top: 22px
}

.cs-consult-detail .cs-detail-answer-wait {
  min-height: 88px;
  color: var(--muted)
}

.cs-consult-detail .cs-detail-answer-complete {
  border-color: var(--teal)
}

.cs-consult-detail .cs-detail-answer-date {
  margin-top: 16px
}

.cs-consult-detail .cs-actions {
  justify-content: flex-start
}

/* --------------------------------------------------------------------------
   6. Stacked Navigation (Dynamic Single-Row -> Two-Row Transition)
   -------------------------------------------------------------------------- */
html.nav-stacked {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 124px)
}

html.nav-stacked header .wrap.nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  min-height: 0;
  padding-block: 8px 0
}

html.nav-stacked header .brand {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  justify-self: start
}

html.nav-stacked header .cta-s {
  grid-column: 2;
  grid-row: 1
}

html.nav-stacked .menu {
  grid-column: 1/-1;
  grid-row: 2;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin-inline: -16px;
  padding: 0 16px 6px
}

html.nav-stacked .menu::-webkit-scrollbar {
  display: none
}

html.nav-stacked .menu a {
  font-size: .84rem;
  padding: 7px 9px;
  gap: 6px
}

html.nav-stacked .menu.is-overflow {
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent)
}

/* --------------------------------------------------------------------------
   7. Responsive Breakpoints & Motion
   -------------------------------------------------------------------------- */
@media (max-width:900px) {
  .status.five {
    grid-template-columns: 1fr 1fr
  }

  .ai,
  .std-grid,
  .map,
  .edu {
    grid-template-columns: 1fr
  }

  .values {
    grid-template-columns: 1fr 1fr
  }
}

@media (max-width:760px) {
  .cs-consult-detail .cs-detail-heading {
    gap: 12px;
    padding-bottom: 20px
  }

  html {
    scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 124px)
  }

  header .wrap.nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    min-height: 0;
    padding-block: 8px 0
  }

  header .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    justify-self: start
  }

  header .cta-s {
    grid-column: 2;
    grid-row: 1
  }

  .cta-s .cta-more {
    display: none
  }

  .menu {
    grid-column: 1/-1;
    grid-row: 2;
    flex-wrap: nowrap;
    justify-content: space-between;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    margin-inline: -16px;
    padding: 0 16px 6px
  }

  .menu::-webkit-scrollbar {
    display: none
  }

  .menu a {
    font-size: .84rem;
    padding: 7px 9px;
    gap: 6px
  }

  .hero-grid,
  .hero-grid.wide {
    grid-template-columns: 1fr;
    gap: 32px
  }

  .proof.four {
    grid-template-columns: 1fr 1fr
  }

  .proof.four div+div {
    border-top: 0;
    border-left: 0
  }

  .proof.four div:nth-child(even) {
    border-left: 1px solid var(--line)
  }

  .proof.four div:nth-child(n+3) {
    border-top: 1px solid var(--line)
  }

  .svc,
  .svc-card.wide,
  .cs-grid,
  .chat-cols,
  .pains,
  .feat {
    grid-template-columns: 1fr
  }

  .feat.rev figure {
    order: 0
  }

  .cs-form {
    padding: 20px
  }

  .cycle {
    max-width: 360px;
    margin-inline: auto
  }

  .phone {
    max-width: 230px;
    margin-inline: auto
  }

  .proof {
    grid-template-columns: 1fr
  }

  .proof div+div {
    border-left: 0;
    border-top: 1px solid var(--line)
  }

  .grid4,
  .after,
  .grid3,
  .photos {
    grid-template-columns: 1fr
  }

  .photos img {
    height: auto;
    max-height: 420px
  }

  .photos video {
    height: 520px;
    max-height: none
  }

  .status {
    grid-template-columns: 1fr 1fr
  }

  .status li+li {
    border-left: 0
  }

  .status li {
    border-top: 1px solid var(--line)
  }

  .af-head,
  .af-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 14px
  }

  .af-head span:nth-child(2),
  .af-row>span:nth-child(2) {
    grid-column: 1/-1;
    grid-row: 2
  }

  .af-head span:nth-child(2) {
    display: none
  }

  .steps {
    grid-template-columns: 1fr
  }

  .risk {
    grid-template-columns: 1fr
  }

  .risk .r {
    border-top: 0;
    border-left: 6px solid var(--rc)
  }

  .contact {
    padding: 28px 20px
  }

  .cmp {
    overflow-x: visible
  }

  .cmp table.stack {
    min-width: 0;
    display: block;
    border: 0;
    background: none;
    border-radius: 0;
    overflow: visible
  }

  .cmp table.stack thead {
    display: none
  }

  .cmp table.stack tbody {
    display: grid;
    gap: 12px
  }

  .cmp table.stack tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden
  }

  .cmp table.stack th,
  .cmp table.stack td {
    display: block;
    width: auto;
    white-space: normal;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line)
  }

  .cmp table.stack tr>*:last-child {
    border-bottom: 0
  }

  .cmp table.stack tbody th {
    background: var(--bg)
  }

  .cmp table.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 2px
  }

  .cmp table.stack td.us[data-label]::before {
    color: var(--teal)
  }

  .cmp table.cs-table {
    min-width: 0
  }

  .cs-table th:nth-child(1),
  .cs-table td:not([colspan]):nth-child(1),
  .cs-table th:nth-child(2),
  .cs-table td:not([colspan]):nth-child(2),
  .cs-table th:nth-child(5),
  .cs-table td:not([colspan]):nth-child(5) {
    display: none
  }
}

@media (max-width:640px) {

  .std-flow,
  .cls,
  .zb-row,
  .values,
  .vs {
    grid-template-columns: 1fr
  }

  .std-flow>div+div::before {
    display: none
  }

  .orbit {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%
  }

  .orbit::before {
    display: none
  }

  .hub {
    position: static;
    grid-column: 1/-1;
    border-radius: 12px;
    padding: 14px
  }

  .node {
    position: static;
    transform: none;
    width: auto;
    font-size: .8rem
  }

  .cs-search input {
    width: 160px;
  }
}

@media (max-width:520px) {
  .cs-search {
    flex-wrap: wrap
  }

  .cs-search input,
  .cs-search #cs-q-type {
    width: 100%
  }

  .cs-search {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px
  }

  .cs-search select,
  .cs-search input,
  .cs-search button {
    width: 100%
  }

  .cabs {
    grid-template-columns: 1fr 1fr
  }

  .cabs figure:last-child {
    display: none
  }

  .aibox-demo {
    grid-template-columns: 1fr
  }
}

@media (max-width:500px) {
  .proof.four {
    grid-template-columns: 1fr
  }

  .proof.four div:nth-child(even) {
    border-left: 0
  }

  .proof.four div+div {
    border-top: 1px solid var(--line)
  }

  .proof b {
    font-size: var(--s2)
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto !important
  }

  .menu a,
  .node {
    transition: none
  }
}
