/* 한빛노동조합 시연 사이트 — layout + site components.
   Colors / radii / shadows come only from semantic var(--aq-*) tokens
   (css/preset.css). No primitive --aq-grey-* / literal colors here. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--aq-font-sans);
  font-size: var(--aq-text-base);
  font-weight: var(--aq-weight-base);
  line-height: 1.6;
  background: var(--aq-bg);
  background-attachment: scroll;
  color: var(--aq-fg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--aq-accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Focus: visible 2px ring outside interactive elements (inputs keep Aquila glow). */
a:focus-visible, button:focus-visible, summary:focus-visible,
[tabindex]:focus-visible, [role="radio"]:focus-visible, [role="tab"]:focus-visible {
  outline: 2px solid var(--aq-ring-strong);
  outline-offset: 2px;
  border-radius: var(--aq-radius-sm);
}
.demo-bar a:focus-visible, .demo-bar button:focus-visible,
.demo-bar [role="radio"]:focus-visible { outline-color: var(--aq-bg); }

.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;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 60;
  background: var(--aq-surface); color: var(--aq-fg); padding: 8px 12px;
  border: 1px solid var(--aq-border); border-radius: var(--aq-radius-el);
}
.skip-link:focus { top: 8px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 28px; height: 28px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Demo bar (시연 도구) — visually separate from the site itself ── */
.demo-bar { background: var(--aq-fg); color: var(--aq-bg); font-size: 14px; }
.demo-bar-row {
  display: flex; align-items: center; gap: 16px; min-height: 56px; padding-block: 8px;
}
.demo-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.demo-label .tag {
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--aq-radius-sm);
  border: 1px solid currentColor; opacity: .85;
}
.demo-spacer { flex: 1; }
.demo-member { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.demo-member select {
  height: 36px; padding: 0 28px 0 10px; border-radius: var(--aq-radius-el);
  background: transparent; color: inherit; border: 1px solid currentColor;
}
.demo-member select option { color: var(--aq-fg); background: var(--aq-surface); }
.demo-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: var(--aq-radius-el); background: transparent; color: inherit;
  border: 1px solid currentColor; cursor: pointer; white-space: nowrap;
}
.demo-btn:hover { background: color-mix(in srgb, var(--aq-bg) 12%, transparent); }
.demo-help {
  border-top: 1px solid color-mix(in srgb, var(--aq-bg) 22%, transparent);
  font-size: 13px; line-height: 1.5;
}
.demo-help .wrap { display: flex; gap: 12px; align-items: center; padding-block: 8px; }
.demo-help p { flex: 1; }
.demo-help button {
  background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer;
  font-size: 13px; padding: 4px; white-space: nowrap;
}
.demo-bar[data-help="closed"] .demo-help { display: none; }

/* SegmentedControl (Aquila structure: sunken track + sliding surface indicator, glide) */
.seg {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 3px; border-radius: var(--aq-radius-el);
  background: color-mix(in srgb, var(--aq-bg) 14%, transparent);
  min-width: 400px;
}
.seg-indicator {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 4);
  border-radius: calc(var(--aq-radius-el) - 1px);
  background: var(--aq-bg);
  transform: translateX(calc(var(--seg-i, 0) * 100%));
  /* glide: constrained indicator, no overshoot */
  transition: transform var(--aq-dur-md) var(--aq-ease-emphasized);
}
.seg button {
  position: relative; z-index: 1; height: 38px; padding: 0 10px; border: 0;
  background: transparent; color: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; border-radius: calc(var(--aq-radius-el) - 1px); white-space: nowrap;
  transition: color var(--aq-dur-sm) var(--aq-ease-out);
}
.seg button[aria-checked="true"] { color: var(--aq-fg); }

/* ── Site header ── */
.site-header {
  background: var(--aq-surface);
  border-bottom: var(--aq-rule-section) solid var(--aq-accent);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--aq-fg); }
