/* Frametile design system
   Source -> Transform -> Output.
   Geist + Geist Mono, graphite neutrals, one pear-lime accent.
   Geometry: 4px (tags, code), 8px (controls), 12px (frames, panels). 1px lines.
   Public pages use .s-*; the signed-in app is re-themed through the DaisyUI variables below. */

:root {
  --ink: #0b0d0e;
  --ink-2: #3a4046;
  --mute: #666d75;
  --line: #d9dcdf;
  --line-soft: #e8eaec;
  --mist: #f3f4f5;
  --paper: #fafafa;
  --white: #fff;
  --night: #0b0d0e;
  --night-2: #14181b;
  --night-line: #272d32;
  --night-mute: #9aa3ab;
  --accent: #c8f03c;
  --accent-ink: #3d6a00;
  --accent-soft: #eef9c4;
  --danger: #b42318;
  --r1: 4px;
  --r2: 8px;
  --r3: 12px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(11, 13, 14, 0.06), 0 8px 24px -12px rgba(11, 13, 14, 0.18);
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;

  /* DaisyUI 5 theme variables: the signed-in app inherits the new identity */
  --color-base-100: #fff;
  --color-base-200: #f3f4f5;
  --color-base-300: #d9dcdf;
  --color-base-content: #0b0d0e;
  --color-primary: #c8f03c;
  --color-primary-content: #0b0d0e;
  --color-secondary: #0b0d0e;
  --color-secondary-content: #fff;
  --color-accent: #c8f03c;
  --color-accent-content: #0b0d0e;
  --color-neutral: #0b0d0e;
  --color-neutral-content: #fff;
  --color-info: #0b0d0e;
  --color-info-content: #fff;
  --color-success: #3d6a00;
  --color-success-content: #fff;
  --color-warning: #8a6100;
  --color-warning-content: #fff;
  --color-error: #b42318;
  --color-error-content: #fff;
  --radius-selector: 4px;
  --radius-field: 8px;
  --radius-box: 12px;
  --border: 1px;
}

/* ------------------------------------------------------------------ base */
.st {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
.st *,
.st *::before,
.st *::after {
  box-sizing: border-box;
}
.st img {
  display: block;
  max-width: 100%;
}
.st a {
  color: inherit;
}
.st :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r1);
}
.st .on-night :focus-visible,
.st .s-night :focus-visible {
  outline-color: var(--accent);
}
.s-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--r2);
  z-index: 100;
  transition: top 0.2s var(--ease);
}
.s-skip:focus {
  top: 12px;
}
.st h1, .st h2, .st h3, .st p, .st li, .st figcaption, .st code {
  overflow-wrap: anywhere;
}
.st .s-copy code { min-width: 0; }
.st .s-wrap > *, .st [class*="grid"] > *, .st .s-cap > *, .st .d-split > * { min-width: 0; }
.s-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.s-mono {
  font-family: var(--mono);
  font-feature-settings: "calt" 0;
}
h1.s-h,
h2.s-h,
h3.s-h {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
.s-h1 {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
}
.s-h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.06;
}
.s-h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.s-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-2);
  max-width: 54ch;
  text-wrap: pretty;
}
.s-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.s-night {
  background: var(--night);
  color: #fff;
}
.s-night .s-lead,
.s-night .s-kicker {
  color: var(--night-mute);
}
.s-mark {
  background: linear-gradient(transparent 62%, var(--accent) 62%);
  padding: 0 0.06em;
}
.s-night .s-mark,
.s-auth__side .s-mark {
  background: none;
  color: var(--accent);
}

/* --------------------------------------------------------------- buttons */
.s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r2);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff !important;
  font: 500 0.95rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s, color 0.18s, border-color 0.18s;
}
.s-btn:hover {
  transform: translateY(-1px);
}
.s-btn:active {
  transform: translateY(0) scale(0.99);
}
.s-btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink) !important;
}
.s-btn--ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}
.s-btn--ghost:hover {
  border-color: var(--ink);
}
.s-night .s-btn--ghost {
  color: #fff !important;
  border-color: var(--night-line);
}
.s-night .s-btn--ghost:hover {
  border-color: #fff;
}
.s-btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}
.s-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s;
}
.s-link:hover {
  text-decoration-color: var(--ink);
}

/* ------------------------------------------------------------------- nav */
.s-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.s-nav__in {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.s-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.s-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.s-nav__links {
  display: flex;
  gap: 4px;
  margin: 0 auto 0 12px;
  padding: 0;
  list-style: none;
}
.s-nav__links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r2);
  color: var(--mute);
  font-size: 0.925rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.s-nav__links a:hover {
  color: var(--ink);
  background: var(--mist);
}
.s-nav__links a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}
.s-nav__cta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.s-nav__toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.s-nav__toggle span,
.s-nav__toggle span::before,
.s-nav__toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.s-nav__toggle span {
  position: relative;
}
.s-nav__toggle span::before,
.s-nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.s-nav__toggle span::before {
  top: -6px;
}
.s-nav__toggle span::after {
  top: 6px;
}
.s-nav__toggle[aria-expanded="true"] span {
  background: transparent;
}
.s-nav__toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}
.s-nav__toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}
@media (max-width: 860px) {
  .s-nav__toggle {
    display: inline-flex;
  }
  .s-nav__links,
  .s-nav__cta {
    display: none;
  }
  .s-nav.is-open .s-nav__links,
  .s-nav.is-open .s-nav__cta {
    display: flex;
  }
  .s-nav.is-open .s-nav__in {
    flex-wrap: wrap;
    height: auto;
    padding-top: 8px;
    padding-bottom: 16px;
  }
  .s-nav.is-open .s-brand {
    height: 44px;
  }
  .s-nav.is-open .s-nav__links {
    order: 3;
    flex-direction: column;
    width: 100%;
    margin: 8px 0 0;
  }
  .s-nav.is-open .s-nav__links a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    font-size: 1.05rem;
    box-shadow: none !important;
  }
  .s-nav.is-open .s-nav__cta {
    order: 4;
    width: 100%;
    margin-top: 12px;
  }
  .s-nav.is-open .s-nav__cta .s-btn {
    flex: 1;
  }
}

