/* Around Android
   Layout: the site behaves like an Android home screen. Tonal surfaces, big rounded containers,
   expressive shapes for section identity, one dark "wallpaper" surface per page type. */

@font-face {
  font-family: 'Roboto Flex';
  src: url('/fonts/roboto-flex.woff2') format('woff2');
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-display: swap;
}

:root {
  --bg: #f4f8ec;
  --s1: #edf2e4;
  --s2: #e4ebda;
  --s3: #d9e2cd;
  --card: #ffffff;
  --ink: #151c11;
  --ink-2: #414a3b;
  --ink-3: #69735f;
  --line: #c5cebb;
  --primary: #356a17;
  --on-primary: #ffffff;
  --primary-c: #b8f28f;
  --on-primary-c: #0b2100;
  --inv: #2e3329;
  --on-inv: #eff3e6;
  --brand: #6ab344;

  /* wallpaper surface (hero, section headers, footer): the same in both themes */
  --wall: #173b0b;
  --wall-ink: #f0fbe6;
  --wall-2: #c9e6b4;
  --wp-1: #6ab344;
  --wp-2: #ffe07a;
  --wp-3: #cde5ff;
  --x-green: #b8f28f; --x-lemon: #ffe07a; --x-sky: #cde5ff; --x-lilac: #e6deff; --x-peach: #ffd6c6; --x-mint: #bdefe6;
  --x-ink: #10180b;

  /* section colours */
  --green-c: #b8f28f;  --on-green: #0b2100;
  --lemon-c: #ffe07a;  --on-lemon: #231b00;
  --sky-c: #cde5ff;    --on-sky: #001d33;
  --lilac-c: #e6deff;  --on-lilac: #1e1453;
  --peach-c: #ffd6c6;  --on-peach: #3a0b00;
  --mint-c: #bdefe6;   --on-mint: #00201c;

  --shadow: 0 1px 2px rgb(21 28 17 / 0.08), 0 6px 20px -8px rgb(21 28 17 / 0.22);
  --font: 'Roboto Flex', Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: 1280px;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10140d;
    --s1: #181d14;
    --s2: #1f2519;
    --s3: #293122;
    --card: #141910;
    --ink: #e2e8d8;
    --ink-2: #c1cab6;
    --ink-3: #8e9885;
    --line: #3d4636;
    --primary: #a5d884;
    --on-primary: #143800;
    --primary-c: #285208;
    --on-primary-c: #c2f59b;
    --inv: #e2e8d8;
    --on-inv: #2e3329;
    --wall: #0e2606;
    --green-c: #285208;  --on-green: #c2f59b;
    --lemon-c: #4f4200;  --on-lemon: #ffe07a;
    --sky-c: #0f4a73;    --on-sky: #cde5ff;
    --lilac-c: #463c7a;  --on-lilac: #e6deff;
    --peach-c: #6b2c14;  --on-peach: #ffd6c6;
    --mint-c: #005048;   --on-mint: #bdefe6;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -10px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

.c-green { --c: var(--green-c); --on-c: var(--on-green); }
.c-lemon { --c: var(--lemon-c); --on-c: var(--on-lemon); }
.c-sky   { --c: var(--sky-c);   --on-c: var(--on-sky); }
.c-lilac { --c: var(--lilac-c); --on-c: var(--on-lilac); }
.c-peach { --c: var(--peach-c); --on-c: var(--on-peach); }
.c-mint  { --c: var(--mint-c);  --on-c: var(--on-mint); }
.dock .c-green { --c: var(--x-green); }
.dock .c-lemon { --c: var(--x-lemon); }
.dock .c-sky   { --c: var(--x-sky); }
.dock .c-lilac { --c: var(--x-lilac); }
.dock .c-peach { --c: var(--x-peach); }
.dock .c-mint  { --c: var(--x-mint); }
.dock .badge { --on-c: var(--x-ink); }

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--primary-c); color: var(--on-primary-c); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  padding: 10px 16px; border-radius: 12px;
  background: var(--inv); color: var(--on-inv); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.ic { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- shared components ---------- */

.badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--bs, 56px);
  aspect-ratio: 1;
  flex: none;
  color: var(--on-c);
}
.badge .shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--c);
  transition: transform 0.6s var(--spring);
}
.badge .ic { position: relative; width: 44%; height: 44%; }
.badge-sm { --bs: 44px; }
.badge-lg { --bs: 60px; }
.badge-xl { --bs: clamp(88px, 11vw, 140px); }
a:hover .badge .shape,
.badge:hover .shape { transform: rotate(45deg) scale(1.05); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 8px;
  border-radius: 10px;
  background: var(--c);
  color: var(--on-c);
  font-size: 13.5px;
  font-weight: 650;
  font-stretch: 105%;
  text-decoration: none;
  white-space: nowrap;
  transition: border-radius 0.3s var(--spring);
}
.chip .ic { width: 18px; height: 18px; }
a.chip:hover { border-radius: 16px; }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 24px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15.5px;
  font-weight: 650;
  font-stretch: 105%;
  text-decoration: none;
  transition: border-radius 0.35s var(--spring), transform 0.2s;
}
.btn:hover { border-radius: 12px; }
.btn:active { transform: scale(0.97); }
.btn .ic { width: 20px; height: 20px; }
.btn-tonal { background: var(--s3); color: var(--ink); }
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.text-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-btn .ic { width: 18px; height: 18px; transition: transform 0.3s var(--spring); }
.text-btn:hover .ic { transform: translateX(3px); }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  white-space: nowrap;
}
.meta-chip .ic { width: 18px; height: 18px; fill: var(--ink-3); }

.fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px 0 16px;
  border-radius: 16px;
  background: var(--primary-c);
  color: var(--on-primary-c);
  font-size: 15px;
  font-weight: 700;
  font-stretch: 105%;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-radius 0.35s var(--spring), transform 0.2s;
}
.fab:hover { border-radius: 24px; }
.fab:active { transform: scale(0.96); }
.fab .ic { width: 22px; height: 22px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
}
.header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}
.brand { display: inline-flex; color: var(--ink); }
.brand .wordmark { height: 26px; width: auto; }
.nav ul { display: flex; justify-content: center; gap: 4px; }
.nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 10px;
  border-radius: 20px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 620;
  font-stretch: 105%;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-radius 0.3s var(--spring);
}
.nav-chip .ic { width: 19px; height: 19px; fill: var(--ink-3); transition: fill 0.2s; }
.nav-chip:hover { background: var(--s2); border-radius: 12px; }
.nav-chip:hover .ic,
.nav-chip[aria-current='page'] .ic { fill: var(--on-c); }
.nav-chip[aria-current='page'] { background: var(--c); color: var(--on-c); }

@media (max-width: 1140px) {
  .site-header { position: static; }
  html { scroll-padding-top: 16px; }
  .header-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding-block: 12px 10px; }
  .brand { justify-self: start; }
  .nav { grid-column: 1 / -1; grid-row: 2; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { justify-content: flex-start; width: max-content; }
  .nav-chip { background: var(--s1); }
}
@media (max-width: 560px) {
  .brand .wordmark { height: 22px; }
  .header-row .fab { min-height: 44px; padding: 0 12px; }
  .header-row .fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---------- homepage: home screen ---------- */

.home-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  margin-top: 8px;
  padding: clamp(20px, 3.5vw, 44px);
  border-radius: 40px;
  background: var(--wall);
  color: var(--wall-ink);
}
.wallpaper { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.wp { position: absolute; animation: spin 120s linear infinite; }
.wp-1 { width: clamp(320px, 46vw, 620px); right: -12%; top: -38%; color: var(--wp-1); opacity: 0.55; }
.wp-2 { width: clamp(200px, 26vw, 360px); left: -8%; bottom: -26%; color: var(--wp-2); opacity: 0.9; animation-duration: 90s; animation-direction: reverse; }
.wp-3 { width: clamp(110px, 12vw, 180px); right: -4%; top: 52%; color: var(--wp-3); opacity: 0.9; animation-duration: 60s; }
@keyframes spin { to { transform: rotate(360deg); } }

.glance-date { font-size: clamp(16px, 1.5vw, 19px); font-weight: 550; font-stretch: 112%; color: var(--wall-2); }
.glance-date time:empty::before { content: '\00a0'; }
.glance-title {
  margin-top: 6px;
  max-width: 14ch;
  font-size: clamp(36px, 5.6vw, 76px);
  font-weight: 900;
  font-stretch: 135%;
  line-height: 0.94;
  letter-spacing: -0.015em;
}

.widget {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 34px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 50px -24px rgb(0 0 0 / 0.6);
}
.widget-media { display: block; align-self: center; border-radius: 26px; overflow: hidden; }
.widget-media img,
.widget-media .img-fallback { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.6s ease; }
.widget:hover .widget-media img { transform: scale(1.03); }
.widget-text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; padding: clamp(12px, 2vw, 28px); min-width: 0; }
.widget-title { font-size: clamp(26px, 2.8vw, 40px); font-weight: 800; font-stretch: 108%; line-height: 1.04; letter-spacing: -0.015em; }
.widget-title a { text-decoration: none; }
.widget-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--brand); text-underline-offset: 5px; }
.widget-dek { font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.widget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.widget-empty { display: block; padding: 48px 32px; font-size: 22px; font-weight: 600; }

.dock { justify-self: center; max-width: 100%; }
.dock ul {
  display: flex;
  gap: clamp(8px, 2vw, 28px);
  padding: 14px clamp(14px, 2.4vw, 28px);
  border-radius: 40px;
  background: rgb(255 255 255 / 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--wall-ink);
  font-size: 13.5px;
  font-weight: 620;
  font-stretch: 105%;
  text-decoration: none;
}
.app .badge { --bs: clamp(52px, 5vw, 64px); transition: transform 0.4s var(--spring); }
.app:hover .badge { transform: translateY(-4px) scale(1.06); }
.app:active .badge { transform: scale(0.94); }

@media (max-width: 900px) {
  .widget { grid-template-columns: minmax(0, 1fr); }
  .widget-text { padding: 12px 10px 14px; }
}
@media (max-width: 600px) {
  .home-screen { border-radius: 32px; }
  .dock { justify-self: stretch; }
  .dock ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; border-radius: 32px; }
}

