/* ============================================================
   Alex Therakathu — portfolio
   Palette: cool signage neutrals with a deep signal-teal accent.
   Type: Archivo on its width axis (expanded for display, normal
   for body), IBM Plex Mono for repository names and figures.
   ============================================================ */

/* ---------- Tokens: light is the base set ---------- */
:root {
  --paper:      #edf1f4;
  --surface:    #ffffff;
  --surface-2:  #f6f8fa;
  --ink:        #0f1a24;
  --ink-2:      #263743;
  --muted:      #566875;
  --line:       #d2dae1;
  --line-soft:  #e2e8ed;

  --accent:     #0a6e8a;
  --accent-ink: #085469;
  --accent-wash:#e2eff4;

  --shadow:     0 1px 2px rgba(15, 26, 36, .06), 0 8px 24px -12px rgba(15, 26, 36, .18);
  --shadow-lift:0 2px 4px rgba(15, 26, 36, .07), 0 18px 40px -18px rgba(15, 26, 36, .28);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 10px;
}

/* System dark — must not override an explicit light choice */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0a1219;
    --surface:    #111c24;
    --surface-2:  #16222b;
    --ink:        #e4ecf2;
    --ink-2:      #c3d2dc;
    --muted:      #8ea2af;
    --line:       #22333e;
    --line-soft:  #1a2831;

    --accent:     #57c6e8;
    --accent-ink: #8bdcf5;
    --accent-wash:#132b36;

    --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .7);
    --shadow-lift:0 2px 4px rgba(0, 0, 0, .45), 0 18px 40px -18px rgba(0, 0, 0, .85);
  }
}

/* Explicit dark choice — wins over a light OS */
:root[data-theme="dark"] {
  --paper:      #0a1219;
  --surface:    #111c24;
  --surface-2:  #16222b;
  --ink:        #e4ecf2;
  --ink-2:      #c3d2dc;
  --muted:      #8ea2af;
  --line:       #22333e;
  --line-soft:  #1a2831;

  --accent:     #57c6e8;
  --accent-ink: #8bdcf5;
  --accent-wash:#132b36;

  --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .7);
  --shadow-lift:0 2px 4px rgba(0, 0, 0, .45), 0 18px 40px -18px rgba(0, 0, 0, .85);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--accent-ink); }

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

code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: .08em .35em;
  color: var(--ink-2);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
  text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.bar-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  margin-right: auto;
}
.brand-mark { width: 21px; height: 21px; color: var(--accent); flex: none; }

.bar-nav { display: flex; gap: 22px; }
.bar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .16s ease;
}
.bar-nav a:hover { color: var(--ink); }

.theme {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.theme:hover { color: var(--ink); border-color: var(--muted); }
.theme svg { width: 17px; height: 17px; }

/* Icon swap: sun in light, moon in dark */
.t-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-sun,
  :root:not([data-theme="light"]) .t-rays { display: none; }
  :root:not([data-theme="light"]) .t-moon { display: block; }
}
:root[data-theme="dark"] .t-sun,
:root[data-theme="dark"] .t-rays { display: none; }
:root[data-theme="dark"] .t-moon { display: block; }
:root[data-theme="light"] .t-sun,
:root[data-theme="light"] .t-rays { display: block; }
:root[data-theme="light"] .t-moon { display: none; }

/* ---------- Shared section frame ---------- */
main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 92px); border-top: 1px solid var(--line-soft); }

.sec-head { margin-bottom: 30px; }

h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.12;
  margin: 0 0 8px;
  text-wrap: balance;
}

.sec-note { margin: 0; color: var(--muted); font-size: 15px; max-width: 62ch; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 84px) clamp(40px, 6vw, 64px); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 20px;
}

h1 {
  font-size: clamp(32px, 6.2vw, 62px);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.04;
  margin: 0 0 24px;
  max-width: 17ch;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(16px, 1.7vw, 18.5px);
  line-height: 1.62;
  color: var(--ink-2);
}

.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 44px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fig { background: var(--surface); padding: 18px 20px; }
.fig dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.35;
}
.fig dd {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  letter-spacing: -.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Controls ---------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 28px;
  margin-bottom: 26px;
}

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