/* ------------------------------------------------- url + frames + chips */
.s-url {
  font-family: var(--mono);
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0;
}
.s-url .u-host {
  color: var(--mute);
}
.s-url .u-key {
  color: #8a6100;
}
.s-url .u-path {
  color: var(--ink-2);
}
.s-url .u-tok {
  color: var(--accent-ink);
  font-weight: 500;
}
.s-night .s-url .u-host {
  color: var(--night-mute);
}
.s-night .s-url .u-key {
  color: #e9c46a;
}
.s-night .s-url .u-path {
  color: #d6dbe0;
}
.s-night .s-url .u-tok {
  color: var(--accent);
}
.s-frame {
  position: relative;
  margin: 0;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  overflow: hidden;
}
.s-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.s-frame--check {
  background-color: #fff;
  background-image: conic-gradient(#e3e5e7 25%, transparent 0 50%, #e3e5e7 0 75%, transparent 0);
  background-size: 16px 16px;
}
.s-frame--check img {
  object-fit: contain;
}
.s-night .s-frame {
  border-color: var(--night-line);
  background: var(--night-2);
}
.s-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: var(--r1);
  background: rgba(11, 13, 14, 0.82);
  color: #fff;
  font: 500 0.72rem/1.4 var(--mono);
  backdrop-filter: blur(6px);
}
.s-tag--accent {
  background: var(--accent);
  color: var(--ink);
}
.s-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r1);
  background: var(--white);
  font: 500 0.78rem/1.4 var(--mono);
  color: var(--ink);
}
.s-copy {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--white);
  font: 500 0.78rem/1.4 var(--mono);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.s-copy code {
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.s-copy:hover {
  border-color: var(--ink);
}
.s-copy .s-copy__tag {
  flex: none;
  padding: 3px 8px;
  border-radius: var(--r1);
  background: var(--mist);
  color: var(--mute);
  font-size: 0.7rem;
}
.s-copy.is-done {
  border-color: var(--accent-ink);
  background: var(--accent-soft);
}
.s-copy.is-done .s-copy__tag {
  background: var(--accent);
  color: var(--ink);
}

/* ------------------------------------------------------------ reveal anim */
.s-in {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.s-in.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .s-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .st * {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ flash */
.s-flash {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 10px 16px;
  border-radius: var(--r2);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 32px);
}
.s-flash--alert {
  background: var(--danger);
}

/* ------------------------------------------------------------------ hero */
.s-hero {
  padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line-soft);
}
.s-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.s-hero__copy > * + * {
  margin-top: 24px;
}
.s-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.s-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  list-style: none;
  color: var(--mute);
  font-size: 0.9rem;
}
.s-hero__facts li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 1px;
  background: var(--accent-ink);
  vertical-align: middle;
}

/* the lab: source -> transform -> output */
.s-lab {
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.s-lab__stage {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.s-lab__src {
  position: relative;
  border-right: 1px solid var(--line);
  background: var(--mist);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.s-lab__src img {
  width: 100%;
  height: auto;
  aspect-ratio: 736 / 1288;
  object-fit: cover;
  border-radius: var(--r1);
}
.s-lab__src small {
  font: 500 0.66rem/1.3 var(--mono);
  color: var(--mute);
}
.s-lab__out {
  position: relative;
  width: 100%;
  align-self: start;
  aspect-ratio: 1 / 1;
  background: var(--mist);
  overflow: hidden;
}
.s-lab__out img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.s-lab__out img.is-off {
  opacity: 0;
  transform: scale(1.03);
}
.s-lab__out.is-check {
  background-color: #fff;
  background-image: conic-gradient(#e3e5e7 25%, transparent 0 50%, #e3e5e7 0 75%, transparent 0);
  background-size: 16px 16px;
}
.s-lab__out.is-check img {
  object-fit: contain;
}
.s-lab__url {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 84px;
  background: var(--paper);
}
.s-lab__url small {
  display: block;
  margin-bottom: 4px;
  font: 500 0.68rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.s-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px;
}
.s-pick {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--white);
  color: var(--ink);
  font: 500 0.85rem/1 var(--font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.s-pick:hover {
  border-color: var(--ink);
}
.s-pick[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}
@media (max-width: 900px) {
  .s-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  .s-lab__stage {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .s-lab__src {
    padding: 6px;
  }
}

/* --------------------------------------------------------------- sections */
.s-sec {
  padding: clamp(56px, 8vw, 112px) 0;
}
.s-sec--line {
  border-top: 1px solid var(--line-soft);
}
.s-sec__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.s-sec__head .s-lead {
  margin: 0;
}
@media (max-width: 800px) {
  .s-sec__head {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* resize ladder: one source, three outputs, true proportions */
.s-ladder {
  display: grid;
  grid-template-columns: minmax(0, 240fr) minmax(0, 480fr) minmax(0, 736fr);
  align-items: end;
  max-width: 900px;
  margin-inline: auto;
  gap: clamp(12px, 2.5vw, 28px);
}
.s-ladder figure {
  margin: 0;
}
.s-ladder .s-frame {
  aspect-ratio: 736 / 1288;
}
.s-ladder figcaption {
  margin-top: 10px;
  font: 500 0.78rem/1.4 var(--mono);
  color: var(--ink-2);
}
.s-ladder figcaption b {
  display: block;
  color: var(--ink);
}

/* crop windows */
.s-crops {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  align-items: start;
}
.s-crops figure {
  margin: 0;
}
.s-crops figcaption {
  margin-top: 8px;
  font: 500 0.75rem/1.4 var(--mono);
  color: var(--mute);
}

/* before / after */
.s-ba {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r3);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--mist);
  --pos: 50%;
  touch-action: pan-y;
}
.s-ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.s-ba__top {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.s-ba input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.s-ba__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: var(--accent);
  pointer-events: none;
}
.s-ba__bar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(11, 13, 14, 0.18);
}
.s-ba:focus-within .s-ba__bar::after {
  box-shadow: 0 0 0 3px var(--ink);
}
.s-ba .s-tag {
  z-index: 2;
}
.s-ba .s-tag.r {
  left: auto;
  right: 10px;
}

/* token table */
.s-table {
  width: 100%;
  border-collapse: collapse;
}
.s-table th {
  text-align: left;
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--ink);
}
.s-table td {
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  font-size: 0.95rem;
}
.s-table code {
  font: 500 0.82rem/1.5 var(--mono);
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: var(--r1);
  white-space: nowrap;
}
.s-night .s-table th {
  border-bottom-color: #fff;
  color: var(--night-mute);
}
.s-night .s-table td {
  border-bottom-color: var(--night-line);
}
.s-night .s-table code {
  background: rgba(200, 240, 60, 0.12);
  color: var(--accent);
}
@media (max-width: 640px) {
  .s-table thead {
    display: none;
  }
  .s-table tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .s-table td {
    display: block;
    border: 0;
    padding: 2px 0;
  }
}

/* tabs / filters */
.s-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 24px;
}
.s-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--white);
  font: 500 0.88rem/1 var(--font);
  color: var(--ink);
  cursor: pointer;
}
.s-tabs button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}
.s-tabs button:hover {
  border-color: var(--ink);
}