/* panels under the home screen */
.panels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel { padding: clamp(18px, 2.4vw, 28px); border-radius: 32px; background: var(--s1); min-width: 0; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 22px; font-weight: 780; font-stretch: 112%; }
.panel-title .ic { width: 24px; height: 24px; fill: var(--primary); }
@media (max-width: 900px) { .panels { grid-template-columns: minmax(0, 1fr); } }

.panel-tip { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; background: var(--lemon-c); color: var(--on-lemon); }
.tip-shape { position: absolute; z-index: -1; right: -70px; bottom: -90px; width: 300px; height: 300px; color: var(--on-lemon); opacity: 0.08; animation: spin 70s linear infinite; }
.tip-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 720; font-stretch: 112%; letter-spacing: 0.04em; text-transform: uppercase; }
.tip-eyebrow .ic { width: 22px; height: 22px; }
.tip-title { max-width: 14ch; font-size: clamp(30px, 3.4vw, 46px); font-weight: 920; font-stretch: 130%; line-height: 0.98; letter-spacing: -0.015em; }
.tip-text { max-width: 34em; font-size: 16.5px; line-height: 1.55; }
.panel-tip .btn { margin-top: auto; background: var(--on-lemon); color: var(--lemon-c); overflow-wrap: anywhere; }
.notif-list { display: grid; gap: 6px; }
.notif {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 24px;
  background: var(--card);
  text-decoration: none;
  transition: border-radius 0.3s var(--spring), background-color 0.2s;
}
.notif:hover { border-radius: 14px; background: var(--s2); }
.notif-body { display: grid; gap: 3px; min-width: 0; }
.notif-meta { font-size: 12.5px; font-weight: 550; color: var(--ink-3); }
.notif-title { font-size: 17px; font-weight: 720; line-height: 1.25; }
.notif-text { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-thumb img,
.notif-thumb .img-fallback { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; }
.notif-empty { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 24px; background: var(--card); color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.notif-empty .ic { width: 28px; height: 28px; fill: var(--ink-3); margin-top: 2px; }
.notif-empty strong { display: block; color: var(--ink); font-size: 17px; font-weight: 720; margin-bottom: 2px; }
@media (max-width: 480px) { .notif-thumb { display: none; } }

.switch-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.switch-list li:first-child { padding-top: 2px; }
.sw-title { font-size: 16.5px; font-weight: 680; }
.sw-sub { margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.switch {
  position: relative;
  width: 52px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 2px solid var(--ink-3);
  border-radius: 16px;
  background: var(--s3);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.switch span {
  position: absolute;
  top: 50%;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-3);
  transform: translateY(-50%);
  transition: left 0.35s var(--spring), width 0.35s var(--spring), height 0.35s var(--spring), background-color 0.2s;
}
.switch[aria-checked='true'] { background: var(--primary); border-color: var(--primary); }
.switch[aria-checked='true'] span { left: 22px; width: 24px; height: 24px; background: var(--on-primary); }
.switch:active span { width: 28px; height: 28px; }
.panel .text-btn { margin-top: 16px; }

.section-title { margin-bottom: 16px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; font-stretch: 118%; }
.more { margin-top: clamp(36px, 5vw, 56px); }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  border-radius: 30px;
  background: var(--s1);
  text-decoration: none;
  transition: background-color 0.2s, border-radius 0.35s var(--spring), transform 0.3s var(--spring);
}
.card-link:hover { background: var(--s2); border-radius: 22px; transform: translateY(-3px); }
.card-img { display: block; border-radius: 22px; overflow: hidden; }
.card-img img,
.card-img .img-fallback { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 12px 12px; }
.card-title { font-size: 19px; font-weight: 740; line-height: 1.2; }
.card-meta { font-size: 13px; color: var(--ink-3); }

.img-fallback { position: relative; display: grid; place-items: center; background: var(--c); color: var(--on-c); }
.img-fallback .shape { position: absolute; width: 56%; height: auto; aspect-ratio: 1; color: var(--on-c); opacity: 0.12; }
.img-fallback .ic { position: relative; width: 44px; height: 44px; }

/* ---------- article and page ---------- */

.article-head { display: grid; justify-items: start; gap: 16px; max-width: 920px; padding-top: clamp(20px, 3vw, 36px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; font-weight: 620; color: var(--ink-2); }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--s2); text-decoration: none; transition: border-radius 0.3s var(--spring); }
.crumbs a:first-child { padding-left: 8px; }
.crumbs a:hover { border-radius: 10px; }
.crumbs .ic { width: 18px; height: 18px; }
.crumbs .sep { width: 16px; height: 16px; fill: var(--ink-3); }
.article-head .badge-lg { margin-top: 8px; }
.article-title { font-size: clamp(36px, 5vw, 66px); font-weight: 860; font-stretch: 112%; line-height: 1; letter-spacing: -0.02em; }
.article-dek { max-width: 40em; font-size: clamp(18.5px, 1.7vw, 21px); line-height: 1.5; color: var(--ink-2); }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 6px; }
.byline-name { font-size: 15.5px; font-weight: 600; }
.byline-name a { font-weight: 780; text-decoration: none; }
.byline-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.byline-meta { font-size: 14px; color: var(--ink-3); }
.avatar { position: relative; display: inline-grid; place-items: center; width: 48px; aspect-ratio: 1; flex: none; }
.avatar .shape { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--primary-c); transition: transform 0.6s var(--spring); }
.avatar .robot { position: relative; width: 56%; color: var(--primary); }
.avatar:hover .shape { transform: rotate(40deg); }
.avatar-xl { width: clamp(88px, 11vw, 140px); }
.page-head { padding-bottom: 8px; }