.wordmark:hover { text-decoration: none; }
.wordmark-mark {
  width: 32px; height: 32px; border-radius: var(--aq-radius-el);
  background: var(--aq-accent); color: var(--aq-accent-fg);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.wordmark-name { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 12px;
  color: var(--aq-fg-strong); font-weight: 600; white-space: nowrap;
}
.main-nav a[aria-current="page"] { color: var(--aq-accent); box-shadow: inset 0 -2px 0 var(--aq-accent); }
.main-nav a:hover { color: var(--aq-accent); text-decoration: none; }
.header-user { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.user-name { font-weight: 600; color: var(--aq-fg-strong); }
.site-header .menu-btn { display: none; }

.admin-strip { background: var(--aq-accent-subtle); border-bottom: 1px solid var(--aq-border); font-size: 14px; }
.admin-strip .wrap { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; min-height: 44px; }
.admin-strip strong { color: var(--aq-accent-strong); margin-right: 4px; }
.admin-strip a { color: var(--aq-accent-strong); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.admin-strip a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.notice-strip { background: var(--aq-surface-sunken); border-bottom: 1px solid var(--aq-border); font-size: 14px; }
.notice-strip .wrap { display: flex; align-items: center; gap: 8px; min-height: 44px; padding-block: 6px; }

/* ── Main ── */
main { flex: 1; padding: 32px 0 56px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 28px; line-height: 1.35; font-weight: 700; }
.page-head p { color: var(--aq-fg-secondary); margin-top: 6px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title { font-size: 20px; font-weight: 700; line-height: 1.4; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; border-bottom: var(--aq-rule-section) solid var(--aq-fg);
}
.muted { color: var(--aq-fg-muted); }
.small { font-size: 14px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--aq-fg-muted); margin-bottom: 12px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--aq-fg-subtle); }
.breadcrumb a { color: var(--aq-fg-secondary); }

/* ── Home ── */
.welfare-banner {
  display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: center;
  background: var(--aq-accent-subtle); border: 1px solid var(--aq-border);
  border-radius: var(--aq-radius-card); padding: 24px 28px; margin-bottom: 32px;
}
.welfare-banner .badge { background: var(--aq-surface); }
.welfare-banner h2 { font-size: 22px; line-height: 1.4; margin-top: 8px; }
.welfare-banner p { color: var(--aq-fg-secondary); margin-top: 6px; }
.welfare-banner .actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.img-placeholder {
  height: 140px; border-radius: var(--aq-radius-el);
  border: 1px dashed var(--aq-border-interactive); background: var(--aq-surface);
  display: grid; place-items: center; text-align: center; color: var(--aq-fg-muted); font-size: 14px; padding: 8px;
}
.home-grid { display: grid; grid-template-columns: 8fr 4fr; gap: 40px; align-items: start; }

.post-rows li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  border-bottom: 1px solid var(--aq-border); }
.post-rows a.row-link {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 0; color: var(--aq-fg);
  min-width: 0;
}
.post-rows .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-rows .row-date { font-variant-numeric: tabular-nums; color: var(--aq-fg-muted); font-size: 14px; width: 84px; text-align: right; }
.post-rows .clip { color: var(--aq-fg-muted); }

.shortcuts { border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); background: var(--aq-surface); margin-top: 16px; }
.shortcuts li + li { border-top: 1px solid var(--aq-border); }
.shortcut {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 14px 16px; min-height: 64px; color: var(--aq-fg);
}
.shortcut:hover { text-decoration: none; background: var(--aq-surface-subtle); }
.shortcut-icon {
  width: 40px; height: 40px; border-radius: var(--aq-radius-el); display: grid; place-items: center;
  background: var(--aq-accent-subtle); color: var(--aq-accent);
}
.shortcut strong { display: block; font-weight: 700; }
.shortcut span.desc { display: block; font-size: 14px; color: var(--aq-fg-muted); }
.lock-note { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--aq-fg-secondary); white-space: nowrap; }

.office-info { margin-top: 28px; }
.office-info dl { margin-top: 12px; display: grid; grid-template-columns: 72px 1fr; gap: 8px 12px; font-size: 14px; }
.office-info dt { color: var(--aq-fg-muted); }