/* pipeline steps: a horizontal line that draws itself */
.s-pipe {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: p;
}
.s-pipe::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 15px;
  height: 1px;
  background: var(--night-line);
}
.s-pipe li {
  position: relative;
  padding-top: 44px;
  counter-increment: p;
}
.s-pipe li::before {
  content: counter(p);
  position: absolute;
  top: 0;
  left: 0;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: var(--r2);
  background: var(--accent);
  color: var(--ink);
  font: 600 0.85rem/1 var(--mono);
}
.s-pipe h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.s-pipe p {
  margin: 0;
  color: var(--night-mute);
  font-size: 0.95rem;
}
@media (max-width: 800px) {
  .s-pipe {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .s-pipe::before {
    left: 15px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
  }
  .s-pipe li {
    padding: 2px 0 0 52px;
  }
}

/* capability rows (features) */
.s-cap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(32px, 5vw, 64px) 0;
  border-top: 1px solid var(--night-line);
}
.s-cap:first-of-type {
  border-top: 0;
}
.s-cap--flip {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.s-cap--flip .s-cap__copy {
  order: 2;
}
.s-cap__copy > * + * {
  margin-top: 16px;
}
.s-cap__copy p {
  margin: 0;
  color: var(--night-mute);
  max-width: 46ch;
}
@media (max-width: 800px) {
  .s-cap,
  .s-cap--flip {
    grid-template-columns: minmax(0, 1fr);
  }
  .s-cap--flip .s-cap__copy {
    order: 0;
  }
}
.s-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.s-points > div {
  padding: 24px 24px 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.s-points h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.s-points p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------- footer */
.s-foot {
  background: none; /* inherit the page background so the footer never forms a different band */
  border-top: 1px solid var(--line-soft);
  color: var(--mute);
  padding: clamp(32px, 5vw, 56px) 0 28px;
}
.s-foot .s-brand {
  color: var(--ink);
}
.s-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 24px;
}
.s-foot__links a {
  color: var(--mute);
  text-decoration: none;
  font-size: 1rem;
}
.s-foot__links a:hover {
  color: var(--ink);
}
.s-foot__bar {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.95rem;
}
.s-foot__bar p {
  margin: 0;
}
.s-foot__bar p a {
  color: #4a5fd8;
  font-weight: 500;
  text-decoration: none;
}
.s-foot__bar p a:hover {
  text-decoration: underline;
}
.s-foot__social {
  display: flex;
  gap: 22px;
  margin: 4px 0;
}
.s-foot__social a {
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: color 0.2s, transform 0.3s var(--ease);
}
.s-foot__social a:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------- page header */
.s-page {
  padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--line-soft);
}
.s-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
}
.s-page__grid > * + * {
  margin-top: 0;
}
.s-page__copy > * + * {
  margin-top: 20px;
}
@media (max-width: 800px) {
  .s-page__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* examples gallery: three column masonry, true proportions, hover compare */
.s-gal {
  columns: 3;
  column-gap: 16px;
}
.s-gal > figure {
  break-inside: avoid;
  margin: 0 0 16px;
}
.s-gal .s-frame {
  display: block;
}
.s-gal figcaption {
  padding: 10px 2px 0;
}
.s-gal figcaption b {
  display: block;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.s-gal figcaption span {
  display: block;
  margin: 2px 0 8px;
  color: var(--mute);
  font-size: 0.88rem;
}
.s-gal .s-frame img {
  height: auto;
  transition: transform 0.7s var(--ease);
}
.s-gal figure:hover .s-frame img {
  transform: scale(1.025);
}
@media (max-width: 900px) {
  .s-gal {
    columns: 2;
  }
}
@media (max-width: 520px) {
  .s-gal {
    columns: 1;
  }
}

/* legal / long text */
.s-prose {
  max-width: 68ch;
}
.s-prose h2 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin: 2.4em 0 0.6em;
  scroll-margin-top: 84px;
}
.s-prose h2:first-child {
  margin-top: 0;
}
.s-prose p,
.s-prose li {
  color: var(--ink-2);
}
.s-prose ul {
  padding-left: 1.2em;
}
.s-toc {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 2px;
  font-size: 0.92rem;
}
.s-toc a {
  display: block;
  padding: 6px 12px;
  border-left: 1px solid var(--line);
  color: var(--mute);
  text-decoration: none;
}
.s-toc a:hover,
.s-toc a.is-on {
  color: var(--ink);
  border-left-color: var(--ink);
}
.s-split {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
}
@media (max-width: 860px) {
  .s-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .s-toc {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .s-toc a {
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}
.s-note {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--r2);
  color: var(--ink-2);
  font-size: 0.92rem;
  background: var(--white);
}

/* contact */
.s-channels {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
.s-channel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: var(--white);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.s-channel:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.s-channel--accent {
  background: var(--accent);
  border-color: var(--accent);
}
.s-channel small {
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}
.s-channel b {
  display: block;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.s-stack {
  display: grid;
  gap: 16px;
}
@media (max-width: 800px) {
  .s-channels {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -------------------------------------------------------------- auth page */
.s-auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.s-auth__side {
  position: relative;
  background: var(--night);
  color: #fff;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
}
.s-auth__side .s-lead {
  color: var(--night-mute);
}
.s-auth__reel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.s-auth__reel .s-frame {
  aspect-ratio: 3 / 4;
}
.s-auth__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 64px) var(--gutter);
}
.s-auth__box {
  width: 100%;
  max-width: 400px;
}
.s-auth__box > * + * {
  margin-top: 20px;
}
.s-field label,
.s-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}
.s-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--white);
  color: var(--ink);
  font: 400 1rem var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.s-input:hover {
  border-color: #b7bcc1;
}
.s-input:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
}
.s-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.s-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}
.s-alert {
  padding: 12px 14px;
  border: 1px solid #f1b8b2;
  border-radius: var(--r2);
  background: #fdf0ee;
  color: var(--danger);
  font-size: 0.92rem;
}
@media (max-width: 900px) {
  .s-auth {
    grid-template-columns: minmax(0, 1fr);
  }
  .s-auth__side {
    padding-bottom: 24px;
  }
  .s-auth__reel {
    display: none;
  }
  .s-auth__side .s-lead {
    display: none;
  }
}