.article-hero { margin-top: clamp(20px, 3vw, 32px); }
.article-hero img { width: 100%; border-radius: clamp(24px, 3vw, 36px); background: var(--s2); }
.article-hero figcaption { margin-top: 10px; padding-left: 14px; font-size: 13px; color: var(--ink-3); }

.article-body { display: grid; grid-template-columns: 248px minmax(0, 700px); gap: clamp(32px, 5vw, 72px); padding-block: clamp(28px, 4vw, 44px) 16px; }
.article-body--single { grid-template-columns: minmax(0, 720px); }
@media (min-width: 1001px) { .article-body--single { padding-left: calc(248px + clamp(32px, 5vw, 72px)); } }

.toc { position: sticky; top: 96px; align-self: start; padding: 14px 8px; border-radius: 28px; background: var(--s1); }
.toc-title { padding: 2px 14px 10px; font-size: 13px; font-weight: 700; font-stretch: 110%; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.toc a,
.toc-mobile a {
  display: block;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14.5px;
  font-weight: 560;
  line-height: 1.3;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 0.2s;
}
.toc a:hover { background: var(--s2); }
.toc a.is-active { background: var(--primary-c); color: var(--on-primary-c); font-weight: 720; }
.toc-mobile { display: none; margin-bottom: 28px; border-radius: 24px; background: var(--s1); }
.toc-mobile summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .ic { transition: transform 0.3s var(--spring); }
.toc-mobile[open] summary .ic { transform: rotate(180deg); }
.toc-mobile ol { padding: 0 8px 10px; }
@media (max-width: 1000px) {
  .article-body { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; }
}

/* long-form text */
.prose { font-size: clamp(17.5px, 1.4vw, 18.5px); line-height: 1.68; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(25px, 2.4vw, 31px); font-weight: 800; font-stretch: 110%; line-height: 1.12; letter-spacing: -0.012em; }
.prose h3 { margin-top: 1.7em; font-size: clamp(20px, 1.8vw, 22px); font-weight: 740; line-height: 1.25; }
.prose h2 + *,
.prose h3 + * { margin-top: 0.6em; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--primary); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 3px; }
.prose strong { font-weight: 720; }
.prose ul > li { position: relative; padding-left: 26px; }
.prose ul > li::before { content: ''; position: absolute; left: 6px; top: 0.62em; width: 9px; height: 9px; border-radius: 3px; background: var(--brand); transform: rotate(45deg); }
.prose ol { padding-left: 1.4em; list-style: decimal; }
.prose ol > li::marker { color: var(--primary); font-weight: 800; }
.prose li + li { margin-top: 0.5em; }
.prose blockquote { margin: 1.6em 0; padding: 18px 22px; border-radius: 24px; background: var(--s1); font-size: 1.08em; font-weight: 500; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.4em; }
.prose code { padding: 0.1em 0.4em; border-radius: 6px; background: var(--s2); font-size: 0.88em; }
.prose figure img { width: 100%; border-radius: 24px; }
.prose figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* <aside class="callout"> */
.prose .callout {
  position: relative;
  margin-block: 1.8em;
  padding: 18px 22px 18px 60px;
  border-radius: 24px;
  background: var(--lemon-c);
  color: var(--on-lemon);
  font-size: 0.96em;
}
.prose .callout::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 20px;
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M423.5-103.5Q400-127 400-160h160q0 33-23.5 56.5T480-80q-33 0-56.5-23.5ZM360-200q-17 0-28.5-11.5T320-240q0-17 11.5-28.5T360-280h240q17 0 28.5 11.5T640-240q0 17-11.5 28.5T600-200H360Zm-30-120q-69-41-109.5-110T180-580q0-125 87.5-212.5T480-880q125 0 212.5 87.5T780-580q0 81-40.5 150T630-320H330Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M423.5-103.5Q400-127 400-160h160q0 33-23.5 56.5T480-80q-33 0-56.5-23.5ZM360-200q-17 0-28.5-11.5T320-240q0-17 11.5-28.5T360-280h240q17 0 28.5 11.5T640-240q0 17-11.5 28.5T600-200H360Zm-30-120q-69-41-109.5-110T180-580q0-125 87.5-212.5T480-880q125 0 212.5 87.5T780-580q0 81-40.5 150T630-320H330Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose .callout a { color: inherit; }
.prose .callout > * + * { margin-top: 0.6em; }