.chip-btn {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 13px;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.chip-btn:hover { color: var(--ink); border-color: var(--muted); }
.chip-btn .n {
  font-family: var(--mono);
  font-size: 11.5px;
  opacity: .65;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.chip-btn.is-on {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
}
.chip-btn.is-on .n { opacity: .7; }

/* ---------- Work grid ---------- */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-lift); border-color: var(--muted); }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.repo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: none;
  word-break: break-word;
}
.repo:hover { text-decoration: underline; text-underline-offset: 3px; }
.repo svg { width: 13px; height: 13px; flex: none; opacity: .7; }

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  flex: none;
}

.card h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.card-desc { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

.feats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}
.feats li {
  position: relative;
  padding-left: 16px;
  font-size: 13.8px;
  line-height: 1.5;
  color: var(--muted);
}
.feats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
}

.tech {
  margin: auto 0 0;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .01em;
}

/* Cards for apps that are on a store carry the tech line and the store link
   on one row; the wrapper takes over pushing them to the bottom. */
.card-foot {
  margin: auto 0 0;
  padding-top: 6px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
}
.card-foot .tech { margin: 0; padding-top: 0; }

.store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--accent-ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  background: var(--surface-2);
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.store:hover {
  border-color: var(--accent);
  background: var(--accent-wash);
}
.store svg {
  width: 12px;
  height: 12px;
  flex: none;
  fill: currentColor;
  opacity: .85;
}

@media (prefers-reduced-motion: reduce) {
  .store { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}

.empty {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Clickable cards ---------- */
/* The heading carries the link; its ::after stretches over the whole card so the
   card is one target. The repo and store links sit above it on z-index so they
   still go to their own destinations. */
.card { position: relative; }

.card h3 a.card-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.card h3 a.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.card h3 a.card-link:hover { color: var(--accent-ink); }
.card h3 a.card-link:focus-visible { outline: none; }
.card:focus-within { border-color: var(--muted); box-shadow: var(--shadow-lift); }
.card h3 a.card-link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.go {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: .45;
  transition: transform .18s ease, opacity .18s ease;
}
.card:hover .go { opacity: .9; transform: translateX(3px); }

.card .repo, .card .store { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .go { transition: none; }
  .card:hover .go { transform: none; }
}

/* ---------- App detail pages ---------- */
.app-hero { padding-block: clamp(28px, 4vw, 44px) clamp(36px, 5vw, 56px); }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.backlink:hover { color: var(--ink); }
.backlink .back { transform: rotate(180deg); opacity: .6; }
.backlink:hover .back { opacity: .9; }

.app-hero h1 {
  font-size: clamp(30px, 5vw, 50px);
  margin-bottom: 18px;
  max-width: 20ch;
}
.app-hero .lede { margin-bottom: 28px; }

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}
.app-links .btn { gap: 7px; }
.app-links .btn svg { width: 13px; height: 13px; flex: none; }
.app-links .btn-primary svg { fill: currentColor; }

.app-feats {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  gap: 9px;
  max-width: 68ch;
}
.app-feats li { font-size: 14.8px; }
.app-hero .tech { margin-top: 16px; }
/* A second mono line under the stack, for a shipped app's release facts. */
.app-hero .app-meta { margin-top: 5px; color: var(--muted); opacity: .85; }

/* Prose on the detail pages */
.prose { max-width: 68ch; }
.prose h3 {
  margin: 30px 0 9px;
  font-size: 17.5px;
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  letter-spacing: -.015em;
  line-height: 1.25;
  text-wrap: balance;
}
.prose h3:first-child { margin-top: 0; }
.prose p {
  margin: 0 0 13px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.68;
}
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }

/* A wrapping grid, rather than the home page's filmstrip */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 26px 20px;
}
.gallery .shot { width: auto; }

/* ---------- Screens ---------- */
.shots + .shots { margin-top: 44px; }