/* ------------------------------------------------------------------ docs */
.d-wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(48px, 7vw, 96px);
}
.d-side {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100dvh - 100px);
  overflow: auto;
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}
.d-side a {
  display: block;
  padding: 6px 12px;
  border-left: 1px solid var(--line);
  color: var(--mute);
  text-decoration: none;
}
.d-side a:hover,
.d-side a.is-on {
  color: var(--ink);
  border-left-color: var(--ink);
}
.d-main {
  min-width: 0;
  max-width: 820px;
}
.d-main section {
  scroll-margin-top: 84px;
  padding: 32px 0;
  border-top: 1px solid var(--line-soft);
}
.d-main h2 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.d-main h3 {
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  margin: 24px 0 8px;
}
.d-main p,
.d-main li {
  color: var(--ink-2);
  max-width: 68ch;
}
.d-main :not(pre) > code {
  font: 500 0.84em var(--mono);
  background: var(--mist);
  border: 1px solid var(--line-soft);
  padding: 1px 6px;
  border-radius: var(--r1);
  color: var(--ink);
}
.d-code {
  position: relative;
  margin: 16px 0;
  border-radius: var(--r2);
  background: var(--night);
  color: #e6eaee;
}
.d-code pre {
  margin: 0;
  padding: 16px 56px 16px 16px;
  overflow-x: auto;
  font: 400 0.84rem/1.7 var(--mono);
}
.d-code button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--night-line);
  border-radius: var(--r1);
  background: var(--night-2);
  color: #e6eaee;
  font: 500 0.72rem var(--mono);
  cursor: pointer;
}
.d-code button:hover {
  border-color: var(--accent);
}
.d-code button.is-done {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.d-main table,
.tbl table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}
.d-main th,
.tbl th {
  text-align: left;
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--ink);
}
.d-main td,
.tbl td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.tbl {
  overflow-x: auto;
}
@media (max-width: 900px) {
  .d-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .d-side {
    position: static;
    max-height: none;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .d-side a {
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ============================================================ signed-in app
   Same brand, a calmer mode: re-theme DaisyUI and the old kusuri classes. */
html.winter body,
body.app {
  font-family: var(--font);
  color: var(--ink);
  background: var(--mist);
}
body.app .bg-base-200 {
  background: var(--mist);
}
body.app a.link,
body.app .text-primary {
  color: var(--accent-ink);
}
body.app .btn {
  border-radius: var(--r2);
  font-weight: 500;
  box-shadow: none;
  text-transform: none;
}
body.app .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
body.app .btn-primary:hover {
  background: #bde030;
  border-color: #bde030;
}
body.app .card,
body.app .modal-box,
body.app .folder-section {
  border-radius: var(--r3);
  box-shadow: none;
  border-color: var(--line);
}
body.app .card {
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
body.app .card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: none;
}
body.app .input,
body.app .select,
body.app .textarea,
body.app .file-input {
  border-radius: var(--r2);
  border-color: var(--line);
  background: var(--white);
}
body.app .input:focus,
body.app .select:focus,
body.app .textarea:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
}
body.app :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
body.app .fa-folder.text-warning {
  color: var(--ink);
}
body.app .kusuri-btn-main {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r2);
  background: var(--white);
  color: var(--ink);
  backdrop-filter: none;
  box-shadow: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
body.app .kusuri-btn-main::before {
  display: none;
}
body.app .kusuri-btn-main:hover {
  background: var(--ink);
  color: #fff;
  transform: none;
  box-shadow: none;
}
body.app .kusuri-btn-create,
body.app .kusuri-btn-upload {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
body.app .kusuri-btn-create:hover,
body.app .kusuri-btn-upload:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}
body.app .kusuri-btn-cancel {
  background: var(--white);
  border-color: var(--line);
  color: var(--danger);
}
body.app .kusuri-btn-cancel:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
body.app .brand-gradient {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--ink);
}
.app-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-nav__in {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.app-nav .s-brand {
  margin-right: 12px;
}
.app-nav__links {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app-nav__links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r2);
  color: var(--mute);
  font-size: 0.9rem;
  text-decoration: none;
}
.app-nav__links a:hover {
  background: var(--mist);
  color: var(--ink);
}
.app-nav__links a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}
.app-nav__end {
  margin-left: auto;
  position: relative;
}
.app-nav__credits {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--line, currentColor);
  border-radius: var(--r2);
  font: 500 0.8rem var(--mono);
  color: var(--ink);
  white-space: nowrap;
}
.app-nav__credits + .app-nav__end {
  margin-left: 12px;
}
.app-nav__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--accent);
  font: 600 0.9rem var(--mono);
  cursor: pointer;
  list-style: none;
}
.app-nav__avatar::-webkit-details-marker {
  display: none;
}
.app-nav__menu {
  position: absolute;
  right: 0;
  top: 44px;
  width: 220px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--shadow);
  display: grid;
}
.app-nav__menu a,
.app-nav__menu button {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r1);
  background: none;
  color: var(--ink);
  font: 400 0.92rem var(--font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.app-nav__menu a:hover,
.app-nav__menu button:hover {
  background: var(--mist);
}
.app-nav__menu hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 4px 0;
}
@media (max-width: 720px) {
  .app-nav__links {
    display: none;
  }
}

