/* DEVTEAM Design Archive: all styles. Mobile first; one breakpoint at 768px (tablet/PC), collected at the bottom.
   Visual rule: rectangles are content (works, images), rounded pills are controls (filters, buttons). */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #f2f1ed;
  --surface: #e8e6e0;
  --text: #0e0e0d;
  --muted: #6b6963;
  --border: #d4d1c9;
  --primary: #0e0e0d;
  --on-primary: #f2f1ed;
  --danger: #b3261e;
  --radius: 4px;
  --max: 1680px;
  --gutter: 16px;
  --gap: 12px;
  --header-h: 52px;
  --font: "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* Arrows are masks painted with currentColor (data: images are allowed by the CSP img-src). */
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M3 12h17M13.5 5.5 20 12l-6.5 6.5'/%3E%3C/svg%3E");
  --icon-arrow-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M6 18 18 6M8.5 6H18v9.5'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10100f;
    --surface: #1b1b19;
    --text: #ecebe6;
    --muted: #9b9991;
    --border: #2f2e2b;
    --primary: #ecebe6;
    --on-primary: #10100f;
    --danger: #ff8a80;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1 0 auto; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.01em; }
h2 { font-size: 20px; }
a { color: var(--primary); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
::selection { color: var(--bg); background: var(--text); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 50; padding: 10px 16px; font-size: 14px; color: var(--bg); background: var(--text); border-radius: 999px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Arrow icon: two copies; on hover the first leaves and the second slides in. */
.arrow { position: relative; display: inline-block; flex: none; width: 1em; height: 1em; overflow: hidden; }
.arrow::before, .arrow::after {
  content: ""; position: absolute; inset: 0;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform 0.45s var(--ease);
}
.arrow::after { transform: translateX(-110%); }
.arrow-out::before, .arrow-out::after { -webkit-mask-image: var(--icon-arrow-out); mask-image: var(--icon-arrow-out); }
.arrow-out::after { transform: translate(-110%, 110%); }
a:hover > .arrow::before, a:focus-visible > .arrow::before, button:enabled:hover > .arrow::before { transform: translateX(110%); }
a:hover > .arrow-out::before, a:focus-visible > .arrow-out::before { transform: translate(110%, -110%); }
a:hover > .arrow::after, a:focus-visible > .arrow::after, button:enabled:hover > .arrow::after { transform: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.page { padding: 32px 0 56px; }
.section { padding: 8px 0 56px; }
.center { text-align: center; }
.page-title { margin: 0 0 20px; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.03em; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head .page-title { margin: 0; }
.lead { margin: 0 0 24px; max-width: 640px; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); }
.muted { color: var(--muted); }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; } /* minmax: wide tables scroll instead of widening the page */
.stack > .alert { margin: 0; }

/* ---------- Site header ---------- */
/* No bottom border: on the archive the sticky filter bar's rule separates it from the works. */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: -0.035em; color: var(--text); text-decoration: none; }
.brand-tag { display: none; font: 500 11px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; color: var(--muted); text-decoration: none; border-radius: 999px; transition: color 0.2s, background-color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); } /* "page" on the page itself, "true" on its section (case studies → Works) */
.nav-links a[aria-current]::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.nav-links .nav-cta { margin-left: 6px; padding: 0 12px; color: var(--text); border: 1px solid var(--text); }
.nav-links .nav-cta:hover, .nav-links .nav-cta[aria-current] { color: var(--bg); background: var(--text); }
.nav-links a.nav-cta::before { content: none; }
.nav-links .nav-cta .arrow { width: 13px; height: 13px; }
.nav-links form { margin: 0; }