/* <div class="steps"> + markdown list: numbers sit in a cookie shape */
.prose .steps ol { display: grid; gap: 8px; padding: 0; list-style: none; counter-reset: step; }
.prose .steps li { position: relative; min-height: 76px; margin: 0; padding: 18px 20px 18px 78px; border-radius: 24px; background: var(--s1); counter-increment: step; }
.prose .steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--green-c);
  color: var(--on-green);
  font-size: 20px;
  font-weight: 850;
  clip-path: polygon(50.0% 0.0%, 53.4% 0.8%, 56.6% 2.9%, 59.4% 5.6%, 62.0% 8.0%, 64.7% 9.6%, 67.8% 10.1%, 71.3% 9.9%, 75.2% 9.6%, 79.0% 10.1%, 82.1% 11.7%, 84.3% 14.5%, 85.4% 18.2%, 85.8% 22.0%, 86.2% 25.6%, 87.2% 28.5%, 89.2% 30.9%, 92.1% 33.0%, 95.3% 35.3%, 97.9% 38.1%, 99.2% 41.3%, 99.1% 44.8%, 97.6% 48.3%, 95.4% 51.6%, 93.4% 54.6%, 92.3% 57.5%, 92.4% 60.6%, 93.2% 64.0%, 94.1% 67.8%, 94.3% 71.6%, 93.3% 75.0%, 90.9% 77.6%, 87.5% 79.3%, 83.8% 80.4%, 80.3% 81.4%, 77.6% 82.9%, 75.7% 85.3%, 74.1% 88.5%, 72.3% 92.0%, 70.1% 95.1%, 67.1% 97.0%, 63.6% 97.4%, 59.9% 96.5%, 56.3% 95.0%, 53.0% 93.6%, 50.0% 93.0%, 47.0% 93.6%, 43.7% 95.0%, 40.1% 96.5%, 36.4% 97.4%, 32.9% 97.0%, 29.9% 95.1%, 27.7% 92.0%, 25.9% 88.5%, 24.3% 85.3%, 22.4% 82.9%, 19.7% 81.4%, 16.2% 80.4%, 12.5% 79.3%, 9.1% 77.6%, 6.7% 75.0%, 5.7% 71.6%, 5.9% 67.8%, 6.8% 64.0%, 7.6% 60.6%, 7.7% 57.5%, 6.6% 54.6%, 4.6% 51.6%, 2.4% 48.3%, 0.9% 44.8%, 0.8% 41.3%, 2.1% 38.1%, 4.7% 35.3%, 7.9% 33.0%, 10.8% 30.9%, 12.8% 28.5%, 13.8% 25.6%, 14.2% 22.0%, 14.6% 18.2%, 15.7% 14.5%, 17.9% 11.7%, 21.0% 10.1%, 24.8% 9.6%, 28.7% 9.9%, 32.2% 10.1%, 35.3% 9.6%, 38.0% 8.0%, 40.6% 5.6%, 43.4% 2.9%, 46.6% 0.8%);
}