/* ── Buttons (Aquila Button: primary / secondary / outline / ghost) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: var(--aq-radius-el);
  font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; text-decoration: none;
  transition-property: transform, background-color, border-color, color;
  transition-duration: var(--aq-dur-sm); transition-timing-function: var(--aq-ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(var(--aq-press-scale)); }
.btn-primary { background: var(--aq-solid); color: var(--aq-solid-fg); }
.btn-primary:hover { background: var(--aq-solid-hover); }
.btn-secondary { background: var(--aq-surface); color: var(--aq-accent-strong); border-color: var(--aq-accent); }
.btn-secondary:hover { background: var(--aq-accent-subtle); }
.btn-outline { background: var(--aq-surface); color: var(--aq-fg-strong); border-color: var(--aq-border-interactive); }
.btn-outline:hover { background: var(--aq-surface-subtle); }
.btn-ghost { background: transparent; color: var(--aq-fg-secondary); }
.btn-ghost:hover { background: var(--aq-surface-sunken); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--aq-radius-el); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 44px; padding: 0; }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: var(--aq-radius-sm); font-size: 13px; font-weight: 600; line-height: 1.5;
  white-space: nowrap; background: var(--aq-surface-sunken); color: var(--aq-fg-secondary);
}
.badge-accent { background: var(--aq-accent-subtle); color: var(--aq-accent-strong); }
.badge-cat-1 { background: var(--aq-cat-1-light); color: var(--aq-fg); }
.badge-cat-2 { background: var(--aq-cat-2-light); color: var(--aq-fg); }
.badge-cat-3 { background: var(--aq-cat-3-light); color: var(--aq-fg); }
.badge-cat-4 { background: var(--aq-cat-4-light); color: var(--aq-fg); }
.badge-cat-5 { background: var(--aq-cat-5-light); color: var(--aq-fg); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-cat-1 .dot { background: var(--aq-cat-1); }
.badge-cat-2 .dot { background: var(--aq-cat-2); }
.badge-cat-3 .dot { background: var(--aq-cat-3); }
.badge-cat-4 .dot { background: var(--aq-cat-4); }
.badge-cat-5 .dot { background: var(--aq-cat-5); }
/* feedback: real meaning only (일치/불일치). fg text + colored icon, not a one-hue box */
.badge-ok { background: var(--aq-success-light); color: var(--aq-fg); }
.badge-ok .icon { color: var(--aq-success); }
.badge-bad { background: var(--aq-error-light); color: var(--aq-fg); }
.badge-bad .icon { color: var(--aq-error); }