/* ---------- Archive: intro ---------- */
/* Display sizes are fractions of the container width (cqi) so each headline line fills the measure exactly. */
.intro { padding: 28px 0 32px; }
.intro .container { container-type: inline-size; }
.intro-title {
  --display: calc(100cqi / 5.02);
  margin: 0;
  font-size: var(--display); font-weight: 700; line-height: 0.86; letter-spacing: -0.045em;
  text-transform: uppercase;
}
.intro-title > span { display: block; white-space: nowrap; }
.intro-count { display: inline-block; margin-left: 0.08em; font: 500 max(11px, 0.1em)/1 var(--mono); letter-spacing: 0; vertical-align: top; transform: translateY(0.35em); }
.intro-lead { max-width: 34em; margin-top: 22px; }
.intro-lead p { margin: 0; }
.intro-lead p:first-child { font-size: 18px; line-height: 1.35; letter-spacing: -0.015em; }
.intro-lead p + p { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- Archive: filter bar ---------- */
.archive { overflow-x: clip; scroll-margin-top: var(--header-h); } /* clip: full-bleed mobile images never cause sideways scroll */
.filter-bar { position: sticky; top: var(--header-h); z-index: 10; background: var(--bg); }
.filter-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--text); }
.filters { display: flex; gap: 6px; min-width: 0; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 16px;
  font: 500 12px/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text); background: transparent;
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.filter:hover { border-color: var(--text); }
.filter[aria-pressed="true"] { color: var(--bg); background: var(--text); border-color: var(--text); }
.filter-count { font: 500 10px/1 var(--mono); letter-spacing: 0; opacity: 0.6; transform: translateY(-0.4em); }
.filter-status { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* shown on PC; read by screen readers everywhere */

/* ---------- Archive: works grid ---------- */
/* Slots (data-slot) are set by archive.js so rows alternate one large card / a 7+5 column pair.
   Mobile has its own rhythm: large cards bleed edge to edge, the pair's minor card is inset from the left. */
.works-wrap { padding-top: 16px; padding-bottom: 72px; }
.works { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 48px; margin: 0; padding: 0; list-style: none; }
.work { --ratio: 4 / 5; --ratio-label: "4:5"; min-width: 0; }
.work-link { display: block; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.work-link:focus-visible { outline-offset: 6px; }

/* Image frame. A real cover is <img class="work-img"> in place of the two placeholder layers. */
.work-media { position: relative; overflow: hidden; aspect-ratio: var(--ratio); margin: 0 calc(-1 * var(--gutter)); color: var(--tone-ink, var(--muted)); background: var(--tone, var(--surface)); }
.work[data-slot="minor"] .work-media { margin-left: 22%; }
.work-img, .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.placeholder { background: radial-gradient(130% 95% at 18% 0%, var(--tone-hi, var(--surface)) 0%, var(--tone, var(--surface)) 74%); }
.placeholder-meta { position: absolute; inset: 0; pointer-events: none; font: 500 10px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.placeholder-meta::before { /* crop marks */
  content: ""; position: absolute; inset: 12px; opacity: 0.7;
  background:
    linear-gradient(currentColor, currentColor) top left / 14px 1px,
    linear-gradient(currentColor, currentColor) top left / 1px 14px,
    linear-gradient(currentColor, currentColor) top right / 14px 1px,
    linear-gradient(currentColor, currentColor) top right / 1px 14px,
    linear-gradient(currentColor, currentColor) bottom left / 14px 1px,
    linear-gradient(currentColor, currentColor) bottom left / 1px 14px,
    linear-gradient(currentColor, currentColor) bottom right / 14px 1px,
    linear-gradient(currentColor, currentColor) bottom right / 1px 14px;
  background-repeat: no-repeat;
}
.placeholder-meta::after { /* focal point */
  content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; opacity: 0.55;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
}
.placeholder-meta span { position: absolute; top: 22px; left: 22px; }
.placeholder-meta .placeholder-ratio { left: auto; right: 22px; }
.placeholder-ratio::before { content: var(--ratio-label); }

@media (prefers-color-scheme: dark) {
  .work-media, .shot-media { outline: 1px solid rgb(255 255 255 / 0.07); outline-offset: -1px; } /* keeps dark covers off the dark page */
}

/* Work palettes, taken from each demo's own colours. */
.tone-night { --tone: #141210; --tone-hi: #2e2720; --tone-ink: #d27a4c; --tone-panel: #e9e4da; --tone-panel-ink: #4a453e; } /* Fine Dining (GYEOL restaurant): night + ember, bone paper */
.tone-sand { --tone: #cbbda7; --tone-hi: #eee8dc; --tone-ink: #5c4733; }  /* Hotel (HAEON): basalt sand */
.tone-stone { --tone: #cfccc5; --tone-hi: #ebe9e4; --tone-ink: #4f4d48; } /* GYEOL Dermatology (a separate project): paper + ink */

/* Caption: outside the image, never on it. */
.work-caption { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "index title arrow" ". tags ."; column-gap: 8px; padding-top: 14px; }
.work[data-slot="minor"] .work-caption { margin-left: 22%; }
.work-index { grid-area: index; padding-top: 6px; font: 500 11px/1 var(--mono); color: var(--muted); }
.work-heading { grid-area: title; min-width: 0; }
.work-title { margin: 0; font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.035em; text-transform: uppercase; }
.work-title span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.5s var(--ease); }
.work-desc { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.work-tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; font: 500 10px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.work-tags li { padding: 5px 7px 4px; border: 1px solid var(--border); }
.work-tags .is-type { border-color: var(--text); }
.work-arrow { grid-area: arrow; width: 22px; height: 22px; margin-top: 1px; }

.work-link:hover .work-title span, .work-link:focus-visible .work-title span { background-size: 100% 2px; }
.work-link:hover > .work-caption .arrow::before, .work-link:focus-visible > .work-caption .arrow::before { transform: translateX(110%); }
.work-link:hover > .work-caption .arrow::after, .work-link:focus-visible > .work-caption .arrow::after { transform: none; }
@media (hover: hover) {
  .work-link:hover .placeholder, .work-link:hover .work-img { transform: scale(1.035); }
}
.work-link:active .work-media { opacity: 0.92; }

/* Filter change: View Transitions morph the cards between slots; older browsers get a short fade-in. */
.work.is-entering { animation: work-in 0.45s var(--ease) both; }
@keyframes work-in { from { opacity: 0; transform: translateY(12px); } }
::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: var(--ease); }
::view-transition-old(*), ::view-transition-new(*) { height: 100%; object-fit: cover; }

/* ---------- Archive: closing inquiry ---------- */
.cta { padding: 64px 0 56px; color: var(--bg); background: var(--text); }
.cta .container, .inquiry-intro .container { container-type: inline-size; }
.cta-title, .inquiry-title {
  --display: calc(100cqi / 4.45);
  margin: 0;
  font-size: var(--display); font-weight: 700; line-height: 0.88; letter-spacing: -0.045em;
  text-transform: uppercase;
}
.cta-title > span, .inquiry-title > span { display: block; white-space: nowrap; }
.cta-body { margin-top: 28px; }
.cta-text { margin: 0 0 24px; font-size: 16px; line-height: 1.65; color: color-mix(in srgb, var(--bg) 68%, var(--text)); }
.btn-cta {
  display: inline-flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 24px 0 28px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: var(--text); background: var(--bg); border-radius: 999px;
}
.btn-cta .arrow { width: 20px; height: 20px; }
.btn-cta:focus-visible { outline-color: var(--bg); }

/* ---------- Editorial blocks (case studies, about) ---------- */
/* Desktop sections sit on the 12-column grid: label in columns 1–3, statements from 4, reading text from 8. */
.chapter { padding: 56px 0 0; }
.chapter-last { padding-bottom: 72px; }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.section-label { margin: 0 0 20px; font: 500 11px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.section-label span { margin-right: 10px; color: var(--text); }
.statement { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.32; letter-spacing: -0.03em; }
.prose { max-width: 36em; margin-top: 28px; }
.prose p { margin: 0 0 1.1em; font-size: 16px; line-height: 1.8; }
.prose p:last-child { margin-bottom: 0; }

/* Numbered rows: case-study experience, about services. */
.index-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--text); }
.index-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "num title" ". text"; column-gap: 8px; padding: 20px 0 22px; border-bottom: 1px solid var(--border); }
.index-num { grid-area: num; padding-top: 7px; font: 500 11px/1 var(--mono); color: var(--muted); }
.index-title { grid-area: title; margin: 0; font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
.index-text { grid-area: text; margin: 10px 0 0; font-size: 15px; line-height: 1.75; color: var(--muted); }

.btn-pill {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 22px 0 24px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: var(--text); background: transparent; border: 1px solid var(--text); border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.btn-pill:hover { color: var(--bg); background: var(--text); }
.btn-pill.is-solid { color: var(--bg); background: var(--text); }
.btn-pill.is-solid:hover { opacity: 0.88; }
.btn-pill .arrow { width: 18px; height: 18px; }

/* ---------- Case study (/works/<slug>) ---------- */
/* The article carries the work's .tone-* so every placeholder and panel takes the work's colours. */
.case-intro { padding: 20px 0 32px; }
.case-intro .container, .next-work .container { container-type: inline-size; }
.case-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case-back { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.case-back .arrow { width: 14px; height: 14px; transform: scaleX(-1); }
.case-title, .next-title {
  --display: calc(100cqi / 7.45); /* "DERMATOLOGY", the longest word so far, fills the line */
  margin: 0;
  font-size: var(--display); font-weight: 700; line-height: 0.88; letter-spacing: -0.045em;
  text-transform: uppercase; overflow-wrap: break-word;
}
.case-summary { margin-top: 22px; }
.case-brand { margin: 0; font-size: 15px; color: var(--muted); }
.case-lead { margin: 14px 0 0; font-size: 19px; line-height: 1.5; letter-spacing: -0.015em; }
.case-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--text); }
.case-meta dt { font: 500 10px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.case-meta dd { margin: 6px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.case-meta > div:last-child { grid-column: 1 / -1; } /* website: a full row on mobile so the domain never breaks */
.case-meta a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.case-meta a:hover { text-decoration-thickness: 2px; }
.case-meta .arrow { width: 11px; height: 11px; margin-left: 4px; vertical-align: -1px; }

/* Screens: same placeholder layers as the archive cards. A real shot is <img class="work-img"> in .shot-media. */
.shot { --ratio: 16 / 10; --ratio-label: "16:10"; min-width: 0; margin: 0; }
.shot-hero { --ratio: 4 / 5; --ratio-label: "4:5"; }
.shot-detail { --ratio: 4 / 5; --ratio-label: "4:5"; }
.shot-phone { --ratio: 9 / 19.5; --ratio-label: "9:19.5"; }
.shot-media { position: relative; overflow: hidden; aspect-ratio: var(--ratio); color: var(--tone-ink, var(--muted)); background: var(--tone, var(--surface)); }
.shot:not(.shot-phone) .shot-media { margin: 0 calc(-1 * var(--gutter)); }
.shot .placeholder-meta span { max-width: calc(100% - 44px); }
.shot-phone .placeholder-meta span { top: 18px; left: 16px; }
.shot-phone .placeholder-meta .placeholder-ratio { top: auto; right: 16px; bottom: 18px; }
.shot-phone .placeholder-meta::before { inset: 8px; }
.shot figcaption { display: flex; gap: 10px; padding-top: 10px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.shot figcaption span { color: var(--text); }
.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.shot-panel { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 12px; margin: 0 calc(-1 * var(--gutter)); padding: 28px 16px 24px; color: var(--tone-panel-ink, var(--tone-ink, var(--muted))); background: var(--tone-panel, var(--tone-hi, var(--surface))); }
.shot-panel .shot-phone { width: calc(50% - 6px); }
.shot-panel figcaption, .shot-panel figcaption span { color: inherit; }

.visit-title { margin: 0; font-size: 40px; font-weight: 700; line-height: 0.92; letter-spacing: -0.045em; text-transform: uppercase; }
.visit-text { margin: 18px 0 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.demo-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; max-width: 46em; margin: 32px 0 0; padding-top: 14px; font-size: 13px; line-height: 1.7; color: var(--muted); border-top: 1px solid var(--border); }
.demo-note b { padding: 3px 6px 2px; font: 500 10px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); border: 1px solid var(--text); align-self: start; }

/* Next work: a band in the next work's colours. */
.next-work { display: block; padding: 36px 0 44px; color: var(--tone-ink); text-decoration: none; background: radial-gradient(130% 95% at 18% 0%, var(--tone-hi) 0%, var(--tone) 74%); }
.next-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; font: 500 11px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.next-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.15em; }
.next-title { --display: calc(100cqi / 8.1); } /* a little smaller than the case title: the arrow shares the line */
.next-title .arrow { width: 0.42em; height: 0.42em; margin-bottom: 0.08em; }
.next-work:hover .next-title .arrow::before, .next-work:focus-visible .next-title .arrow::before { transform: translateX(110%); }
.next-work:hover .next-title .arrow::after, .next-work:focus-visible .next-title .arrow::after { transform: none; }
.next-work:focus-visible { outline-offset: -6px; outline-color: currentColor; }

/* ---------- About ---------- */
.about-intro { padding: 28px 0 8px; }
.about-intro .container { container-type: inline-size; }
.about-title {
  --display: calc(100cqi / 7.05);
  margin: 0;
  font-size: var(--display); font-weight: 700; line-height: 0.88; letter-spacing: -0.045em;
  text-transform: uppercase;
}
.about-title span { display: block; white-space: nowrap; }
.about-lead { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.55; letter-spacing: -0.025em; }
.link-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--text); }
.link-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 20px 0 22px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.link-title { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; text-transform: uppercase; }
.link-title span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.5s var(--ease); }
.link-list a:hover .link-title span, .link-list a:focus-visible .link-title span { background-size: 100% 2px; }
.link-sub { grid-column: 1; font: 500 11px/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.link-list .arrow { grid-column: 2; grid-row: 1 / span 2; width: 26px; height: 26px; }

/* ---------- Inquiry (/inquiry, /inquiry/sent, /inquiry/failed) ---------- */
.inquiry-intro { padding: 28px 0 0; }
.inquiry-lead { max-width: 34em; margin: 24px 0 0; font-size: 17px; line-height: 1.65; }
.inquiry-form { display: grid; }
.form-section { display: grid; grid-template-columns: minmax(0, 1fr); padding: 24px 0 36px; border-top: 1px solid var(--text); }
.form-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; min-width: 0; }
.form-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-label { padding: 0; font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.req { margin-left: 4px; font: 500 10px/1 var(--mono); letter-spacing: 0.06em; color: var(--text); }
.field-input {
  width: 100%; min-height: 48px; padding: 10px 0;
  font: inherit; font-size: 18px; color: var(--text); background: transparent;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:hover { border-bottom-color: var(--muted); }
.field-input:focus { outline: none; border-bottom-color: var(--text); box-shadow: 0 1px 0 0 var(--text); }
.field-input::placeholder { color: var(--muted); opacity: 0.6; }
.field-input[aria-invalid="true"] { border-bottom-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.field-textarea { min-height: 200px; padding: 14px 16px; line-height: 1.7; resize: vertical; border: 1px solid var(--border); border-radius: var(--radius); }
.field-textarea:hover { border-color: var(--muted); }
.field-textarea:focus { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.field-textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; top: 50%; right: 4px; width: 8px; height: 8px; margin-top: -6px; border: solid var(--text); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.select-wrap select { appearance: none; padding-right: 32px; cursor: pointer; }
.field-error { margin: 0; font-size: 13px; line-height: 1.5; color: var(--danger); }
.field-hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.field-hint a { color: var(--text); text-underline-offset: 3px; }
.field-foot { display: flex; justify-content: space-between; gap: 16px; }
.field-count { flex: none; font: 500 11px/1.6 var(--mono); color: var(--muted); }

.chips-field { gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-size: 14px; border: 1px solid var(--border); border-radius: 999px; transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.chip:hover span { border-color: var(--text); }
.chip input:checked + span { color: var(--bg); background: var(--text); border-color: var(--text); }
.chip input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }

.consent-terms { display: grid; gap: 12px; margin: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.consent-terms dt { font: 500 10px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.consent-terms dd { margin: 4px 0 0; font-size: 14px; line-height: 1.65; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--text); cursor: pointer; }
.check input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding-top: 28px; border-top: 1px solid var(--text); }
.form-alert { flex-basis: 100%; margin: 0; line-height: 1.6; }
.form-alert:focus { outline: none; }
.btn-submit { height: 60px; padding: 0 26px 0 30px; font-size: 14px; cursor: pointer; }
.btn-submit:disabled { cursor: progress; opacity: 0.55; }

.result { padding: 40px 0 96px; }
.result-title { margin: 0; font-size: clamp(64px, 17vw, 240px); font-weight: 700; line-height: 0.88; letter-spacing: -0.045em; text-transform: uppercase; }
.result-body { max-width: 36em; margin-top: 32px; }
.result-text { margin: 0 0 8px; font-size: 18px; line-height: 1.6; }
.result .visit-actions { margin-top: 32px; }

/* ---------- Site footer (inverted; continues the closing inquiry on the archive) ---------- */
.site-footer { --footer-muted: color-mix(in srgb, var(--bg) 55%, var(--text)); --footer-line: color-mix(in srgb, var(--bg) 18%, var(--text)); font-size: 14px; color: var(--bg); background: var(--text); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--footer-muted); }
.site-footer :focus-visible { outline-color: var(--bg); }
.footer-top { display: grid; gap: 28px; padding: 40px 0 36px; }
main:has(.cta) + .site-footer .footer-top { border-top: 1px solid var(--footer-line); }
.footer-mark { font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.footer-brand p { margin: 10px 0 0; color: var(--footer-muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-official { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-official .arrow { width: 14px; height: 14px; }
.footer-legal { padding: 20px 0 28px; font-size: 12px; line-height: 1.7; color: var(--footer-muted); border-top: 1px solid var(--footer-line); }
.footer-legal p { margin: 0; }
.legal-list { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.legal-list li { white-space: nowrap; }
.legal-list li:not(:last-child)::after { content: "·"; margin: 0 8px; opacity: 0.5; }
.footer-legal .footer-bottom { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 14px; }
.footer-bottom span { flex-basis: 100%; }

/* ---------- Components ---------- */
.card { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}
.btn:hover { border-color: var(--text); }
.btn-primary { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { border-color: var(--primary); opacity: 0.88; }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn-link { padding: 0; font: inherit; color: var(--muted); text-transform: inherit; letter-spacing: inherit; background: none; border: 0; cursor: pointer; }
.btn-link:hover { color: var(--text); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 16px; font-weight: 400; /* 16px stops iOS zoom on focus */
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.input:focus { border-color: var(--text); outline: 1px solid var(--text); outline-offset: 0; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-form .input { flex: 1 1 220px; width: auto; min-width: 0; }

.alert { margin: 0 0 16px; padding: 12px 14px; font-size: 14px; color: var(--danger); border: 1px solid var(--danger); border-radius: var(--radius); }

.info { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-weight: 600; color: var(--muted); background: var(--surface); }
.table tr:last-child td { border-bottom: 0; }
.table form { margin: 0; }
.table .empty { padding: 32px 14px; text-align: center; color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; vertical-align: middle; }

/* ---------- Login ---------- */
.auth { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px 64px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px 24px; }
.auth h1 { margin: 0 0 20px; font-size: 24px; }

/* ---------- Admin ---------- */
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.topbar-right a { color: var(--muted); text-decoration: none; }
.topbar-right a:hover { color: var(--text); }
.topbar-right form { margin: 0; }
.topbar-user { display: none; color: var(--muted); }

.admin-body { flex: 1 0 auto; display: flex; flex-direction: column; }
.admin-sidebar { background: var(--surface); border-bottom: 1px solid var(--border); }
.sidebar-nav { display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; }
.sidebar-nav a { flex: none; padding: 8px 12px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: var(--radius); }
.sidebar-nav a:hover { color: var(--text); }
.sidebar-nav a[aria-current="page"] { font-weight: 600; color: var(--text); background: var(--bg); }
.admin-main { flex: 1; min-width: 0; padding: 24px 16px 48px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat-card { display: grid; gap: 4px; color: var(--text); text-decoration: none; transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--text); }
.stat-card .stat-label { font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.stat-card .stat-value { font-size: 36px; letter-spacing: -0.03em; }
.stat-hint { font-size: 12px; color: var(--muted); }
.admin-section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.notice { margin: 0 0 16px; padding: 12px 14px; font-size: 14px; border: 1px solid var(--text); border-radius: var(--radius); }

/* Status: filled = needs attention, outline = in progress, quiet = done. */
.status-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid var(--text); border-radius: 999px; }
.status-badge[data-status="new"] { color: var(--bg); background: var(--text); }
.status-badge[data-status="answered"] { color: var(--muted); border-color: var(--border); background: var(--surface); }
.status-badge[data-status="closed"] { color: var(--muted); border-color: var(--border); }

.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.admin-filters .input { flex: 1 1 180px; width: auto; min-width: 0; }
.admin-filters select.input { flex: 0 1 200px; }
.admin-filters .btn-link { align-self: center; padding: 0 6px; }
.status-tabs { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.status-tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; font-size: 13px; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-radius: 999px; }
.status-tabs a span { font: 500 11px/1 var(--mono); color: var(--muted); }
.status-tabs a:hover { border-color: var(--text); }
.status-tabs a[aria-current] { color: var(--bg); background: var(--text); border-color: var(--text); }
.status-tabs a[aria-current] span { color: inherit; opacity: 0.7; }
.row-link { display: block; font-weight: 600; color: var(--text); text-decoration: none; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
/* Mobile: one card per inquiry. */
.table-cards { border: 0; }
.table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.table-cards .table, .table-cards tbody, .table-cards tr, .table-cards td { display: block; }
.table-cards .table { white-space: normal; }
.table-cards tr { position: relative; margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.table-cards td { display: grid; grid-template-columns: 76px minmax(0, 1fr); justify-items: start; gap: 2px 12px; padding: 4px 0; border: 0; }
.table-cards td > * { grid-column: 2; } /* the label (::before) keeps column 1 */
.table-cards td::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
.table-cards td.empty { display: block; }
.table-cards td.empty::before { content: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font: 500 12px/1 var(--mono); color: var(--muted); }

.admin-back { display: inline-block; margin-bottom: 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.admin-back:hover { color: var(--text); }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 16px; min-width: 0; }
.detail-section h2 { margin: 0 0 14px; font-size: 15px; }
.message { font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-actions { margin: 16px 0 0; }
.detail-side .form { gap: 12px; }
.detail-side .chips-field { margin: 0; padding: 0; border: 0; }
.detail-side .chip span { min-height: 36px; padding: 0 14px; }
.timeline { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.timeline li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline-meta { margin: 0 0 6px; font: 500 11px/1.4 var(--mono); color: var(--muted); }
.timeline-memo { margin: 0; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline-status { display: flex; align-items: center; gap: 8px; margin: 0; }
.timeline-empty { font-size: 13px; color: var(--muted); }
.detail-danger { border-style: dashed; }
.detail-danger .check { font-size: 14px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Tablet / PC ---------- */
@media (min-width: 768px) {
  :root { --gutter: clamp(24px, 3vw, 48px); --gap: clamp(16px, 1.5vw, 24px); --header-h: 64px; }
  .page { padding: 56px 0 88px; }
  .section { padding-bottom: 80px; }
  .card { padding: 24px; }
  .auth { padding: 72px 24px 96px; }
  .auth .card { padding: 36px 32px; }

  .brand { font-size: 21px; }
  .brand-tag { display: inline; }
  .nav-links { gap: 6px; font-size: 13px; }
  .nav-links a { height: 36px; padding: 0 10px; }
  .nav-links .nav-cta { margin-left: 10px; padding: 0 16px; }

  /* Intro: "Selected Digital" fills line one; the lead hangs beside "Works" from column 8,
     the same column where the pair's minor card starts. */
  .intro { padding: clamp(32px, 4vw, 64px) 0 clamp(32px, 3.5vw, 56px); }
  .intro-title { --display: calc(100cqi / 8.9); white-space: nowrap; }
  .intro-title > span:nth-child(-n+2) { display: inline; }
  .intro-lead {
    --display: calc(100cqi / 8.9);
    max-width: none;
    margin: calc(var(--display) * -0.86) 0 0 calc(7 / 12 * (100% + var(--gap)));
    padding-top: calc(var(--display) * 0.07);
  }
  .intro-lead p { max-width: 30em; }
  .intro-lead p:first-child { font-size: clamp(17px, 1.5vw, 22px); }

  .filter-inner { padding: 12px 0; }
  .filters { margin: 0; padding: 0; }
  .filter { height: 38px; }
  .filter-status { position: static; width: auto; height: auto; overflow: visible; clip-path: none; flex: none; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

  .works-wrap { padding-top: clamp(20px, 2vw, 32px); padding-bottom: clamp(96px, 10vw, 160px); }
  .works { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(64px, 7vw, 120px); }
  .work { grid-column: 1 / -1; }
  .work-media, .work[data-slot="minor"] .work-media, .work[data-slot="minor"] .work-caption { margin: 0; }
  .work[data-slot="single"] { --ratio: 16 / 9; --ratio-label: "16:9"; }
  .work[data-slot="major"] { --ratio: 4 / 3; --ratio-label: "4:3"; grid-column: span 7; }
  .work[data-slot="minor"] { grid-column: span 5; }
  .work[data-offset] { margin-top: clamp(48px, 6.5vw, 120px); }
  .placeholder-meta { font-size: 11px; }
  .placeholder-meta::before { inset: 16px; }
  .placeholder-meta span { top: 28px; left: 28px; }
  .placeholder-meta .placeholder-ratio { right: 28px; }

  .work-caption { grid-template-columns: 40px minmax(0, 1fr) auto; padding-top: 16px; }
  .work-title { font-size: clamp(22px, 2vw, 32px); }
  .work-arrow { width: 26px; height: 26px; }
  /* The large card's caption sits on the 12-column grid, like a row of an index. */
  .work[data-slot="single"] .work-caption { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-areas: none; column-gap: var(--gap); padding-top: 20px; }
  .work[data-slot="single"] .work-index { grid-column: 1; grid-row: 1; padding-top: 10px; }
  .work[data-slot="single"] .work-heading { grid-column: 2 / 8; grid-row: 1; }
  .work[data-slot="single"] .work-title { font-size: clamp(32px, 3.6vw, 60px); }
  .work[data-slot="single"] .work-tags { grid-column: 8 / 12; grid-row: 1; align-self: start; margin-top: 8px; }
  .work[data-slot="single"] .work-arrow { grid-column: 12; grid-row: 1; justify-self: end; width: 34px; height: 34px; margin-top: 2px; }

  .cta { padding: clamp(72px, 8vw, 128px) 0 clamp(64px, 6vw, 96px); }
  .cta-title, .inquiry-title { --display: calc(100cqi / 8.07); white-space: nowrap; }
  .cta-title > span:nth-child(-n+2), .inquiry-title > span:nth-child(-n+2) { display: inline; }
  .cta-body, .inquiry-lead { --display: calc(100cqi / 8.07); margin: calc(var(--display) * -0.88) 0 0 calc(7 / 12 * (100% + var(--gap))); padding-top: calc(var(--display) * 0.08); }
  .cta-text { max-width: 26em; font-size: 17px; }

  .footer-top { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 48px 0 44px; }
  .footer-brand { grid-column: 1 / 7; }
  .footer-nav { grid-column: 8 / 10; align-content: start; flex-direction: column; gap: 10px; }
  .footer-official { grid-column: 10 / -1; align-self: start; justify-self: end; }
  .footer-legal { padding: 24px 0 32px; }
  .footer-legal .footer-bottom { margin-top: 18px; }
  .footer-bottom span { flex-basis: auto; margin-right: auto; }

  .chapter { padding: clamp(88px, 9vw, 144px) 0 0; }
  .chapter-last { padding-bottom: clamp(96px, 9vw, 144px); }
  .chapter-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .chapter-grid > * { grid-column: 1 / -1; }
  .chapter-grid > .section-label { grid-column: 1 / 4; }
  .chapter-grid > .statement, .chapter-grid > .about-lead { grid-column: 4 / -1; }
  .chapter-grid > .prose { grid-column: 8 / -1; margin-top: clamp(40px, 4vw, 64px); }
  .section-label { margin-bottom: 28px; }
  .statement { font-size: clamp(28px, 2.9vw, 46px); line-height: 1.28; }
  .prose p { font-size: 17px; }
  .index-list li { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-areas: none; column-gap: var(--gap); padding: 28px 0 30px; }
  .index-num { grid-column: 1; grid-row: 1; padding-top: 10px; }
  .index-title { grid-column: 2 / 8; grid-row: 1; font-size: clamp(24px, 2.2vw, 34px); }
  .index-text { grid-column: 8 / -1; grid-row: 1; margin: 2px 0 0; font-size: 16px; }

  .case-intro { padding: clamp(24px, 3vw, 48px) 0 clamp(36px, 3.5vw, 56px); }
  .case-nav { margin-bottom: clamp(32px, 4vw, 64px); }
  .case-title, .next-title { --display: calc(100cqi / 8.4); }
  .case-summary { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); margin-top: clamp(28px, 3vw, 48px); }
  .case-brand { grid-column: 1 / 7; padding-top: 4px; }
  .case-lead { grid-column: 8 / -1; margin: 0; font-size: clamp(18px, 1.5vw, 22px); }
  .case-meta { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); margin-top: clamp(40px, 4vw, 64px); }
  .case-meta > div:nth-child(1) { grid-column: 1 / 3; }
  .case-meta > div:nth-child(2) { grid-column: 3 / 5; }
  .case-meta > div:nth-child(3) { grid-column: 5 / 8; }
  .case-meta > div:nth-child(4) { grid-column: 8 / 10; }
  .case-meta > div:nth-child(5) { grid-column: 10 / -1; }
  .shot-hero { --ratio: 16 / 9; --ratio-label: "16:9"; }
  .shot:not(.shot-phone) .shot-media { margin: 0; }
  .gallery { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(48px, 5vw, 80px) var(--gap); align-items: end; }
  .gallery > * { grid-column: 1 / -1; }
  .gallery > .shot-wide { grid-column: span 8; }
  .gallery > .shot-detail { grid-column: span 4; }
  .shot-panel { margin: 0; padding: clamp(48px, 6vw, 96px) var(--gap) clamp(32px, 4vw, 56px); gap: 40px clamp(24px, 3vw, 56px); }
  .shot-panel .shot-phone { width: clamp(180px, 17vw, 270px); }
  .shot-phone .placeholder-meta span { top: 22px; left: 20px; }
  .shot-phone .placeholder-meta .placeholder-ratio { right: 20px; bottom: 22px; }
  .shot-phone .placeholder-meta::before { inset: 10px; }
  .chapter-grid > .visit-title { grid-column: 1 / 7; }
  .visit-title { font-size: clamp(48px, 5.4vw, 92px); }
  .chapter-grid > .visit-body { grid-column: 8 / -1; }
  .visit-text { margin-top: 0; font-size: 17px; }
  .next-work { padding: clamp(40px, 4vw, 64px) 0 clamp(48px, 5vw, 80px); }

  .inquiry-intro { padding: clamp(32px, 4vw, 64px) 0 0; }
  .inquiry-lead { max-width: none; font-size: clamp(17px, 1.4vw, 20px); }
  .form-section { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 32px 0 56px; }
  .form-section > .section-label { grid-column: 1 / 4; }
  .form-fields { grid-column: 4 / -1; gap: 32px; }
  .form-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
  .form-submit { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-top: 32px; }
  .form-submit > * { grid-column: 4 / -1; }
  .form-submit > .btn-submit { grid-column: 4 / 7; justify-self: start; }
  .form-submit > .field-hint { grid-column: 7 / -1; align-self: center; }
  .result { padding: clamp(48px, 6vw, 96px) 0 clamp(96px, 10vw, 160px); }
  .result-body { margin-left: calc(7 / 12 * (100% + var(--gap))); }

  .about-intro { padding: clamp(32px, 4vw, 64px) 0 0; }
  .about-title { --display: calc(100cqi / 8.05); white-space: nowrap; }
  .about-title span:not(:nth-child(3)) { display: inline; }
  .about-lead { font-size: clamp(24px, 2.4vw, 38px); line-height: 1.45; }
  .link-list a { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 28px 0 30px; }
  .link-title { grid-column: 1 / 8; font-size: clamp(32px, 4.2vw, 68px); }
  .link-sub { grid-column: 8 / 12; grid-row: 1; }
  .link-list .arrow { grid-column: 12; grid-row: 1; justify-self: end; width: 40px; height: 40px; }

  .admin-topbar { position: sticky; top: 0; z-index: 10; padding: 0 24px; }
  .topbar-user { display: inline; }
  .admin-body { flex-direction: row; }
  .admin-sidebar { flex: none; width: 220px; border-bottom: 0; border-right: 1px solid var(--border); }
  .sidebar-nav { position: sticky; top: 56px; flex-direction: column; padding: 16px 12px; overflow: visible; }
  .admin-main { padding: 32px; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .table-cards { border: 1px solid var(--border); }
  .table-cards thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .table-cards .table { display: table; white-space: nowrap; }
  .table-cards tbody { display: table-row-group; }
  .table-cards tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .table-cards td { display: table-cell; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table-cards td::before { content: none; }
  .table-cards tr:last-child td { border-bottom: 0; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 20px; }
}