/* tables */
.prose .table-wrap { margin-block: 1.8em; overflow-x: auto; border-radius: 24px; background: var(--s1); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.prose th { text-align: left; font-size: 13px; font-weight: 720; font-stretch: 108%; color: var(--ink-2); background: var(--s2); }
.prose th,
.prose td { padding: 13px 18px; vertical-align: top; }
.prose td { border-top: 1px solid var(--line); }

/* FAQ: <details><summary>Question</summary> ... </details> */
.prose details { margin-top: 8px; border-radius: 22px; background: var(--s1); transition: border-radius 0.3s var(--spring); }
.prose h2 + details { margin-top: 0.8em; }
.prose details[open] { border-radius: 28px; }
.prose summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font-size: 17.5px; font-weight: 700; line-height: 1.3; cursor: pointer; list-style: none; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after {
  content: '';
  flex: none;
  width: 24px;
  height: 24px;
  background: var(--ink-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M465-364.5q-7-2.5-13-8.5L268-557q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-373q-6 6-13 8.5t-15 2.5q-8 0-15-2.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M465-364.5q-7-2.5-13-8.5L268-557q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-373q-6 6-13 8.5t-15 2.5q-8 0-15-2.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.3s var(--spring);
}
.prose details[open] summary::after { transform: rotate(180deg); }
.prose details > :not(summary) { margin: 0; padding: 0 20px 18px; }

/* contact page: <dl class="contact-list"> */
.prose .contact-list { display: grid; gap: 10px; margin-block: 0 2em; }
.prose .contact-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 20px; padding: 20px 22px; border-radius: 26px; background: var(--s1); }
.prose .contact-list dt { font-size: 20px; font-weight: 820; font-stretch: 118%; line-height: 1.15; }
.prose .contact-list dd a {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 18px;
  background: var(--primary-c);
  color: var(--on-primary-c);
  font-size: 14.5px;
  font-weight: 720;
  text-decoration: none;
  transition: border-radius 0.3s var(--spring);
}
.prose .contact-list dd a:hover { border-radius: 10px; }
@media (max-width: 600px) { .prose .contact-list > div { grid-template-columns: minmax(0, 1fr); } }

.end-cards { display: grid; gap: 10px; margin-top: 48px; }
.end-card { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; border-radius: 28px; background: var(--s1); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.end-card a { color: var(--ink); font-weight: 720; text-underline-offset: 3px; }
.end-card--tint { background: var(--lemon-c); color: var(--on-lemon); }
.end-card--tint a { color: inherit; }
.end-card > .ic { width: 28px; height: 28px; margin: 8px 10px 0; }
.end-label { margin-bottom: 2px; font-size: 13px; font-weight: 720; font-stretch: 110%; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }

/* ---------- section, author, 404 ---------- */

.list-head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  margin-top: 8px;
  padding: clamp(22px, 3.5vw, 44px);
  border-radius: 40px;
  background: var(--c, var(--s2));
  color: var(--on-c, var(--ink));
}
.list-head .badge { color: var(--c); }
.list-head .badge .shape { color: var(--on-c); }
.list-eyebrow { font-size: 14px; font-weight: 680; font-stretch: 112%; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.list-head h1 { margin-top: 4px; font-size: clamp(44px, 7.5vw, 104px); font-weight: 920; font-stretch: 140%; line-height: 0.92; letter-spacing: -0.015em; }
.list-intro { margin-top: 12px; max-width: 36em; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; }
.card-grid--list { margin-top: 16px; }
@media (max-width: 600px) { .list-head { flex-direction: column; align-items: flex-start; border-radius: 32px; } }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; font-size: 14px; color: var(--ink-3); }

.empty { margin-top: 16px; padding: clamp(32px, 5vw, 56px) 20px; border-radius: 36px; background: var(--s1); text-align: center; }
.empty-robot { display: block; width: 88px; margin: 0 auto 16px; color: var(--brand); }
.empty-title { font-size: clamp(24px, 2.6vw, 30px); font-weight: 820; font-stretch: 115%; }
.empty p:not(.empty-title) { max-width: 34em; margin: 8px auto 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.empty a { color: var(--primary); font-weight: 700; }
.empty .chip-row { margin-top: 22px; }

.notfound { display: grid; justify-items: center; gap: 14px; padding-block: clamp(32px, 6vw, 72px); text-align: center; }
.nf-art { position: relative; display: grid; place-items: center; width: clamp(160px, 22vw, 230px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; }
.nf-shape { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--primary-c); animation: spin 40s linear infinite; }
.nf-art .robot { position: relative; width: 50%; color: var(--primary); transition: transform 0.9s var(--spring); }
.nf-art.is-spinning .robot { transform: rotate(360deg) scale(1.1); }
.notfound h1 { font-size: clamp(40px, 6.5vw, 84px); font-weight: 920; font-stretch: 135%; line-height: 0.95; letter-spacing: -0.015em; }
.notfound .list-intro { color: var(--ink-2); margin-top: 0; }
.notfound .chip-row { margin-block: 10px 6px; }

/* ---------- footer ---------- */

.site-footer { margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(36px, 5vw, 56px); border-radius: 40px 40px 0 0; background: var(--wall); color: var(--wall-ink); overflow: hidden; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; padding-bottom: 28px; }
.site-footer .brand { color: var(--wall-ink); }
.site-footer .wordmark { height: 32px; }
.foot-top p { max-width: 38em; font-size: 16px; line-height: 1.55; color: var(--wall-2); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 28px; padding-block: 28px 36px; border-top: 1px solid rgb(255 255 255 / 0.14); }
.foot-cols h2 { margin-bottom: 14px; font-size: 13px; font-weight: 720; font-stretch: 110%; letter-spacing: 0.05em; text-transform: uppercase; color: var(--wall-2); }
.foot-cols li + li { margin-top: 10px; }
.foot-cols a { font-size: 15.5px; text-decoration: none; }
.foot-cols ul a:hover { text-decoration: underline; text-decoration-color: var(--wp-1); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot-tip p { margin-bottom: 14px; font-size: 15.5px; color: var(--wall-2); }
.fab-light { background: var(--x-lemon); color: var(--x-ink); box-shadow: none; font-size: 14px; padding-block: 10px; }
@media (max-width: 420px) { .fab-light { overflow-wrap: anywhere; } }
@media (max-width: 860px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.versions { padding-block: 18px 20px; background: rgb(255 255 255 / 0.06); }
.versions-label { margin-bottom: 12px; font-size: 13px; font-weight: 720; font-stretch: 110%; letter-spacing: 0.05em; text-transform: uppercase; color: var(--wall-2); }
.ticker { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker ul { display: flex; flex: none; gap: 8px; padding-right: 8px; animation: ticker 80s linear infinite; }
.ticker:hover ul { animation-play-state: paused; }
.ticker li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgb(255 255 255 / 0.1); font-size: 14px; font-weight: 560; white-space: nowrap; }
.ticker b { color: var(--wp-2); font-weight: 820; }
@keyframes ticker { to { transform: translateX(-100%); } }
.foot-legal { padding-block: 20px 28px; font-size: 13px; color: var(--wall-2); }

/* ---------- snackbar ---------- */

.snackbar {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  max-width: min(92vw, 480px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--inv);
  color: var(--on-inv);
  font-size: 15px;
  font-weight: 550;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  animation: snack-in 0.4s var(--spring);
}
@keyframes snack-in { from { opacity: 0; transform: translate(-50%, 16px) scale(0.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker { overflow-x: auto; }
  .ticker ul[aria-hidden] { display: none; }
}