/* ── Table ── */
.table-wrap { border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); background: var(--aq-surface); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th {
  text-align: left; font-weight: 700; color: var(--aq-accent-strong); background: var(--aq-surface-subtle);
  padding: 12px 14px; border-bottom: 1px solid var(--aq-border); white-space: nowrap; font-size: 14px;
}
.tbl tbody th { background: none; color: var(--aq-fg); font-size: 15px; border-bottom: 1px solid var(--aq-border-subtle); }
.tbl tbody tr:last-child th { border-bottom: 0; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--aq-border-subtle); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .center { text-align: center; }
.tbl .nowrap { white-space: nowrap; }
.tbl td.title-cell a { color: var(--aq-fg); font-weight: 500; }
.tbl tr.row-new td { background: var(--aq-accent-subtle); }
.tbl .diff { display: block; font-size: 13px; color: var(--aq-fg-secondary); font-weight: 600; }
.tbl td.cell-diff { background: var(--aq-error-light); }
.tbl thead tr.group th { text-align: center; border-bottom: 1px solid var(--aq-border-subtle); }
.tbl th.sub { font-weight: 600; color: var(--aq-fg-secondary); text-align: right; }
.empty-row { text-align: center; color: var(--aq-fg-muted); padding: 32px 14px !important; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.search { display: flex; gap: 8px; }
.search .field-input { width: 240px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 8px;
  border-radius: var(--aq-radius-el); color: var(--aq-fg-secondary); font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: var(--aq-surface-sunken); text-decoration: none; }
.pagination [aria-current="page"] { background: var(--aq-accent); color: var(--aq-accent-fg); font-weight: 700; }

/* ── Article ── */
.article { background: var(--aq-surface); border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); }
.article-head { padding: 24px 28px; border-bottom: 1px solid var(--aq-border); }
.article-head h1 { font-size: 24px; line-height: 1.4; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-size: 14px; color: var(--aq-fg-muted); }
.meta dt { display: inline; }
.meta dd { display: inline; color: var(--aq-fg-secondary); margin-left: 6px; }
.meta div { white-space: nowrap; }
.article-body { padding: 28px; }
.article-body p + p { margin-top: 14px; }
.attachments { margin: 0 28px 28px; border: 1px solid var(--aq-border); border-radius: var(--aq-radius-el); }
.attachments h2 { font-size: 15px; padding: 10px 14px; background: var(--aq-surface-subtle); border-bottom: 1px solid var(--aq-border); display: flex; gap: 6px; align-items: center; }
.attachments li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.attachments li + li { border-top: 1px solid var(--aq-border-subtle); }
.attachments .fname { font-weight: 600; flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.attachments .fsize { color: var(--aq-fg-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.prevnext { margin-top: 16px; border-top: 1px solid var(--aq-border); }
.prevnext li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; border-bottom: 1px solid var(--aq-border); padding: 12px 4px; }
.prevnext span { color: var(--aq-fg-muted); font-size: 14px; }
.comments { padding: 0 28px 28px; }
.comments h2 { font-size: 16px; margin-bottom: 8px; }
.comments li { padding: 12px 0; border-top: 1px solid var(--aq-border-subtle); }
.comments .who { font-weight: 600; font-size: 14px; }

/* ── EmptyState / lock ── */
.empty {
  text-align: center; padding: 56px 24px; background: var(--aq-surface);
  border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card);
}
.empty .empty-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--aq-surface-sunken); color: var(--aq-fg-secondary);
}
.empty h2 { font-size: 20px; line-height: 1.4; }
.empty p { color: var(--aq-fg-secondary); margin: 8px auto 0; max-width: 32em; }
.empty .actions { margin-top: 20px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* Callout (fixed notices) */
.callout {
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px;
  border-radius: var(--aq-radius-el); background: var(--aq-surface); border: 1px solid var(--aq-border);
  border-left: var(--aq-rule-emphasis) solid var(--aq-accent); font-size: 15px;
}
.callout .icon { color: var(--aq-accent); margin-top: 3px; }

/* ── Forms (Aquila Input / Select / Textarea / RadioGroup / Checkbox / Stepper) ── */
.form-card { background: var(--aq-surface); border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); padding: 28px; }
.form-grid { display: grid; gap: 20px; max-width: 560px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field label.radio-card, .field label.check { display: flex; margin-bottom: 0; font-weight: 400; }
.field .hint { font-size: 13px; color: var(--aq-fg-muted); margin-top: 6px; }
.field .error { display: flex; gap: 4px; align-items: center; font-size: 14px; color: var(--aq-error); margin-top: 6px; font-weight: 600; }
.field .error[hidden] { display: none; }
.req { color: var(--aq-error); margin-left: 2px; }
.field-input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--aq-radius-el);
  background: var(--aq-surface); border-style: solid; border-width: 1px; border-color: var(--aq-border-interactive);
  transition: box-shadow var(--aq-dur-sm) var(--aq-ease-out), border-color var(--aq-dur-sm) var(--aq-ease-out);
}
textarea.field-input { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
select.field-input { appearance: none; padding-right: 40px; cursor: pointer; }
.select-wrap { position: relative; display: block; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid var(--aq-fg-secondary); border-bottom: 2px solid var(--aq-fg-secondary);
  transform: translateY(-70%) rotate(45deg);
}
.field-input::placeholder { color: var(--aq-fg-placeholder); }
.aq-input.field-input { border-color: var(--aq-border-interactive); }

.radio-group { display: grid; gap: 8px; }
.radio-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--aq-border); border-radius: var(--aq-radius-el); background: var(--aq-surface);
}
.radio-card:has(input:checked) { border-color: var(--aq-accent); background: var(--aq-accent-subtle); }
.radio-card:has(input:focus-visible) { outline: 2px solid var(--aq-ring-strong); outline-offset: 2px; }
.radio-card input { margin-top: 4px; accent-color: var(--aq-accent); width: 18px; height: 18px; }
.radio-card strong { display: block; font-weight: 700; }
.radio-card span { font-size: 14px; color: var(--aq-fg-muted); }
.radio-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-inline .radio-card { padding: 10px 14px; align-items: center; }
.radio-inline .radio-card input { margin-top: 0; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--aq-accent); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--aq-border-interactive); border-radius: var(--aq-radius-el); overflow: hidden; }
.stepper button { width: 46px; height: 44px; border: 0; background: var(--aq-surface-subtle); cursor: pointer; display: grid; place-items: center; color: var(--aq-fg-strong); }
.stepper button:hover { background: var(--aq-surface-sunken); }
.stepper output { min-width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Timeline (가입 3단계) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 24px 0 8px; counter-reset: s; }
.steps li { position: relative; padding-top: 40px; text-align: center; font-size: 15px; color: var(--aq-fg-muted); }
.steps li::before {
  counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--aq-surface); border: 2px solid var(--aq-border-strong); color: var(--aq-fg-muted); z-index: 1;
}
.steps li::after { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--aq-border-strong); }
.steps li:first-child::after { content: none; }
.steps li[data-state="done"] { color: var(--aq-fg-secondary); }
.steps li[data-state="done"]::before { background: var(--aq-accent); border-color: var(--aq-accent); color: var(--aq-accent-fg); }
.steps li[data-state="done"]::after, .steps li[data-state="current"]::after { background: var(--aq-accent); }
.steps li[data-state="current"] { color: var(--aq-fg); font-weight: 700; }
.steps li[data-state="current"]::before { border-color: var(--aq-accent); color: var(--aq-accent); }