/* docs helpers */
.d-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.d-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin: 16px 0;
  align-items: start;
}
.d-split {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 16px 0;
}
@media (max-width: 640px) {
  .d-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .d-split > .d-ex {
    max-width: 240px;
  }
}
.d-stack > * + * {
  margin-top: 14px;
}
.d-ex {
  margin: 0;
}
.d-ex .s-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 6px;
}
.d-ex figcaption {
  margin-top: 8px;
}
.d-ex .s-copy {
  padding: 6px;
}
.d-ex .s-copy__tag {
  display: none;
}
.d-anatomy {
  margin: 16px 0;
  padding: 18px 20px;
  border-radius: var(--r2);
  overflow-x: auto;
}
.d-anatomy .s-url {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.d-note {
  margin: 16px 0;
}
.d-note--warn {
  border-style: solid;
  border-color: #e0c06a;
  background: #fdf8e8;
}
.d-main section > .d-code:first-child {
  margin-top: 0;
}
.d-main ul,
.d-main ol {
  padding-left: 1.3em;
}
.d-main section > h2 + p {
  margin-top: 0;
}

body.app h1,
body.app h2 {
  letter-spacing: -0.03em;
}
body.app h1 {
  font-weight: 600;
}
body.app .table th {
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
body.app .badge {
  border-radius: var(--r1);
  font-weight: 500;
}
@media (prefers-reduced-motion: reduce) {
  body.app * {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* ------------------------------------------------------------------ blog */
.b-meta {
  font: 500 0.78rem/1.5 var(--mono);
  color: var(--mute);
  margin: 0;
}
.b-cat {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: var(--r1);
  background: var(--accent);
  color: var(--ink);
}
.b-feat,
.b-card {
  display: grid;
  color: inherit;
  text-decoration: none;
}
.b-feat {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  padding-bottom: clamp(32px, 5vw, 56px);
  margin-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line-soft);
}
.b-feat__copy > * + * {
  margin-top: 14px;
}
.b-feat h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.b-feat p:not(.b-meta),
.b-card p:not(.b-meta) {
  color: var(--ink-2);
  margin: 0;
}
.b-feat .s-frame,
.b-card .s-frame {
  aspect-ratio: 16 / 10;
}
.b-feat img,
.b-card img {
  transition: transform 0.7s var(--ease);
}
.b-feat:hover img,
.b-card:hover img {
  transform: scale(1.025);
}
.b-feat:hover h2,
.b-card:hover h2,
.b-card:hover h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.b-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.b-card {
  align-content: start;
  gap: 10px;
}
.b-card .s-frame {
  margin-bottom: 6px;
}
.b-card h2,
.b-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
}
.d-main section.b-cta {
  margin-top: 32px;
  padding: 28px;
  border: 0;
  border-radius: var(--r3);
  background: var(--night);
  color: #fff;
}
.b-cta p {
  color: var(--night-mute);
}
@media (max-width: 800px) {
  .b-feat {
    grid-template-columns: minmax(0, 1fr);
  }
}
.b-cta .s-btn--ghost {
  color: #fff !important;
  border-color: var(--night-line);
}
.b-cta .s-btn--ghost:hover {
  border-color: #fff;
}

/* ------------------------------------------- admin charts + API analytics */
.seo-trend {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.seo-trend circle {
  opacity: 0;
}
.seo-trend g:hover circle {
  opacity: 1;
}
.a-bar {
  display: flex;
  gap: 2px;
  height: 18px;
  border-radius: var(--r1);
  overflow: hidden;
  background: var(--mist);
}
.a-bar > span {
  min-width: 4px;
}
.a-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.a-legend li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.92rem;
}
.a-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
  align-self: center;
}
.a-legend b {
  font-variant-numeric: tabular-nums;
}
.a-legend small {
  color: var(--mute);
}
.a-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r1);
  font: 500 0.75rem/1.5 var(--mono);
  white-space: nowrap;
}
.a-badge--ok {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.a-badge--fail {
  background: #fdecea;
  color: var(--danger);
}
.a-path {
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 0.82rem var(--mono);
}
.a-pager {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r3);
}
.a-pager__on {
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  cursor: default;
  pointer-events: none;
}
.a-pager__off {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.a-pager__gap {
  padding: 0 4px;
  color: var(--mute);
}

/* ------------------------------------------------------- analytics: filters */
.a-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.a-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 420px;
  color: var(--mute);
}
.a-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.a-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  background: var(--white);
  color: var(--ink);
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.2s var(--ease);
}
.a-search input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(200, 240, 60, 0.45);
}
.a-chips {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--mist);
  border-radius: var(--r2);
}
.a-chip {
  position: relative;
  cursor: pointer;
}
.a-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.a-chip span {
  display: block;
  padding: 4px 12px;
  border-radius: var(--r1);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.a-chip:hover span {
  background: var(--white);
}
.a-chip:active span {
  transform: scale(0.95);
}
.a-chip input:checked + span {
  background: var(--ink);
  color: var(--white);
}
.a-chip--failed input:checked + span {
  background: var(--danger);
}
.a-chip input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.a-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.a-select select {
  max-width: 260px;
}
.a-why {
  margin-top: 3px;
  max-width: 560px;
  font-size: 0.78rem;
  color: var(--danger);
}
.a-why summary {
  cursor: pointer;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a-why summary::-webkit-details-marker {
  display: none;
}
.a-why[open] summary {
  white-space: normal;
}
.a-why p {
  margin: 4px 0 0;
  padding: 6px 8px;
  background: #fdecea;
  border-radius: var(--r1);
  font-family: var(--mono);
  word-break: break-word;
  animation: a-rise 0.25s var(--ease);
}

/* ------------------------------------------------------ analytics: motion */
@keyframes a-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes a-grow {
  from {
    transform: scaleX(0);
  }
}
@keyframes a-draw {
  from {
    stroke-dashoffset: 1;
  }
}
@keyframes a-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
/* Sections enter in sequence; --i is the position, 60ms apart. */
.a-rise {
  animation: a-rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.a-bar > span {
  transform-origin: left;
  animation: a-grow 0.8s var(--ease) 0.35s both;
}
.seo-trend polyline {
  stroke-dasharray: 1;
  animation: a-draw 1.1s var(--ease) 0.4s both;
}
.a-stat {
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.a-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--ink);
}
.a-stat:active {
  transform: scale(0.97);
}
.a-stat:focus-visible,
.a-click:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.a-click {
  cursor: pointer;
  transition: background 0.15s;
}
.a-click:hover {
  background: var(--mist);
}
.a-meter {
  display: block;
  height: 3px;
  margin-top: 4px;
  width: var(--w);
  max-width: 100%;
  border-radius: 2px;
  background: var(--danger);
  opacity: 0.55;
  transform-origin: left;
  animation: a-grow 0.7s var(--ease) 0.5s both;
}
.a-click:hover .a-meter {
  opacity: 1;
}
/* Rows of the swapped-in table stagger in; the delay is capped at 8 rows so long pages stay snappy. */
.a-rows tbody tr {
  animation: a-pop 0.35s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.a-frame {
  display: block;
  transition: opacity 0.2s;
}
.a-frame[busy] {
  opacity: 0.45;
}
@media (prefers-reduced-motion: reduce) {
  .a-rise,
  .a-bar > span,
  .seo-trend polyline,
  .a-meter,
  .a-rows tbody tr,
  .a-why p {
    animation: none;
  }
  .a-stat,
  .a-chip span,
  .a-frame {
    transition: none;
  }
  .a-stat:hover {
    transform: none;
  }
}

/* Cookie consent banner */
.s-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 560px;
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r3);
  box-shadow: var(--shadow);
  font-family: var(--font);
  font-size: 0.9rem;
}
.s-consent[hidden] { display: none; }
.s-consent p { margin: 0; flex: 1 1 240px; }
.s-consent a { color: var(--accent-ink); text-decoration: underline; }
.s-consent__actions { display: flex; gap: 8px; }

/* ------------------------------------------------------ subscription page */
@keyframes sub-ring {
  from {
    stroke-dashoffset: 100;
  }
}
@keyframes sub-float {
  50% {
    transform: translate(24px, -18px) scale(1.12);
  }
}
@keyframes sub-pulse {
  50% {
    box-shadow: 0 0 0 10px rgba(180, 35, 24, 0);
  }
}
.sub-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--r3);
  background: var(--night);
  color: #fff;
}
.sub-hero__copy {
  position: relative;
  z-index: 1;
  flex: 1 1 320px;
}
.sub-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sub-lead {
  max-width: 44ch;
  color: var(--night-mute);
}
.sub-pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--night-line);
  border-radius: 999px;
  background: var(--night-2);
  color: var(--accent);
  font: 500 0.75rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sub-glow {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 240, 60, 0.35), transparent 65%);
  animation: sub-float 9s ease-in-out infinite;
}
.sub-glow--2 {
  top: auto;
  right: auto;
  bottom: -160px;
  left: -100px;
  background: radial-gradient(circle, rgba(43, 89, 195, 0.3), transparent 65%);
  animation-duration: 12s;
  animation-direction: reverse;
}
.sub-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 24px 0 0;
}
.sub-facts dt {
  color: var(--night-mute);
  font-size: 0.75rem;
}
.sub-facts dd {
  margin: 2px 0 0;
  font: 500 1.4rem var(--mono);
}
.sub-ring {
  position: relative;
  z-index: 1;
  width: clamp(190px, 28vw, 250px);
  aspect-ratio: 1;
  margin: 0 auto;
}
.sub-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.sub-ring circle {
  fill: none;
  stroke-width: 9;
}
.sub-ring__track {
  stroke: var(--night-line);
}
.sub-ring__fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: var(--off);
  filter: drop-shadow(0 0 6px rgba(200, 240, 60, 0.55));
  animation: sub-ring 1.4s var(--ease) 0.2s both;
}
.sub-ring--low .sub-ring__fill {
  stroke: #ff7a6b;
  filter: drop-shadow(0 0 6px rgba(255, 122, 107, 0.55));
}
.sub-ring__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.sub-ring__num strong {
  font: 600 clamp(2rem, 5vw, 3rem) var(--mono);
  line-height: 1;
}
.sub-ring__num span {
  margin-top: 6px;
  color: var(--night-mute);
  font-size: 0.8rem;
}
.sub-bar {
  height: 6px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--mist);
  overflow: hidden;
}
.sub-bar span {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 3px;
  background: var(--ink);
  transform-origin: left;
  animation: a-grow 0.9s var(--ease) 0.5s both;
}
.sub-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r3);
  background: var(--white);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.2s;
}
.sub-plan:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--ink);
}
.sub-plan.is-current {
  background: var(--mist);
}
.sub-plan.is-pick {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--accent);
}
.sub-plan h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
.sub-price {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sub-price small {
  color: var(--mute);
  font-size: 0.9rem;
  font-weight: 400;
}
.sub-plan ul {
  flex: 1;
  margin: 8px 0 16px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.sub-plan li {
  padding: 5px 0;
}
.sub-plan li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--accent-ink);
  font-weight: 700;
}
.sub-tag {
  position: absolute;
  top: -11px;
  left: 20px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 500 0.7rem var(--mono);
}
.sub-tag--pick {
  background: var(--accent);
  color: var(--ink);
}
.sub-btn {
  display: block;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: var(--r2);
  background: var(--accent);
  color: var(--ink);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.15s;
}
.sub-btn:hover {
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--accent);
}
.sub-btn--ghost {
  background: transparent;
}
.sub-btn--off {
  border-color: var(--line);
  background: transparent;
  color: var(--mute);
  pointer-events: none;
}
.app-nav__credits.is-low {
  border-color: var(--danger);
  color: var(--danger);
  animation: sub-pulse 2s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .sub-glow,
  .sub-ring__fill,
  .sub-bar span,
  .app-nav__credits.is-low {
    animation: none;
  }
  .sub-plan,
  .sub-btn {
    transition: none;
  }
  .sub-plan:hover,
  .sub-btn:hover {
    transform: none;
  }
}