.shots-head { margin-bottom: 18px; }
.shots-head h3 {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  letter-spacing: -.015em;
}
.shots-head p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Horizontal filmstrip — the only element allowed past the page gutter */
.strip {
  list-style: none;
  margin: 0;
  padding: 4px 4px 14px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.shot {
  flex: 0 0 auto;
  width: 190px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shot-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 20px;
}

/* Device bezel */
.phone {
  display: block;
  background: #11181f;
  padding: 5px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.shot-btn:hover .phone { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 15px;
}

.shot-cap {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* Watch face */
.watch-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.watch-btn { border-radius: 50%; flex: none; }
.watch {
  display: block;
  width: 168px;
  height: 168px;
  padding: 7px;
  border-radius: 50%;
  background: #11181f;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.watch-btn:hover .watch { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.watch img { display: block; width: 100%; height: 100%; border-radius: 50%; }

.watch-note {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
}

@media (prefers-reduced-motion: reduce) {
  .phone, .watch { transition: none; }
  .shot-btn:hover .phone, .watch-btn:hover .watch { transform: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 460px);
  max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(6, 12, 17, .82); }

.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
  background: #11181f;
}
.lightbox-cap {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.5;
  color: #dbe6ee;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: #11181f;
  color: #dbe6ee;
  cursor: pointer;
}
.lightbox-close svg { width: 17px; height: 17px; }
.lightbox-close:hover { background: #1c2831; }

/* ---------- Notes ---------- */
.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 32px;
}
.notes li {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 18px;
  border-top: 2px solid var(--accent);
}
.notes h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  font-variation-settings: "wdth" 106;
  letter-spacing: -.015em;
  line-height: 1.25;
  text-wrap: balance;
}
.notes p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.62;
}

/* ---------- Stack ---------- */
.stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
}
.stack-col h3 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.stack-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.stack-col li { font-size: 14.5px; color: var(--ink-2); }

/* ---------- Contact ---------- */
.contact h2 { margin-bottom: 10px; }
.contact-lede {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 16px;
  max-width: 54ch;
}
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.btn:hover { border-color: var(--muted); color: var(--ink); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
:root[data-theme="dark"] .btn-primary { color: #06171e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { color: #06171e; }
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #ffffff; }
:root[data-theme="dark"] .btn-primary:hover { color: #06171e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary:hover { color: #06171e; }
}

/* ---------- Footer ---------- */
.foot {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 30px var(--gutter) 48px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
}
.foot p { margin: 0; font-size: 13px; color: var(--muted); max-width: 62ch; }
.foot-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  display: flex;
  gap: 7px;
  white-space: nowrap;
}

/* ---------- Privacy ---------- */
.bar-nav a[aria-current] { color: var(--ink); }
.foot a { color: inherit; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pcard-name {
  margin: 0;
  font-size: 21px;
  font-variation-settings: "wdth" 106;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.pcard-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.pcard-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard-link svg { width: 14px; height: 14px; flex: none; }
/* The whole card is the hit area for its one link. */
.pcard { position: relative; }
.pcard-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }

.policy-page { max-width: calc(72ch + 2 * var(--gutter)); padding-block: 32px 72px; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.back svg { width: 15px; height: 15px; }

.policy-head { padding-block: 36px 28px; border-bottom: 1px solid var(--line-soft); }
.policy-head h1 { margin-bottom: 12px; }
.policy-date { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.policy { padding-top: 12px; color: var(--ink-2); font-size: 16px; line-height: 1.68; overflow-wrap: break-word; }
.policy p, .policy ul, .policy ol, .policy blockquote, .policy table { margin: 0 0 16px; }
.policy ul, .policy ol { padding-left: 22px; }
.policy li { margin: 4px 0; }
.policy li::marker { color: var(--accent); }
.policy strong { color: var(--ink); }
.policy .p-h {
  font-size: 22px;
  font-variation-settings: "wdth" 106;
  margin: 36px 0 10px;
  color: var(--ink);
}
.policy .p-sh { font-size: 17px; margin: 24px 0 8px; color: var(--ink); }
.policy blockquote {
  padding: 14px 18px;
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.policy blockquote p { margin: 0; }
.policy table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 14.5px;
}
.policy th, .policy td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border: 1px solid var(--line);
}
.policy th { background: var(--surface-2); color: var(--ink); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 620px) {
  .bar-nav { display: none; }
  h1 { max-width: none; }
  .fig dd { font-size: 26px; }
  .fig { padding: 14px 15px; }
  .shot { width: 156px; }
  .watch { width: 140px; height: 140px; }
  .foot { flex-direction: column; }
}

@media (max-width: 420px) {
  .stack { grid-template-columns: minmax(0, 1fr); }
}