.summary-dl { display: grid; grid-template-columns: 88px 1fr; gap: 8px 16px; font-size: 15px; }
.summary-dl dt { color: var(--aq-fg-muted); }

/* Tabs (underline indicator, glide) */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--aq-border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button.tab-btn {
  position: relative; height: 44px; padding: 0 14px; border: 0; background: none; cursor: pointer;
  font-weight: 600; color: var(--aq-fg-muted); white-space: nowrap;
}
.tabs button.tab-btn[aria-selected="true"] { color: var(--aq-fg); }
.tabs .tab-indicator {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: var(--tab-w, 0);
  background: var(--aq-accent); transform: translateX(var(--tab-x, 0));
  transition: transform var(--aq-dur-md) var(--aq-ease-emphasized);
}

/* Migration summary */
.summary-cells { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); background: var(--aq-surface); margin-bottom: 20px; }
.summary-cells div { padding: 14px 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.summary-cells div + div { border-left: 1px solid var(--aq-border); }
.summary-cells dt { color: var(--aq-fg-secondary); font-size: 15px; }
.summary-cells dd { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.mig-cards { display: none; }
.mig-card { background: var(--aq-surface); border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); padding: 16px; }
.mig-card + .mig-card { margin-top: 12px; }
.mig-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.mig-card h3 { font-size: 17px; }
.mig-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 15px; }
.mig-card dt { color: var(--aq-fg-muted); }
.mig-card dd { text-align: right; font-variant-numeric: tabular-nums; }
.mig-card .memo { margin-top: 10px; font-size: 14px; color: var(--aq-fg-secondary); padding-top: 10px; border-top: 1px solid var(--aq-border-subtle); }