/* ------------------------------------------------------ tabbar: sliding bubble tab bar */
.tabbar {
  position: sticky;
  top: 56px; /* directly under .app-nav, so it stays pinned at the top on every screen size */
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 36px var(--gutter) 8px;
  background: var(--color-base-200, #f3f4f5);
}
.tabbar__bar {
  --bubble: 60px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  width: min(100%, 420px);
  height: 64px;
  border-radius: 32px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.tabbar__bubble {
  position: absolute;
  top: calc(var(--bubble) / -2 - 2px);
  left: calc((var(--i) + 0.5) * (100% / var(--n)) - var(--bubble) / 2);
  width: var(--bubble);
  height: var(--bubble);
  border: 6px solid var(--color-base-200, #f3f4f5);
  border-radius: 50%;
  background: var(--ink);
  box-sizing: content-box;
  margin: -6px 0 0 -6px;
  display: grid;
  place-items: center;
  transition: left 0.55s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s;
}
.tabbar__bar.is-idle .tabbar__bubble {
  opacity: 0;
}
.tabbar__bubble svg {
  grid-area: 1 / 1;
  width: 26px;
  height: 26px;
  fill: var(--accent);
  opacity: 0;
  transform: translateY(14px) scale(0.5) rotate(-25deg);
  transition: opacity 0.25s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tabbar__bubble svg.is-on {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--mute);
  text-decoration: none;
  font-size: 0.72rem;
  transition: color 0.2s;
}
.tabbar__item svg {
  width: 22px;
  height: 22px;
  fill: #a8afb6;
  transition: opacity 0.2s, transform 0.4s var(--ease), fill 0.2s;
}
.tabbar__item:hover svg {
  fill: var(--ink-2);
  transform: translateY(-2px);
}
.tabbar__item.is-on {
  color: var(--ink);
  font-weight: 600;
  transform: translateY(8px);
  transition: color 0.2s, transform 0.4s var(--ease);
}
.tabbar__item.is-on svg {
  opacity: 0;
  transform: translateY(-10px) scale(0.6);
}
.tabbar__item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
  border-radius: 24px;
}
@media (prefers-reduced-motion: reduce) {
  .tabbar__bubble,
  .tabbar__bubble svg,
  .tabbar__item,
  .tabbar__item svg {
    transition: none;
  }
}

/* tabbar on phones: it is the only navbar, so the header is hidden and sign-out joins the bar */
@media (max-width: 720px) {
  .app-nav {
    display: none;
  }
  .tabbar {
    --n: 5 !important;
    top: 0;
  }
  /* "Me": the credit ring doubles as the avatar and opens the sheet that holds what the hidden header used to */
  .tabbar__me {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: none;
    color: var(--mute);
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
  }
  .tabbar__me b {
    --ring: inherit; /* @property --ring does not inherit by default, so take the button's value */
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--ring) * 1%), var(--line-soft) 0);
    color: var(--accent);
    font: 600 0.7rem var(--mono);
    isolation: isolate;
    position: relative;
    animation: nb-ring 1.3s var(--ease) 0.3s both;
    transition: transform 0.4s var(--ease);
  }
  .tabbar__me b::before {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: -1;
    border-radius: 50%;
    background: var(--ink);
  }
  .tabbar__me:active b {
    transform: scale(0.88);
  }
  .tabbar__me:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: -4px;
    border-radius: 24px;
  }

  .mesheet {
    inset: 84px 12px auto;
    margin: 0;
    width: auto;
    padding: 8px;
    border: 1px solid rgba(11, 13, 14, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 24px 60px -18px rgba(11, 13, 14, 0.45);
    overflow: visible;
    /* drops out of the bubble: grows from the "Me" slot (right edge) */
    transform-origin: 90% -40px;
    opacity: 0;
    transform: scale(0.6) translateY(-24px);
    transition: opacity 0.2s, transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1), overlay 0.5s allow-discrete, display 0.5s allow-discrete;
  }
  .mesheet:popover-open {
    opacity: 1;
    transform: none;
  }
  @starting-style {
    .mesheet:popover-open {
      opacity: 0;
      transform: scale(0.6) translateY(-24px);
    }
  }
  .mesheet::backdrop {
    background: rgba(11, 13, 14, 0.32);
    backdrop-filter: blur(3px);
  }
  .mesheet a,
  .mesheet__out {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: 18px;
    background: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }
  .mesheet a:active {
    background: var(--accent-soft);
  }
  .mesheet__out {
    color: var(--danger);
  }
  .mesheet__mail {
    margin: 0;
    padding: 8px 16px 0;
    overflow: hidden;
    color: var(--mute);
    font: 500 0.75rem var(--mono);
    text-overflow: ellipsis;
  }
  .mesheet__credits {
    margin: 8px 8px 6px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--ink);
    color: #fff;
    font: 600 0.95rem var(--mono);
  }
  .mesheet__credits i {
    --ring: inherit; /* @property --ring does not inherit by default */
    display: block;
    height: 6px;
    margin-top: 10px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent) calc(var(--ring) * 1%), rgba(255, 255, 255, 0.16) 0);
  }
  .mesheet__credits.is-low i {
    background: linear-gradient(90deg, #ff6b5b calc(var(--ring) * 1%), rgba(255, 255, 255, 0.16) 0);
  }
}
@media (min-width: 721px) {
  .mesheet {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mesheet,
  .tabbar__me b {
    transition: none;
    animation: none;
  }
}

/* desktop: the header itself carries the sliding bubble; the tab bar is phone only */
.app-nav__links a[aria-current="page"] {
  box-shadow: none;
  font-weight: 600;
}
.app-nav__links a:hover {
  background: none;
  color: var(--ink);
}
@media (min-width: 721px) {
  .tabbar {
    display: none;
  }
}
@media (max-width: 720px) {
  }
@media (prefers-reduced-motion: reduce) {
  }

/* phones: simple flat bar pinned at the top; an underline slides under the active tab (no bubble) */
@media (max-width: 720px) {
  .tabbar {
    top: 0;
    padding: 10px var(--gutter);
  }
  .tabbar__bar {
    height: 56px;
  }
  .tabbar__bubble {
    display: none;
  }
  .tabbar__bar::before {
    content: "";
    position: absolute;
    bottom: 5px;
    left: calc((var(--i) + 0.5) * 100% / var(--n) - 14px);
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: #c8f03c;
    transition: left 0.5s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.2s;
  }
  .tabbar__bar.is-idle::before {
    opacity: 0;
  }
  .tabbar__item,
  .tabbar__me {
    position: relative;
  }
  .tabbar__item.is-on {
    transform: none;
  }
  .tabbar__item.is-on svg {
    opacity: 1;
    fill: var(--ink);
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tabbar__bar::before {
    transition: none;
  }
}

/* header row: brand, links and credits pill never overlap; the row tightens before it can collide */
.app-nav .s-brand,
.app-nav__credits {
  flex: none;
  white-space: nowrap;
}
.app-nav__links {
  flex: 0 1 auto;
  min-width: 0;
}
.app-nav__links a {
  white-space: nowrap;
}
@media (max-width: 1180px) {
  .app-nav__links a {
    padding: 8px 8px;
    font-size: 0.84rem;
  }
  .app-nav__credits {
    padding: 6px 8px;
    font-size: 0.72rem;
  }
}
@media (max-width: 960px) {
  .app-nav .s-brand {
    margin-right: 0;
  }
  .app-nav__links a {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
}

/* ------------------------------------------------------ desktop navbar: liquid-glass island */
@property --ring {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
@keyframes nb-ring {
  from {
    --ring: 0;
  }
}
@media (min-width: 721px) {
  .app-nav {
    padding: 12px var(--gutter) 0;
    background: none;
    border: 0;
    backdrop-filter: none;
    pointer-events: none;
  }
  .app-nav__in {
    position: relative;
    isolation: isolate;
    max-width: 1180px;
    height: 58px;
    padding: 0 18px;
    border: 1px solid rgba(11, 13, 14, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: var(--shadow);
    pointer-events: auto;
    transition: max-width 0.6s var(--ease), box-shadow 0.4s, background 0.4s;
  }
  /* spotlight that follows the cursor */
  .app-nav__in::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(200, 240, 60, 0.32), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .app-nav__in:hover::before {
    opacity: 1;
  }
  .app-nav .s-brand img {
    transition: transform 0.6s var(--ease);
  }
  .app-nav .s-brand:hover img {
    transform: rotate(-14deg) scale(1.12);
  }
  .nb-links {
    position: relative;
  }
  .app-nav__links {
    position: relative;
    z-index: 1;
  }
  .nb-goo {
    position: absolute;
    inset: 0;
    filter: url(#nb-goo);
    pointer-events: none;
  }
  .nb-goo i {
    position: absolute;
    top: 50%;
    left: var(--l, 0);
    width: var(--w, 0);
    height: 36px;
    margin-top: -18px;
    border-radius: 999px;
    background: var(--accent);
    transition: left 0.38s var(--ease), width 0.38s var(--ease), opacity 0.25s, transform 0.4s var(--ease);
  }
  /* the second blob lags and overshoots; the goo filter bridges the gap between them */
  .nb-goo i + i {
    transition: left 0.7s cubic-bezier(0.34, 1.5, 0.64, 1) 0.05s, width 0.7s cubic-bezier(0.34, 1.5, 0.64, 1) 0.05s, opacity 0.25s, transform 0.4s var(--ease);
  }
  .nb-links.is-idle .nb-goo i {
    opacity: 0;
    transform: scale(0.5);
  }
  .nb-links.no-anim .nb-goo i {
    transition: none;
  }
  .app-nav__links a[aria-current="page"],
  .app-nav__links a:hover {
    color: var(--ink);
  }
  .app-nav__avatar {
    position: relative;
    isolation: isolate;
    width: 40px;
    height: 40px;
    background: conic-gradient(var(--accent) calc(var(--ring) * 1%), var(--line-soft) 0);
    animation: nb-ring 1.3s var(--ease) 0.3s both;
  }
  .app-nav__avatar::before {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: -1;
    border-radius: 50%;
    background: var(--ink);
  }
}
@media (min-width: 1100px) {
  .app-nav.is-scrolled .app-nav__in {
    max-width: 1040px; /* must stay wider than the admin link set, or the avatar is pushed into the edge */
    box-shadow: 0 14px 40px -14px rgba(11, 13, 14, 0.4);
    background: rgba(255, 255, 255, 0.9);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nb-goo i,
  .app-nav__in,
  .app-nav .s-brand img {
    transition: none;
  }
  .app-nav__avatar {
    animation: none;
  }
}

/* profile: action buttons wrap and fill the row on phones instead of overflowing the card */
@media (max-width: 520px) {
  .profile-actions {
    flex-wrap: wrap;
    padding-inline: 16px;
  }
  .profile-actions > * {
    flex: 1 1 140px;
    display: grid;
    place-items: center;
    white-space: nowrap;
  }
  .profile-actions > :last-child {
    flex-basis: 100%;
  }
}

/* footer on desktop: brand left / links right, then copyright + credits left / social icons right */
@media (min-width: 861px) {
  .s-foot__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }
  .s-foot__links {
    margin-top: 0;
    gap: 12px 22px;
  }
  .s-foot__links a {
    font-size: 0.875rem;
  }
  .s-foot__bar {
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 10px 22px;
    font-size: 0.8rem;
  }
  .s-foot__bar > p:first-child {
    grid-column: 1 / 4;
  }
  .s-foot__social {
    grid-column: 4;
    grid-row: 1;
    gap: 20px;
    margin: 0;
  }
  .s-foot__bar > p:last-child::before {
    content: "·";
    margin-right: 22px;
  }
}