/* ── Footer ── */
.site-footer { background: var(--aq-surface); border-top: 1px solid var(--aq-border); padding: 28px 0 32px; font-size: 14px; color: var(--aq-fg-muted); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer strong { color: var(--aq-fg-strong); font-size: 15px; }
.footer-info { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.disclaimer { color: var(--aq-fg-secondary); }

/* ── Modal / Drawer / Toast ── */
dialog.modal {
  border: 1px solid var(--aq-border); border-radius: var(--aq-radius-card); padding: 0; width: min(440px, calc(100vw - 32px));
  background: var(--aq-surface-overlay); color: var(--aq-fg); box-shadow: var(--aq-shadow-xl);
}
dialog.modal::backdrop { background: color-mix(in srgb, var(--aq-fg) 40%, transparent); }
dialog.modal[open] { animation: modal-in var(--aq-dur-sm) var(--aq-ease-enter); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-body { padding: 24px; }
.modal-body h2 { font-size: 19px; }
.modal-body p { color: var(--aq-fg-secondary); margin-top: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 24px 24px; }

.aq-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--aq-fg) 40%, transparent); opacity: 0; pointer-events: none; transition: opacity var(--aq-dur-md) var(--aq-ease-out); }
.aq-drawer-backdrop[data-open="true"] { pointer-events: auto; }
.aq-drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: min(300px, 84vw); background: var(--aq-surface); box-shadow: var(--aq-shadow-lg); padding: 16px; overflow-y: auto; visibility: hidden; }
.aq-drawer[data-open="true"] { visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer-nav a { display: flex; align-items: center; min-height: 48px; padding: 0 8px; color: var(--aq-fg); font-weight: 600; border-bottom: 1px solid var(--aq-border-subtle); }
.drawer-nav a[aria-current="page"] { color: var(--aq-accent); }
.drawer-nav .group { margin-top: 16px; font-size: 13px; color: var(--aq-fg-muted); padding: 0 8px 4px; }

.toast-region { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  background: var(--aq-fg); color: var(--aq-bg); padding: 12px 16px; border-radius: var(--aq-radius-el);
  box-shadow: var(--aq-shadow-lg); font-size: 15px; display: flex; gap: 8px; align-items: center;
  animation: toast-in var(--aq-dur-sm) var(--aq-ease-enter);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.only-mobile { display: none; }

/* ── Responsive ── */
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .site-header .menu-btn { display: inline-flex; }
  .demo-bar-row { flex-wrap: wrap; gap: 8px 12px; }
  .demo-bar .seg { order: 5; flex: 1 0 100%; min-width: 0; }
  .demo-spacer { display: none; }
  .demo-reset { margin-left: auto; }
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 32px; }
  .shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); }
  .shortcuts li + li { border-top: 0; border-left: 1px solid var(--aq-border); }
  .shortcut { grid-template-columns: 40px 1fr; }
  .shortcut .lock-note { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .demo-reset .txt { display: none; }
  .demo-reset { width: 40px; justify-content: center; padding: 0; }
  .welfare-banner { grid-template-columns: 1fr; padding: 20px; }
  .welfare-banner .img-placeholder { display: none; }
  .shortcuts { display: block; }
  .shortcuts li + li { border-left: 0; border-top: 1px solid var(--aq-border); }
  .shortcut { grid-template-columns: 40px 1fr auto; }
  .shortcut .lock-note { grid-column: auto; }
  .summary-cells { grid-template-columns: 1fr; }
  .summary-cells div + div { border-left: 0; border-top: 1px solid var(--aq-border); }
  .mig-cards { display: block; }
  .mig-table { display: none; }
  .only-desktop { display: none; }
  .only-mobile { display: block; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main { padding: 24px 0 48px; }
  .page-head h1 { font-size: 24px; }
  .header-row { min-height: 60px; gap: 8px; }
  .wordmark-name { font-size: 18px; }
  .header-user .user-name { display: none; }
  .header-user .hide-sm { display: none; }
  .seg button { font-size: 13px; padding: 0 4px; height: 40px; }
  .search { width: 100%; }
  .search .field-input { width: auto; flex: 1; min-width: 0; }
  .form-card { padding: 20px 16px; }
  .article-head, .article-body { padding: 20px 16px; }
  .attachments { margin: 0 16px 20px; }
  .comments { padding: 0 16px 20px; }
  .steps li { font-size: 13px; }
  /* responsive table → stacked rows */
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--aq-border); }
  .tbl-stack tbody tr:last-child { border-bottom: 0; }
  .tbl-stack td { padding: 2px 0; border: 0; text-align: left; }
  .tbl-stack td[data-label] { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
  .tbl-stack td[data-label]::before { content: attr(data-label); color: var(--aq-fg-muted); flex: none; }
  .tbl-stack td.num { text-align: right; }
  .tbl-stack td.title-cell { font-size: 16px; padding-bottom: 4px; }
  .tbl-stack td.hide-sm { display: none; }
  .tbl-stack td.inline-sm { display: inline-flex; align-items: center; gap: 4px; width: auto; margin-right: 12px; font-size: 14px; color: var(--aq-fg-muted); }
  .tbl-stack td.inline-sm::before { content: none; }
  .tbl-stack td.actions-cell { padding-top: 8px; }
  .post-rows .row-date { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* utilities added with JS views */
[hidden] { display: none !important; }
.only-mobile-inline { display: none; }
.aq-drawer { transition: transform var(--aq-dur-md) var(--aq-ease-emphasized), visibility 0s linear var(--aq-dur-md); }
.aq-drawer[data-open="true"] { transition: transform var(--aq-dur-md) var(--aq-ease-emphasized), visibility 0s; }
@media (max-width: 640px) {
  .only-mobile-inline { display: inline; }
  .hide-xs { display: none; }
}
