/* ------------------------- Parimorph — base styles (ported from the RoMotion design system) -------------------------------------------------- */

/* Inter (SIL Open Font License, see assets/fonts/Inter-LICENSE.txt) */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-italic.woff2') format('woff2-variations'); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-soft: #F5F5F1;
  --bg-mute: #EBEBE5;
  --ink: #121311;
  --ink-2: #565850;
  --ink-3: rgba(18, 19, 17, .38);
  --ink-faint: rgba(18, 19, 17, .07);
  --c-gray: #8B8E86;
  --line: rgba(18, 19, 17, .14);
  --panel: #121311;
  --panel-2: #1D1E1B;
  --on-panel: #F3F4EE;
  --on-panel-2: rgba(243, 244, 238, .62);
  --panel-line: rgba(243, 244, 238, .14);
  --solid: #121311;
  --on-solid: #F3F4EE;
  --on-solid-2: rgba(243, 244, 238, .6);
  --accent: #CCF33F;        /* chartreuse: only ever a fill, with --on-accent text on it */
  --accent-2: #B5DD1E;
  --on-accent: #121311;
  --accent-ink: #4D6A00;    /* chartreuse family dark enough to read as text on white */
  --accent-soft: rgba(204, 243, 63, .3);
  --down: #7A5CFF;
  --on-down: #FFFFFF;
  --star-color: #E3A900;
  --shadow: rgba(18, 19, 17, .35);
  --c-dark: #1C1D20;
  --c-dark-2: #141517;
  --c-dark-3: #26272B;
  --c-white: #FFFFFF;
  --c-blue: #455CE9;
  --c-blue-dark: #334BD3;
  --c-light: #E9EAEB;
  --c-paper: #F4F4F2;
  --c-orange: #FF7A45;
  --c-green: #24C958;

  --border: rgba(28, 29, 32, 0.175);
  --border-light: rgba(255, 255, 255, 0.2);

  --ease: cubic-bezier(.7, 0, .3, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --anim: all .5s var(--ease);
  --anim-fast: all .3s var(--ease);

  --gap: clamp(1.25em, 4vw, 2.5em);
  --section: clamp(5em, 21vh, 12em);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --vh: 1vh;
}

/* Dark mode: follows the system setting unless the visitor picks one (assets/js/theme.js sets data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0D0E0C;
  --bg-soft: #161714;
  --bg-mute: #21221E;
  --ink: #EDEEE7;
  --ink-2: #A5A79E;
  --ink-3: rgba(237, 238, 231, .4);
  --ink-faint: rgba(237, 238, 231, .08);
  --c-gray: #82857C;
  --line: rgba(237, 238, 231, .13);
  --panel: #181916;
  --panel-2: #23241F;
  --on-panel: #EDEEE7;
  --on-panel-2: rgba(237, 238, 231, .6);
  --panel-line: rgba(237, 238, 231, .12);
  --solid: #EDEEE7;
  --on-solid: #121311;
  --on-solid-2: rgba(18, 19, 17, .62);
  --accent-ink: #CCF33F;
  --accent-soft: rgba(204, 243, 63, .16);
  --down: #9A85FF;
  --on-down: #121311;
  --star-color: #F2C230;
  --shadow: rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0E0C;
  --bg-soft: #161714;
  --bg-mute: #21221E;
  --ink: #EDEEE7;
  --ink-2: #A5A79E;
  --ink-3: rgba(237, 238, 231, .4);
  --ink-faint: rgba(237, 238, 231, .08);
  --c-gray: #82857C;
  --line: rgba(237, 238, 231, .13);
  --panel: #181916;
  --panel-2: #23241F;
  --on-panel: #EDEEE7;
  --on-panel-2: rgba(237, 238, 231, .6);
  --panel-line: rgba(237, 238, 231, .12);
  --solid: #EDEEE7;
  --on-solid: #121311;
  --on-solid-2: rgba(18, 19, 17, .62);
  --accent-ink: #CCF33F;
  --accent-soft: rgba(204, 243, 63, .16);
  --down: #9A85FF;
  --on-down: #121311;
  --star-color: #F2C230;
  --shadow: rgba(0, 0, 0, .7);
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  font-weight: 450;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
html.is-waiting, html.is-waiting * { cursor: wait !important; }

h1, h2, h3, h4, h5, p { margin: 0; font-weight: 450; }
h1 { font-size: calc(clamp(3.25em, 7vw, 8em) * .875); line-height: 1.065; letter-spacing: -.02em; }
h2 { font-size: clamp(3.25em, 5vw, 4.5em); line-height: 1.065; letter-spacing: -.01em; }
h3 { font-size: clamp(2em, 3.2vw, 3em); line-height: 1.1; }
h4 { font-size: clamp(1.55em, 2.3vw, 2.5em); line-height: 1.45; letter-spacing: -.005em; }
h5 { font-size: .75em; text-transform: uppercase; letter-spacing: .08em; color: var(--c-gray); font-weight: 450; }
p { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.66; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.no-select { user-select: none; -webkit-user-select: none; }
.mono { font-family: var(--mono); font-size: .8em; letter-spacing: 0; }

.section { position: relative; padding: var(--section) 0; }
.container { position: relative; width: 100%; max-width: 100em; margin: 0 auto; padding: 0 calc(var(--gap) * 2); }
.container.medium { padding: 0 calc(var(--gap) * 4); }
.container.small { max-width: 68em; }
@media (max-width: 1024px) { .container, .container.medium { padding: 0 var(--gap); } }

.theme-dark { background: var(--panel); color: var(--on-panel); }
.theme-dark h5 { color: var(--on-panel-2); }
.stripe { height: 1px; width: 100%; background: var(--line); }
.theme-dark .stripe { background: var(--panel-line); }


/* ------------------------- Reveal helpers -------------------------------------------------- */

.span-line { display: inline-flex; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.span-line-inner { display: inline-block; will-change: transform; }
.fade-in { will-change: transform, opacity; }
.once-in { will-change: transform; }

/* ------------------------- Buttons -------------------------------------------------- */

.magnetic { display: inline-flex; }
.btn-text { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .5em; }

/* Round CTA with rising fill */
.btn-round {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(9em, 12vw, 11em);
  height: clamp(9em, 12vw, 11em);
  border-radius: 50%;
  background: var(--solid);
  color: var(--on-solid);
  overflow: hidden;
  isolation: isolate;
  font-size: 1em;
}
.btn-round.is-blue { background: var(--accent); color: var(--on-accent); }
.btn-round:hover .btn-text { color: var(--on-accent); }
.btn-round .btn-text { transition: color .3s var(--ease) .05s; }
.btn-round.is-blue:hover .btn-text { color: var(--on-solid); }
.btn-round.is-big { width: clamp(10em, 15vw, 13.5em); height: clamp(10em, 15vw, 13.5em); font-size: 1.1em; }
.btn-fill {
  position: absolute;
  left: -25%; top: -50%;
  width: 150%; height: 200%;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-76%);
  z-index: 0;
  pointer-events: none;
}
.btn-round.is-blue .btn-fill { background: var(--solid); }

/* Pill */
.btn-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  height: 3.6em;
  padding: 0 1.8em;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  font-size: 1em;
  transition: border-color .3s var(--ease);
}
.btn-pill .btn-fill { background: var(--solid); }
.btn-pill:hover { border-color: var(--solid); }
.btn-pill:hover .btn-text { color: var(--on-solid); }
.btn-pill .btn-text { transition: color .3s var(--ease) .05s; }
.btn-pill.is-solid { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.btn-pill.is-solid .btn-fill { background: var(--accent); }
.btn-pill.is-solid:hover { border-color: var(--accent); }
.btn-pill.is-solid:hover .btn-text, .btn-pill.is-blue:hover .btn-text { color: var(--on-accent); }
.btn-pill.is-blue { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-pill.is-blue .btn-fill { background: var(--accent-2); }
.btn-pill.is-blue:hover { border-color: var(--accent-2); }
.btn-pill.is-small { height: 2.75em; padding: 0 1.25em; font-size: .9em; }
.theme-dark .btn-pill { border-color: var(--panel-line); }
.theme-dark .btn-pill .btn-fill { background: var(--accent); }
.theme-dark .btn-pill:hover { border-color: var(--accent); }
.theme-dark .btn-pill:hover .btn-text { color: var(--on-accent); }
.btn-pill.is-active { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.btn-pill .count { font-size: .7em; opacity: .55; align-self: flex-start; margin-top: .35em; margin-left: -.2em; }

/* Text link with dot */
.btn-link { position: relative; display: inline-flex; padding: .9em .85em; }
.btn-link::after {
  content: '';
  position: absolute;
  left: 50%; bottom: .25em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, 0) scale(0);
  transition: transform .25s var(--ease);
}
.btn-link:hover::after, .btn-link.is-current::after { transform: translate(-50%, 0) scale(1); }

/* Arrow */
.arrow { display: inline-flex; width: 1em; height: 1em; }
.arrow svg { width: 100%; height: 100%; overflow: visible; }


/* ------------------------- Cursor -------------------------------------------------- */

.cursor {
  position: fixed;
  left: 0; top: 0;
  z-index: 300;
  width: 0; height: 0;
  pointer-events: none;
}
.cursor-ball {
  position: absolute;
  left: 0; top: 0;
  width: 5.5em; height: 5.5em;
  margin: -2.75em 0 0 -2.75em;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform .4s var(--ease);
  font-size: 1em;
}
.cursor-ball span { opacity: 0; transition: opacity .25s ease; }
.cursor.is-active .cursor-ball { transform: scale(1); }
.cursor.is-active .cursor-ball span { opacity: 1; transition-delay: .1s; }
/* only squeeze the ball when it's already showing; pressing elsewhere shouldn't pop it open */
.cursor.is-active.is-pressed .cursor-ball { transform: scale(.85); }
/* no cursor ball on Create: it would cover the viewer while orbiting or scrubbing */
body.is-app .cursor { display: none; }
.cursor.is-small .cursor-ball { transform: scale(.22); }
.cursor.is-small .cursor-ball span { opacity: 0; }
@media (hover: none) { .cursor { display: none; } }


/* ------------------------- Curtain (preloader + page transitions) -------------------------------------------------- */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  visibility: hidden;
}
.curtain.is-on { visibility: visible; pointer-events: all; }
.curtain-panel {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: var(--panel);
  will-change: transform;
}
.curtain-curve {
  position: absolute;
  left: -15%;
  width: 130%;
  height: 0;
  overflow: hidden;
  will-change: height;
}
.curtain-curve::before {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 900%;
  border-radius: 50%;
  background: var(--panel);
}
.curtain-curve.top { bottom: 100%; }
.curtain-curve.top::before { bottom: -800%; }
.curtain-curve.bottom { top: 100%; }
.curtain-curve.bottom::before { top: -800%; }
.curtain-words {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: var(--on-panel);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .4em;
  font-size: clamp(2.5em, 5vw, 4.25em);
  opacity: 0;
}
.curtain-words .dot { width: .17em; height: .17em; border-radius: 50%; background: var(--bg); flex: none; }
.curtain-words .word { display: inline-block; min-width: 1ch; }
.curtain-frame {
  position: absolute;
  left: 50%; bottom: 2.25em;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .4);
  font-family: var(--mono);
  font-size: .75em;
  letter-spacing: .05em;
  opacity: 0;
}


/* ------------------------- Nav -------------------------------------------------- */

.nav {
  position: absolute;
  left: 0; top: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--gap) * .9) calc(var(--gap) * 1.25) 0;
}
.nav.is-light { color: var(--on-panel); }
.nav-logo { display: inline-flex; align-items: center; padding: .9em 0; }
.nav-logo .btn-text { gap: .35em; }
.nav-logo .roll { position: relative; display: inline-flex; overflow: hidden; white-space: nowrap; width: var(--roll-w0, auto); transition: width .6s var(--ease); }
.nav-logo .roll-track { display: inline-flex; gap: .3em; flex: none; transition: transform .6s var(--ease); }
.nav-logo .roll .full { white-space: nowrap; }
.nav-logo:hover .roll { width: var(--roll-w1, auto); }
.nav-logo:hover .roll-track { transform: translateX(calc(-1 * var(--by-w, 4.4em))); }
.nav-logo .wordmark { font-weight: 700; letter-spacing: -.01em; }
.nav-links { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-links .menu-trigger { display: none; }
@media (max-width: 720px) {
  .nav-links li { display: none; }
  .nav-links .menu-trigger { display: inline-flex; }
}

/* Floating menu button */
.menu-btn {
  position: fixed;
  right: calc(var(--gap) * 1.1);
  top: calc(var(--gap) * 1.1);
  z-index: 520;
  transform: scale(0);
  transition: transform .4s var(--ease);
}
.menu-btn.is-visible, body.menu-open .menu-btn { transform: scale(1); }
.menu-btn .btn-round {
  width: clamp(4.5em, 6vw, 5.75em);
  height: clamp(4.5em, 6vw, 5.75em);
  background: var(--panel);
  color: var(--on-panel);
  box-shadow: 0 0 0 0 transparent;
}
.menu-btn .btn-round.on-dark { box-shadow: 0 0 0 1px var(--panel-line); }
.menu-bars { position: relative; width: 1.75em; height: 10px; }
.menu-bars::before, .menu-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.menu-bars::before { top: 0; }
.menu-bars::after { top: 100%; }
body.menu-open .menu-bars::before { top: 50%; transform: rotate(45deg); }
body.menu-open .menu-bars::after { top: 50%; transform: rotate(-45deg); }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transition: var(--anim);
}
body.menu-open .menu-backdrop { opacity: 1; visibility: visible; }

.menu-panel {
  position: fixed;
  top: 0; right: 0;
  z-index: 510;
  height: 100%;
  width: min(36em, 100vw);
  background: var(--panel);
  color: var(--on-panel);
  transform: translateX(calc(100% + 8vw));
  transition: transform .8s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15vh clamp(2em, 6vw, 6em) 3em;
}
body.menu-open .menu-panel { transform: none; }
.menu-curve {
  position: absolute;
  top: 0; right: 100%;
  height: 100%;
  width: 8vw;
  overflow: hidden;
  pointer-events: none;
}
.menu-curve::before {
  content: '';
  position: absolute;
  top: -25%; left: 0;
  width: 200%;
  height: 150%;
  border-radius: 50%;
  background: var(--panel);
  transform: translateX(0);
  transition: transform .8s var(--ease);
}
body.menu-open .menu-curve::before { transform: translateX(50%); }
.menu-panel h5 { margin-bottom: 1.5em; }
.menu-panel .stripe { margin-bottom: 2.5em; }
.menu-links { list-style: none; margin: 0; padding: 0; }
.menu-links a { position: relative; display: inline-flex; align-items: center; font-size: clamp(2.5em, 4.4vw, 3.6em); line-height: 1.25; padding: .05em 0; }
.menu-links a::before {
  content: '';
  position: absolute;
  left: -1.1em;
  width: .25em; height: .25em;
  border-radius: 50%;
  background: var(--bg);
  transform: scale(0);
  transition: transform .3s var(--ease);
}
.menu-links a:hover::before, .menu-links a.is-current::before { transform: scale(1); }
.menu-socials { display: flex; flex-wrap: wrap; gap: 0 1.5em; }
.menu-socials a { padding: .4em 0; }
.menu-socials-wrap h5 { margin-bottom: 1em; }


/* ------------------------- Marquee -------------------------------------------------- */

.marquee { position: relative; display: flex; white-space: nowrap; overflow: hidden; pointer-events: none; }
.marquee-track { display: flex; flex: none; will-change: transform; }
.marquee-item { flex: none; display: flex; align-items: center; }
.marquee-item .sep { display: inline-block; padding: 0 .25em; }


.seg { display: inline-flex; padding: .2em; border-radius: 999px; background: var(--bg-mute); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; height: 2.1em; padding: 0 .85em; border-radius: 999px; font-size: .82em; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); user-select: none; }
.seg input:checked + span { background: var(--solid); color: var(--on-solid); }
.seg.len-seg { overflow: hidden; } /* the length chips slide when the model changes (home.js) */
.seg.len-seg span { min-width: 2.9em; justify-content: center; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme-dark .seg { background: rgba(255, 255, 255, .08); }
.theme-dark .seg input:checked + span { background: var(--bg); color: var(--ink); }

.toggle { display: inline-flex; align-items: center; gap: .55em; font-size: .82em; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { position: relative; width: 2.4em; height: 1.4em; border-radius: 999px; background: var(--ink-faint); transition: background .3s var(--ease); flex: none; }
.toggle-ui::after { content: ''; position: absolute; left: .2em; top: .2em; width: 1em; height: 1em; border-radius: 50%; background: var(--bg); transition: transform .35s var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(1em); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--accent); outline-offset: 2px; }


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

.page-header { padding: calc(var(--section) * 1.35) 0 calc(var(--section) * .45); }
.page-header h1 { font-size: calc(clamp(3.25em, 7vw, 8em) * .95); max-width: 9.5em; }
.page-header .sub { display: flex; justify-content: space-between; align-items: end; gap: 2em; margin-top: 2.5em; flex-wrap: wrap; }
.page-header .sub p { max-width: 28em; color: var(--ink-2); }
.page-header sup { font-size: .25em; vertical-align: top; position: relative; top: .7em; margin-left: .25em; color: var(--c-gray); letter-spacing: 0; }

/* ------------------------- Library -------------------------------------------------- */

.lib-toolbar { position: relative; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 1em 2em; flex-wrap: wrap; margin-bottom: 3em; }
.lib-filters, .lib-views { display: flex; gap: .5em; flex-wrap: wrap; }
.lib-search {
  display: flex; align-items: center; gap: .6em;
  height: 3.6em; padding: 0 1.4em;
  border-radius: 999px; border: 1px solid var(--line);
  min-width: 14em;
  transition: border-color .3s var(--ease);
}
.lib-search:focus-within { border-color: var(--solid); }
.lib-search input { border: 0; outline: 0; background: none; font: inherit; width: 100%; color: inherit; }
.lib-search svg { width: 1em; height: 1em; flex: none; opacity: .5; }
.lib-right { display: flex; gap: .75em; align-items: center; flex-wrap: wrap; }


.badge { display: inline-flex; align-items: center; height: 1.9em; padding: 0 .75em; border-radius: 999px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); font-size: .72em; }
.badge.is-dark { background: var(--solid); color: var(--on-solid); }

[hidden] { display: none !important; }

.faq { list-style: none; margin: 0; padding: 0; }
.faq li { border-top: 1px solid var(--line); }
.faq li:last-child { border-bottom: 1px solid var(--line); }
.faq button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 2em; padding: 1.7em 0; text-align: left; font-size: clamp(1.15em, 1.6vw, 1.5em); }
.faq .plus { position: relative; flex: none; width: 2.2em; height: 2.2em; border-radius: 50%; border: 1px solid var(--line); transition: var(--anim-fast); }
.faq .plus::before, .faq .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 38%; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .4s var(--ease); }
.faq .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq li.is-open .plus { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.faq li.is-open .plus::after { transform: translate(-50%, -50%) rotate(0); }
.faq .answer { height: 0; overflow: hidden; transition: height .5s var(--ease); }
.faq .answer p { padding: 0 4em 2em 0; color: var(--ink-2); max-width: 46em; font-size: 1.05em; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(3em, 7vw, 8em); }
.form-row { position: relative; display: grid; grid-template-columns: 3.2em 1fr; padding: 2.75em 0 2.25em; border-top: 1px solid var(--line); }
.form-row:last-of-type { border-bottom: 1px solid var(--line); }
.form-row .num { font-family: var(--mono); font-size: .8em; color: var(--c-gray); padding-top: .55em; }
.form-row label { display: block; font-size: clamp(1.3em, 1.9vw, 1.9em); margin-bottom: .55em; }
.form-row input, .form-row textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: clamp(1.05em, 1.35vw, 1.3em);
  color: var(--ink);
  resize: none;
  padding: 0;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--ink-3); }
.form-row .line { position: absolute; left: 3.2em; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.form-row:focus-within .line { transform: scaleX(1); }
.form-row.is-invalid .line { transform: scaleX(1); background: #ff4444; }
.chips { display: flex; flex-wrap: wrap; gap: .5em; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle span { display: inline-flex; align-items: center; height: 2.8em; padding: 0 1.25em; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; transition: var(--anim-fast); user-select: none; }
.chip-toggle span:hover { border-color: var(--solid); }
.chip-toggle input:checked + span { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.range-wrap { display: flex; align-items: center; gap: 1.25em; }
.range-wrap output { font-family: var(--mono); font-size: .9em; min-width: 6em; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 2px; background: var(--line); border-radius: 2px; flex: 1; padding: 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 5px var(--accent-soft); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }
.form-submit { position: relative; display: flex; justify-content: flex-end; margin-top: -4.5em; padding-right: 2em; z-index: 2; }
.form-success { display: none; padding: 3em 0; }
.form-success.is-visible { display: block; }
.contact-side { display: flex; flex-direction: column; gap: 3em; }
.contact-side .portrait { width: 6.5em; height: 6.5em; border-radius: 50%; overflow: hidden; background: var(--bg-mute); }
.contact-side .portrait img { width: 100%; height: 100%; object-fit: cover; }
.contact-side .portrait .r-logo { width: auto; height: 100%; object-fit: contain; } /* the logo keeps its own aspect ratio */
.contact-side h5 { margin-bottom: 1em; }
.contact-side p a { border-bottom: 1px solid transparent; transition: border-color .3s; }
.contact-side p a:hover { border-color: currentColor; }
@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { order: -1; flex-direction: row; flex-wrap: wrap; }
  .form-submit { margin-top: 2em; justify-content: center; padding: 0; }
}

/* ------------------------- Footer -------------------------------------------------- */

.footer-curve {
  position: relative;
  height: 10vh;
  overflow: hidden;
  margin-top: -1px;
  z-index: 2;
}
.footer-curve::before {
  content: '';
  position: absolute;
  left: -15%; bottom: 0;
  width: 130%;
  height: 750%;
  border-radius: 50%;
  background: var(--curve-color, var(--bg));
  box-shadow: 0 60px 50px rgba(0, 0, 0, .35);
}
.footer-curve-wrap { position: relative; background: var(--panel); }
.footer { position: relative; background: var(--panel); color: var(--on-panel); padding: calc(var(--section) * .9) 0 0; overflow: hidden; }
.footer-top { display: flex; align-items: center; gap: 1.2em; }
.footer-top .avatar { width: clamp(4em, 6vw, 6.5em); height: clamp(4em, 6vw, 6.5em); border-radius: 50%; overflow: hidden; background: var(--bg-mute); flex: none; }
.footer-top .avatar.mark { background: none; border-radius: 0; overflow: visible; width: auto; display: flex; align-items: center; justify-content: center; }
.footer h2 { font-size: calc(clamp(3.25em, 7vw, 8em) * .78); line-height: 1.05; }
.footer-mid { position: relative; margin-top: clamp(3em, 7vw, 6em); padding-bottom: clamp(3em, 6vw, 6em); }
.footer-mid .stripe { background: var(--panel-line); }
.footer-mid .btn-round { position: absolute; right: 12%; top: 0; transform: translateY(-50%); }
.footer-pills { display: flex; gap: 1em; flex-wrap: wrap; padding-top: clamp(3em, 5vw, 4.5em); }
.footer-arrow { position: absolute; right: 0; top: -9em; width: 1.4em; height: 1.4em; }
.footer-bottom { display: flex; justify-content: space-between; align-items: end; gap: 2em; padding: 2em calc(var(--gap) * 1.25) calc(var(--gap) * 1); flex-wrap: wrap; }
.footer-bottom .group { display: flex; gap: 2.5em; flex-wrap: wrap; }
.footer-bottom h5 { margin-bottom: .6em; font-size: .7em; }
.footer-bottom .links { display: flex; gap: 1.5em; flex-wrap: wrap; }
.footer-bottom p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom .btn-link { padding: 0; }
.footer-bottom .btn-link::after { bottom: -.6em; }
@media (max-width: 720px) {
  .footer-mid .btn-round { right: 1em; }
  .footer-pills .btn-pill { width: 100%; justify-content: center; }
}

/* ------------------------- 404 -------------------------------------------------- */

.lost { position: relative; height: calc(var(--vh) * 100); min-height: 36em; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg-mute); }
.lost .stage-host { position: absolute; inset: 0; }
.lost-copy { position: relative; z-index: 2; text-align: center; pointer-events: none; margin-top: -40vh; }
.lost-copy * { pointer-events: auto; }
.lost-copy h1 { font-size: clamp(4em, 12vw, 12em); line-height: 1; }
.lost-copy p { margin: 1em 0 2em; color: var(--ink-2); }


/* ------------------------- Reduced motion -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

.rm-toast {
  position: fixed;
  left: 50%; bottom: 2em;
  z-index: 950;
  max-width: min(32em, calc(100% - 2em));
  padding: .85em 1.25em;
  border-radius: 12px;
  background: var(--panel);
  color: var(--on-panel);
  font-size: .9em;
  line-height: 1.45;
  transform: translate(-50%, 1em);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .5s var(--ease-out);
}
.rm-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
/* slides in from the top (sign-in notes) */
.rm-toast.is-top { top: 1.5em; bottom: auto; transform: translate(-50%, -1em); }
.rm-toast.is-top.is-visible { transform: translate(-50%, 0); }

.auth-modal { position: fixed; inset: 0; z-index: 940; display: flex; align-items: center; justify-content: center; padding: 1.25em; background: rgba(20, 21, 23, .55); }
.auth-modal[hidden] { display: none; }
body.auth-open { overflow: hidden; }
.auth-card { position: relative; width: min(25em, 100%); background: var(--bg); border-radius: 20px; padding: 2.2em 2em 2em; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); text-align: center; }
.auth-close { position: absolute; right: .7em; top: .55em; width: 2em; height: 2em; border-radius: 50%; font-size: 1.4em; line-height: 1; color: var(--c-gray); transition: background .2s, color .2s; }
.auth-close:hover { background: var(--bg-mute); color: var(--ink); }
.auth-mark { height: 3.4em; margin: 0 auto 1.1em; display: flex; justify-content: center; }
.auth-card h3 { font-size: 1.9em; margin-bottom: .3em; }
.auth-sub { font-size: .95em; color: var(--ink-2); margin-bottom: 1.4em; }
.auth-tabs { margin-bottom: 1.2em; }
.auth-google { width: 100%; justify-content: center; background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
.auth-google[hidden] { display: none; }
.auth-google .btn-text { display: inline-flex; align-items: center; gap: .6em; }
.auth-google .g-logo { width: 1.15em; height: 1.15em; flex: none; }
.auth-or { display: flex; align-items: center; gap: .8em; margin: 1em 0; font-size: .78em; color: var(--c-gray); }
.auth-or[hidden] { display: none; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: .8em; }
.auth-field { display: flex; flex-direction: column; gap: .35em; font-size: .82em; color: var(--ink-2); }
.auth-field[hidden] { display: none; }
.auth-field input { height: 3em; padding: 0 1em; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 1.15em; color: var(--ink); outline: 0; transition: border-color .25s, box-shadow .25s; }
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-dob-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: .5em; }
.auth-field select { height: 3em; padding: 0 2.2em 0 1em; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 1.15em; color: var(--ink); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23999D9E' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 1em center / .7em; appearance: none; outline: 0; transition: border-color .25s, box-shadow .25s; cursor: pointer; }
.auth-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-error { min-height: 1.2em; font-size: .85em; color: #e5484d; }
.auth-captcha:empty { display: none; }
.auth-captcha { min-height: 65px; }
.auth-closed { font-size: .9em; color: var(--ink-2); line-height: 1.5; }
.auth-closed button { font: inherit; color: var(--accent-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.auth-submit { width: 100%; justify-content: center; }
.auth-submit[disabled] { opacity: .6; pointer-events: none; }

/* ------------------------- Legal pages (terms, privacy, refunds) -------------------------------------------------- */

.legal { max-width: 46em; font-size: 1.05em; line-height: 1.65; color: var(--ink-2); }
.legal h2 { font-size: 1.35em; line-height: 1.3; letter-spacing: -.01em; margin: 2.2em 0 .7em; color: var(--ink); }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { margin: 0 0 1em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .55em; }
.legal li::marker { color: var(--accent-ink); }
.legal a, .auth-legal a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal code { font-family: var(--mono); font-size: .88em; background: var(--bg-mute); padding: .1em .35em; border-radius: 4px; }
.legal-links { margin-top: 3em !important; padding-top: 1.5em; border-top: 1px solid var(--line); font-size: .9em; color: var(--c-gray); }
.legal-date { color: var(--c-gray); font-size: .9em; }
.auth-legal { font-size: .78em; line-height: 1.5; color: var(--ink-2); margin: .2em 0 .4em; }
.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Plain links for crawlers and no-JS visitors; app.js replaces them with the real nav and footer */
.static-nav { display: flex; flex-wrap: wrap; gap: .4em 1.2em; padding: 1.2em var(--gap); font-size: .9em; }
.static-nav a { color: inherit; }
.footer-disclaim { margin-top: .35em; font-size: .78em; color: var(--on-panel-2); }

/* =========================================================================================================== */
/* ------------------------- Parimorph components -------------------------------------------------- */
/* =========================================================================================================== */

:root {
  --muted: var(--ink-2);
  --radius: 14px;
}

.mark { display: inline-flex; width: 1em; height: 1em; }
.mark svg { width: 100%; height: 100%; overflow: visible; }
.nav-logo .copy { display: inline-block; transition: transform .8s var(--ease-out); }
.nav-logo .copy .caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.nav-links .nav-cta { margin-left: .4em; display: flex; align-items: center; }
.nav-links .nav-cta .btn-pill { height: 2.75em; padding: 0 1.2em; font-size: .9em; }
.nav-account { display: flex; align-items: center; margin-left: .3em; }
.account-pill { display: inline-flex; align-items: center; height: 2.75em; padding: 0 .4em 0 1em; border-radius: 999px; background: var(--ink-faint); transition: background .3s var(--ease); font-size: .9em; }
.account-pill:hover { background: var(--ink-faint); }
.account-pill .btn-text { gap: .6em; }
.account-pill .karma { font-variant-numeric: tabular-nums; color: var(--muted); }
.account-pill .who { display: inline-flex; align-items: center; height: 2em; padding: 0 .8em; border-radius: 999px; background: var(--solid); color: var(--on-solid); }
.account-pill .mod-dot { width: .55em; height: .55em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-2); }
.menu-account { margin-top: 2.5em; display: flex; flex-direction: column; align-items: flex-start; gap: .6em; }
.menu-account .account-pill { background: rgba(255, 255, 255, .1); }
.menu-account .account-pill .who { background: var(--bg); color: var(--ink); }
.menu-account .account-pill .karma { color: var(--on-panel-2); }
.menu-account .btn-link { padding-left: 0; font-size: 1.1em; }
@media (max-width: 900px) { .nav-links .nav-cta { display: none; } }

/* ------------------------- Hero (home) -------------------------------------------------- */

.hero { position: relative; height: calc(var(--vh) * 100); min-height: 44em; background: var(--bg-mute); overflow: hidden; display: flex; flex-direction: column; }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-center { position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6.5em var(--gap) clamp(9em, 15vw, 16em); }
.hero-title { font-size: clamp(3em, 6.6vw, 6.8em); line-height: 1; letter-spacing: -.035em; margin-bottom: .5em; }
.hero-title .muted { color: var(--ink-3); }
.hero-name { position: absolute; left: 0; bottom: -.18em; z-index: 1; width: 100%; color: var(--ink); }
.hero-name .marquee-item { font-size: clamp(6em, 14vw, 16em); line-height: 1; letter-spacing: -.04em; padding-right: .15em; }
.hero-name .sep { font-weight: 300; }
.hero-tag { position: absolute; right: calc(var(--gap) * 2); top: 57%; z-index: 3; max-width: 13em; }
.hero-tag .arrow { width: 1.1em; height: 1.1em; margin-bottom: 2em; }
.hero-tag h4 { font-size: clamp(1.15em, 1.5vw, 1.6em); line-height: 1.3; }
.hero-hanger { position: absolute; left: 0; top: 57%; z-index: 3; display: flex; align-items: center; gap: 1.2em; height: 7em; padding: 0 1.25em 0 2.25em; background: var(--panel); color: var(--on-panel); border-radius: 0 999px 999px 0; }
.hero-hanger p { font-size: 1.02em; line-height: 1.3; }
.hero-hanger .ball { flex: none; width: 4.6em; height: 4.6em; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1em; }
.hero-hanger .ball .mark { width: 1.7em; height: 1.7em; color: var(--on-panel); }
@media (max-width: 1320px) { .hero-hanger, .hero-tag { display: none; } }

.search-box { position: relative; width: min(44em, 100%); background: var(--bg); border-radius: 999px; padding: .5em .5em .5em 1.8em; display: flex; align-items: center; gap: 1em; text-align: left;
  box-shadow: 0 1px 0 var(--ink-faint), 0 30px 60px -30px var(--ink-3); transition: box-shadow .4s var(--ease); }
.search-box:focus-within { box-shadow: 0 0 0 1.5px var(--accent), 0 30px 60px -30px var(--ink-3); }
.search-box svg { width: 1.2em; height: 1.2em; flex: none; opacity: .45; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: clamp(1.05em, 1.35vw, 1.25em); color: var(--ink); height: 2.6em; }
.search-box input::placeholder { color: var(--ink-3); }
.search-box .btn-round { width: 5.4em; height: 5.4em; font-size: .85em; flex: none; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4em; margin-top: 1.4em; font-size: .88em; }
.hero-chips > span { color: var(--c-gray); margin-right: .3em; }
.hero-chips a { display: inline-flex; align-items: center; height: 2.3em; padding: 0 1em; border-radius: 999px; border: 1px solid var(--line); transition: var(--anim-fast); }
.hero-chips a:hover { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
@media (max-width: 600px) { .search-box { padding-left: 1.2em; } .search-box .btn-round { width: 4.4em; height: 4.4em; } }

/* ------------------------- Intro + generic two column -------------------------------------------------- */

.intro .row { display: flex; gap: 4em; }
.intro .col-text { flex: 1 1 62%; }
.intro .col-side { flex: 1 1 30%; position: relative; padding-top: .6em; }
.intro .col-side p { max-width: 20em; color: var(--muted); }
.intro .btn-round { position: absolute; right: 0; top: calc(100% + 3em); }
@media (max-width: 1024px) { .intro .row { flex-direction: column; gap: 2em; } .intro .btn-round { position: relative; top: 0; margin-top: 2.5em; } }
.list-head { display: flex; justify-content: space-between; align-items: end; gap: 1em; padding: 0 0 2em; flex-wrap: wrap; }
.list-head h2 { font-size: clamp(2.2em, 4vw, 3.6em); }

/* ------------------------- Feed rows -------------------------------------------------- */

.feed { list-style: none; margin: 0; padding: 0; transition: opacity .3s var(--ease); }
.feed.is-fading { opacity: .25; }
.feed > li { border-top: 1px solid var(--line); }
.feed > li:last-child { border-bottom: 1px solid var(--line); }
.post-row { position: relative; display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 1.4em; padding: 1.7em 0; }
.post-row .row-link { position: absolute; inset: 0; z-index: 1; }
.post-row .vote, .post-row .row-actions a, .post-row .row-actions button, .post-row .row-meta a { position: relative; z-index: 2; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35em .7em; font-size: .82em; color: var(--c-gray); margin-bottom: .55em; }
.row-meta a:hover { color: var(--ink); }
.row-meta .badge { background: var(--bg-mute); color: var(--ink); }
.row-meta .badge.is-dark { background: var(--solid); color: var(--on-solid); }
.row-meta .badge.is-pin { background: var(--accent); color: var(--on-accent); }
.row-meta .badge.is-warn { background: #FFE9DE; color: #A1350B; }
.row-title { font-size: clamp(1.35em, 2vw, 1.9em); line-height: 1.2; letter-spacing: -.012em; transition: transform .6s var(--ease), color .3s; }
.post-row:hover .row-title { transform: translateX(.3em); }
.row-snippet { margin-top: .7em; padding: .85em 1.1em; border-radius: 10px; background: var(--bg-soft); font-family: var(--mono); font-size: .8em; line-height: 1.6; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: background .4s var(--ease); }
.post-row:hover .row-snippet { background: var(--bg-mute); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3em 1.3em; margin-top: .9em; font-size: .85em; color: var(--c-gray); }
.row-actions .stat { display: inline-flex; align-items: center; gap: .4em; }
.row-actions svg { width: 1.05em; height: 1.05em; }
.row-actions button:hover, .row-actions a:hover { color: var(--ink); }
.row-actions .is-saved { color: var(--accent-ink); }
.models { display: inline-flex; gap: .3em; flex-wrap: wrap; }
.model { display: inline-flex; align-items: center; height: 1.85em; padding: 0 .7em; border-radius: 999px; border: 1px solid var(--line); font-size: .9em; color: var(--ink); }
.stars-mini { display: inline-flex; align-items: center; gap: .3em; color: var(--ink); }
.stars-mini i { width: .95em; height: .95em; background: var(--star-color); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
:root { --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E"); }
@media (max-width: 600px) { .post-row { grid-template-columns: 2.6em minmax(0, 1fr); gap: 1em; } }

/* Vote rail */
.vote { display: flex; flex-direction: column; align-items: center; gap: .15em; user-select: none; }
.vote-btn { position: relative; width: 2.6em; height: 2.6em; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--c-gray); overflow: hidden; isolation: isolate; border: 1px solid transparent; transition: color .25s, border-color .25s; }
.vote-btn svg { position: relative; z-index: 2; width: 1em; height: 1em; transition: transform .4s var(--ease-out); }
.vote-btn .btn-fill { background: var(--bg-mute); }
.vote-btn:hover { color: var(--ink); }
.vote-btn.up:hover svg { transform: translateY(-2px); }
.vote-btn.down:hover svg { transform: translateY(2px); }
.vote-btn.up.is-on { color: var(--on-accent); background: var(--accent); }
.vote-btn.down.is-on { color: var(--on-down); background: var(--down); }
.vote-btn.is-on .btn-fill { background: rgba(0, 0, 0, .12); }
.vote-score { font-variant-numeric: tabular-nums; font-size: .95em; min-width: 2ch; text-align: center; line-height: 1.6; }
.vote-score.is-up { color: var(--accent-ink); font-weight: 600; }
.vote-score.is-down { color: var(--down); font-weight: 600; }
.vote.is-pop .vote-score { animation: pop .4s var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.35); } }
.vote.horizontal { flex-direction: row; gap: .3em; }

/* ------------------------- Browse layout -------------------------------------------------- */

.browse-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20em; gap: clamp(2em, 4vw, 4em); align-items: start; }
.side { position: sticky; top: 2em; display: flex; flex-direction: column; gap: 2em; }
.side h5 { margin-bottom: 1em; }
.side-sections { list-style: none; margin: 0; padding: 0; }
.side-sections li { border-top: 1px solid var(--line); }
.side-sections li:last-child { border-bottom: 1px solid var(--line); }
.side-sections a { display: flex; justify-content: space-between; gap: 1em; padding: .75em 0; transition: padding .5s var(--ease), color .3s; }
.side-sections a:hover, .side-sections a.is-current { padding-left: .6em; color: var(--accent-ink); }
.side-sections span:last-child { font-family: var(--mono); font-size: .78em; color: var(--c-gray); padding-top: .2em; }
.side-card { border-radius: var(--radius); background: var(--bg-soft); padding: 1.5em; }
.side-card p { font-size: .92em; color: var(--muted); margin-bottom: 1em; }
.side-card ol { margin: 0 0 1em; padding-left: 1.2em; font-size: .9em; color: var(--muted); }
.side-card li { margin-bottom: .35em; }
.side-card li::marker { color: var(--accent-ink); }
.side-card .btn-pill { width: 100%; justify-content: center; }
@media (max-width: 1024px) { .browse-grid { grid-template-columns: 1fr; } .side { position: static; } .side .ad { display: none; } }

.feed-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1em 1.5em; flex-wrap: wrap; margin-bottom: 1.6em; }
.feed-toolbar .left, .feed-toolbar .right { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; }
.select { appearance: none; -webkit-appearance: none; height: 2.6em; padding: 0 2.2em 0 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231C1D20' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 1em center; font: inherit; font-size: .88em; color: var(--ink); cursor: pointer; }
.chip-x { display: inline-flex; align-items: center; gap: .5em; height: 2.4em; padding: 0 1em; border-radius: 999px; background: var(--solid); color: var(--on-solid); font-size: .85em; }
.feed-more { display: flex; justify-content: center; padding-top: 3em; }
.feed-empty { padding: 4em 2em; border-radius: var(--radius); background: var(--bg-soft); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1em; }
.feed-empty p { color: var(--muted); max-width: 26em; }
.skeleton { height: 9em; border-radius: 10px; margin: 1.5em 0; background: linear-gradient(90deg, var(--bg-soft) 0%, var(--bg-mute) 50%, var(--bg-soft) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------- Sections grid -------------------------------------------------- */

.section-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; list-style: none; margin: 0; padding: 0; }
.section-grid li { background: var(--bg); }
.section-grid a { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2.5em; min-height: 15em; padding: 1.8em 1.7em; overflow: hidden; isolation: isolate; transition: color .4s var(--ease); }
.section-grid a .btn-fill { background: var(--solid); }
.section-grid a:hover { color: var(--on-solid); }
.section-grid a:hover p, .section-grid a:hover .count { color: var(--on-solid-2); }
.section-grid h3 { position: relative; z-index: 2; font-size: clamp(1.6em, 2.3vw, 2.2em); margin-bottom: .35em; }
.section-grid p { position: relative; z-index: 2; color: var(--muted); font-size: .95em; transition: color .4s; }
.section-grid .foot { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.section-grid .count { font-family: var(--mono); font-size: .78em; color: var(--c-gray); transition: color .4s; }
.section-grid .arrow { width: .9em; height: .9em; transition: transform .5s var(--ease); }
.section-grid a:hover .arrow { transform: rotate(45deg); }
.theme-dark .section-grid { background: var(--panel-line); border-color: var(--panel-line); }
@media (max-width: 1024px) { .section-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .section-grid { grid-template-columns: 1fr; } .section-grid a { min-height: 11em; } }

/* ------------------------- How it works -------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5em; }
.steps h5 { margin-bottom: 1.4em; }
.steps .stripe { margin-bottom: 2em; }
.steps h4 { font-size: 1.6em; margin-bottom: .5em; }
.steps p { color: var(--on-panel-2); font-size: 1em; }
.steps .num { font-family: var(--mono); font-size: .75em; color: var(--accent-ink); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.promo-head { display: grid; grid-template-columns: 1fr auto; gap: 3em; align-items: end; margin-bottom: clamp(3em, 6vw, 5em); }
.promo-head p { max-width: 28em; color: var(--on-panel-2); margin-top: 1.4em; }
@media (max-width: 900px) { .promo-head { grid-template-columns: 1fr; } }

/* ------------------------- Post page -------------------------------------------------- */

.post-wrap { padding-top: calc(var(--section) * 1.05); }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20em; gap: clamp(2em, 4vw, 4em); align-items: start; }
@media (max-width: 1024px) { .post-grid { grid-template-columns: 1fr; } }
.back-link { display: inline-flex; align-items: center; gap: .5em; color: var(--c-gray); font-size: .9em; margin-bottom: 2em; transition: color .3s; }
.back-link:hover { color: var(--ink); }
.post-head { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 1.4em; }
.post-title { font-size: clamp(2.2em, 4.2vw, 3.8em); line-height: 1.04; letter-spacing: -.025em; margin: .15em 0 .5em; overflow-wrap: anywhere; }
.post-notice { margin: 0 0 1.5em; padding: 1em 1.25em; border-radius: 12px; background: #FFF1E9; color: #7A2A08; font-size: .95em; }
.post-notice.is-info { background: #EEF0FD; color: #26339A; }
.prompt-block { position: relative; margin: 1.6em 0; border-radius: 18px; background: var(--panel); color: var(--on-panel); overflow: hidden; }
.prompt-top { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 1em 1em 1em 1.5em; border-bottom: 1px solid var(--panel-line); }
.prompt-top h5 { color: var(--on-panel-2); }
.prompt-top .tools { display: flex; gap: .5em; align-items: center; }
.prompt-text { margin: 0; padding: 1.5em; max-height: 32em; overflow: auto; font-family: var(--mono); font-size: .86em; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-block.is-collapsed .prompt-text { max-height: 18em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.prompt-block .expand { display: block; width: 100%; padding: .9em; border-top: 1px solid var(--panel-line); color: var(--on-panel-2); font-size: .85em; }
.prompt-block .expand:hover { color: var(--on-panel); }
.copy-btn { width: 5.6em; height: 5.6em; font-size: .82em; }
.copy-btn.is-done { background: var(--c-green); }
.prompt-block .btn-pill { height: 2.6em; padding: 0 1.1em; font-size: .82em; color: var(--on-panel); }
.notes { color: var(--ink-2); font-size: 1.05em; line-height: 1.7; overflow-wrap: anywhere; }
.notes p { margin: 0 0 1em; }
.notes a, .comment-body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.post-tags { display: flex; flex-wrap: wrap; gap: .4em; margin: 1.6em 0; }
.tag { display: inline-flex; align-items: center; height: 2.2em; padding: 0 .9em; border-radius: 999px; border: 1px solid var(--line); font-size: .85em; transition: var(--anim-fast); }
.tag:hover { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.post-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6em; padding: 1.2em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-bar .spacer { flex: 1; }
.link-btn { display: inline-flex; align-items: center; gap: .4em; font-size: .88em; color: var(--c-gray); padding: .4em .2em; transition: color .25s; }
.link-btn:hover { color: var(--ink); }
.link-btn.danger:hover { color: #e5484d; }
.link-btn svg { width: 1em; height: 1em; }

.rate { margin: 2.2em 0; padding: 1.5em 1.6em; border-radius: var(--radius); background: var(--bg-soft); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1em 2em; }
.rate h4 { font-size: 1.25em; line-height: 1.3; }
.rate p { font-size: .88em; color: var(--muted); }
.stars { display: inline-flex; gap: .15em; }
.stars button { width: 2.3em; height: 2.3em; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: transform .35s var(--ease-out), background .2s; }
.stars button i { width: 1.45em; height: 1.45em; background: var(--ink-faint); -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; transition: background .2s; }
.stars button.is-lit i { background: var(--star-color); }
.stars button:hover { transform: scale(1.15); }
.rate-avg { font-size: 2em; letter-spacing: -.02em; line-height: 1; }
.rate-avg small { font-size: .4em; color: var(--c-gray); letter-spacing: 0; margin-left: .3em; }

.facts { margin: 0 0 1.5em; }
.facts div { display: flex; justify-content: space-between; gap: 1em; padding: .7em 0; border-bottom: 1px solid var(--line); font-size: .92em; }
.facts div:first-child { border-top: 1px solid var(--line); }
.facts dt { color: var(--c-gray); }
.facts dd { margin: 0; text-align: right; }
.author-card { display: flex; gap: 1em; align-items: center; margin-bottom: 1.5em; }
.avatar { flex: none; width: 3.2em; height: 3.2em; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--on-panel); font-size: 1em; text-transform: uppercase; background: var(--accent); }
.avatar.is-big { width: 6em; height: 6em; font-size: 2em; }
.author-card p { font-size: .85em; color: var(--c-gray); }

/* ------------------------- Comments -------------------------------------------------- */

.comments { margin-top: 3.5em; }
.comments-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; margin-bottom: 1.5em; flex-wrap: wrap; }
.comments-head h3 { font-size: 1.8em; }
.composer { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1em 1em .8em 1.2em; transition: border-color .3s, box-shadow .3s; background: var(--bg); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { display: block; width: 100%; min-height: 4.5em; border: 0; outline: 0; resize: vertical; font: inherit; font-size: 1em; line-height: 1.55; color: var(--ink); background: none; }
.composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1em; margin-top: .6em; }
.composer-bar small { color: var(--c-gray); font-size: .78em; }
.composer-bar .actions { display: flex; gap: .4em; }
.composer.is-reply { margin: .8em 0 .4em; }
.thread { list-style: none; margin: 1.5em 0 0; padding: 0; }
.thread .thread { margin: 0; padding-left: 1.3em; border-left: 1px solid var(--line); }
.comment { padding: 1em 0 .2em; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .7em; font-size: .82em; color: var(--c-gray); }
.comment-meta .who { color: var(--ink); font-weight: 550; }
.comment-meta .op { display: inline-flex; height: 1.7em; align-items: center; padding: 0 .55em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .85em; }
.comment-body { margin: .35em 0 .3em; font-size: .98em; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-body.is-gone { color: var(--c-gray); font-style: italic; }
.comment-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .1em .8em; font-size: .85em; }
.comment-tools .vote { flex-direction: row; gap: .1em; }
.comment-tools .vote-btn { width: 2em; height: 2em; }
.comment-tools .vote-score { font-size: .95em; }
.comment.is-held { opacity: .7; }
.collapse-btn { font-family: var(--mono); font-size: .9em; color: var(--c-gray); }
.thread-collapsed > .thread, .thread-collapsed > .comment > .comment-body, .thread-collapsed > .comment > .comment-tools { display: none; }

/* ------------------------- Submit form -------------------------------------------------- */

.submit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20em; gap: clamp(2em, 5vw, 5em); align-items: start; }
@media (max-width: 1024px) { .submit-grid { grid-template-columns: 1fr; } }
.field { position: relative; display: grid; grid-template-columns: 3.2em 1fr; padding: 2.2em 0 1.8em; border-top: 1px solid var(--line); }
.field:last-of-type { border-bottom: 1px solid var(--line); }
.field .num { font-family: var(--mono); font-size: .8em; color: var(--c-gray); padding-top: .55em; }
.field > div > label, .field .label { display: block; font-size: clamp(1.25em, 1.8vw, 1.75em); margin-bottom: .2em; }
.field .hint { font-size: .88em; color: var(--c-gray); margin-bottom: 1em; }
.field input[type=text], .field textarea { width: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: clamp(1.02em, 1.25vw, 1.2em); color: var(--ink); resize: vertical; padding: 0; }
.field textarea.mono { font-family: var(--mono); font-size: .92em; line-height: 1.65; min-height: 14em; padding: 1em 1.1em; border-radius: 12px; background: var(--bg-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field .line { position: absolute; left: 3.2em; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.field:focus-within .line { transform: scaleX(1); }
.field .counter { display: block; text-align: right; font-size: .75em; color: var(--c-gray); margin-top: .5em; font-family: var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: .5em; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle span { display: inline-flex; align-items: center; height: 2.8em; padding: 0 1.2em; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; transition: var(--anim-fast); user-select: none; font-size: .95em; }
.chip-toggle span:hover { border-color: var(--solid); }
.chip-toggle input:checked + span { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.kind-chips .chip-toggle span { flex-direction: column; align-items: flex-start; justify-content: center; height: auto; padding: .8em 1.2em; border-radius: 14px; text-align: left; }
.kind-chips .chip-toggle small { display: block; font-size: .8em; opacity: .6; margin-top: .15em; }
.submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 1.5em; padding-top: 2.5em; flex-wrap: wrap; }
.submit-bar p { color: var(--c-gray); font-size: .88em; max-width: 30em; }
.form-error { color: #e5484d; font-size: .92em; min-height: 1.3em; }

/* ------------------------- Account + profile -------------------------------------------------- */

.profile-head { display: flex; gap: 1.6em; align-items: center; flex-wrap: wrap; }
.profile-head h1 { font-size: clamp(2.6em, 6vw, 6em); }
.profile-stats { display: flex; gap: 2.5em; flex-wrap: wrap; margin-top: 2em; }
.profile-stats div { min-width: 6em; }
.profile-stats b { display: block; font-size: 2em; font-weight: 450; letter-spacing: -.02em; line-height: 1.1; }
.profile-stats span { font-size: .8em; color: var(--c-gray); }
.profile-bio { margin-top: 1.4em; color: var(--muted); max-width: 36em; }
.tabs { display: flex; gap: .5em; flex-wrap: wrap; margin-bottom: 2em; }
.panel[hidden] { display: none; }
.mini-rows { list-style: none; margin: 0; padding: 0; }
.mini-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1em 1.5em; align-items: center; padding: 1.2em 0; border-top: 1px solid var(--line); }
.mini-rows li:last-child { border-bottom: 1px solid var(--line); }
.mini-rows h4 { font-size: 1.2em; line-height: 1.3; }
.mini-rows h4 a:hover { color: var(--accent-ink); }
.mini-rows p { font-size: .85em; color: var(--c-gray); margin-top: .25em; }
.mini-rows .quote { font-size: .95em; color: var(--ink-2); margin-top: .3em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.mini-rows .side-tools { display: flex; gap: .8em; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.status-pill { display: inline-flex; align-items: center; height: 1.9em; padding: 0 .75em; border-radius: 999px; font-size: .75em; background: var(--bg-mute); }
.status-pill.is-live { background: #E3F7EA; color: #136B34; }
.status-pill.is-held { background: #FFF4D6; color: #7A5600; }
.status-pill.is-removed { background: #FFE4E4; color: #9B1C1C; }
@media (max-width: 700px) { .mini-rows li { grid-template-columns: 1fr; } .mini-rows .side-tools { justify-content: flex-start; } }
.settings { display: grid; gap: 2.5em; max-width: 34em; }
.settings h4 { font-size: 1.4em; margin-bottom: .6em; }
.settings form { display: flex; flex-direction: column; gap: .8em; }
.settings .auth-field textarea { min-height: 6em; padding: .8em 1em; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 1.05em; color: var(--ink); outline: 0; resize: vertical; }
.settings .auth-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.settings .danger-zone { padding: 1.5em; border-radius: var(--radius); border: 1px solid #F3C4C4; }
.settings .danger-zone p { font-size: .92em; color: var(--muted); }
.btn-pill.is-danger { border-color: #e5484d; color: #e5484d; }
.btn-pill.is-danger .btn-fill { background: #e5484d; }
.btn-pill.is-danger:hover { border-color: #e5484d; }
.account-banner { margin-bottom: 2em; padding: 1.1em 1.3em; border-radius: 12px; background: #FFF1E9; color: #7A2A08; }

/* ------------------------- Moderation -------------------------------------------------- */

.mod-item { padding: 1.4em 0; border-top: 1px solid var(--line); }
.mod-item:last-child { border-bottom: 1px solid var(--line); }
.mod-item h4 { font-size: 1.25em; line-height: 1.3; margin: .3em 0; }
.mod-item .excerpt { margin: .6em 0; padding: .8em 1em; border-radius: 10px; background: var(--bg-soft); font-family: var(--mono); font-size: .78em; line-height: 1.6; white-space: pre-wrap; max-height: 12em; overflow: auto; overflow-wrap: anywhere; }
.mod-reports { list-style: none; margin: .6em 0; padding: 0; font-size: .85em; color: var(--muted); }
.mod-reports li { padding: .2em 0; }
.mod-reports b { color: #9B1C1C; font-weight: 550; }
.mod-actions { display: flex; flex-wrap: wrap; gap: .4em; margin-top: .8em; }
.mod-actions .btn-pill { height: 2.5em; padding: 0 1em; font-size: .82em; }
.mod-log { width: 100%; border-collapse: collapse; font-size: .88em; }
.mod-log th { text-align: left; font-weight: 450; color: var(--c-gray); font-size: .8em; text-transform: uppercase; letter-spacing: .06em; padding: .6em .8em .6em 0; }
.mod-log td { padding: .7em .8em .7em 0; border-top: 1px solid var(--line); vertical-align: top; }
.mod-log td a { color: var(--accent-ink); }
.mod-count { display: inline-flex; min-width: 1.6em; height: 1.6em; padding: 0 .45em; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .72em; margin-left: .4em; }
.table-wrap { overflow-x: auto; }

/* ------------------------- Dialogs (report, confirm, prompt) -------------------------------------------------- */

.dialog { position: fixed; inset: 0; z-index: 930; display: flex; align-items: center; justify-content: center; padding: 1.25em; background: rgba(20, 21, 23, .5); }
.dialog[hidden] { display: none; }
.dialog-card { width: min(28em, 100%); max-height: calc(100vh - 2.5em); overflow: auto; background: var(--bg); border-radius: 20px; padding: 2em; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); }
.dialog-card h3 { font-size: 1.7em; margin-bottom: .4em; }
.dialog-card > p { color: var(--muted); margin-bottom: 1.2em; font-size: .95em; }
.dialog-card .radios { display: flex; flex-direction: column; gap: .2em; margin-bottom: 1em; }
.dialog-card .radios label { display: flex; gap: .7em; align-items: center; padding: .55em .8em; border-radius: 10px; cursor: pointer; transition: background .2s; }
.dialog-card .radios label:hover { background: var(--bg-soft); }
.dialog-card .radios input { accent-color: var(--accent); width: 1.05em; height: 1.05em; }
.dialog-card textarea, .dialog-card input[type=text], .dialog-card input[type=number] { width: 100%; padding: .8em 1em; border-radius: 10px; border: 1px solid var(--line); font: inherit; color: var(--ink); outline: 0; resize: vertical; }
.dialog-card textarea:focus, .dialog-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5em; margin-top: 1.4em; flex-wrap: wrap; }
.dialog-actions .btn-pill { height: 3em; padding: 0 1.4em; }

/* ------------------------- Ads -------------------------------------------------- */
/* Every slot is labelled "Advertisement" (AdSense requires ads to be distinguishable from content). Slots never sit
   next to vote, copy or save buttons. House ads fill them until AdSense is live. */

.ad { position: relative; }
.ad-label { font-size: .66em; letter-spacing: .1em; text-transform: uppercase; color: var(--c-gray); }
.ad-box { position: relative; overflow: hidden; }
.ad ins.adsbygoogle { display: block; width: 100%; }

/* in the feed: lines up with the post column, like a post row */
.feed > li.ad-row { border-top: 1px solid var(--line); }
.ad-feed { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); column-gap: 1.4em; row-gap: .55em; padding: 1.5em 0; }
.ad-feed .ad-label, .ad-feed .ad-box { grid-column: 2; }
.ad-feed .ad-box, .ad-leader .ad-box { width: 100%; max-width: 728px; min-height: 90px; border-radius: 12px; }
.ad-leader { display: flex; flex-direction: column; align-items: center; gap: .55em; padding: 2.5em 0; }
@media (max-width: 600px) { .ad-feed { grid-template-columns: 2.6em minmax(0, 1fr); column-gap: 1em; } }

.house { display: flex; align-items: center; justify-content: space-between; gap: 1.2em; width: 100%; color: var(--ink); text-decoration: none; }
.house img { display: block; width: 100%; height: auto; }
.house-copy b { display: block; font-weight: 550; line-height: 1.25; }
.house-copy small { display: block; color: var(--ink-2); font-size: .85em; margin-top: .2em; }
.house-cta { flex: none; display: inline-flex; align-items: center; gap: .5em; height: 2.6em; padding: 0 1.1em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .88em; transition: background .3s var(--ease); }
.house-cta .arrow { width: .75em; height: .75em; }
.house:hover .house-cta { background: var(--accent-2); }
.house-feed, .house-leader { min-height: 90px; padding: 1em 1.2em 1em 1.4em; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; transition: border-color .3s; }
.house-feed:hover, .house-leader:hover { border-color: var(--accent-2); }
.house-feed b, .house-leader b { font-size: 1.1em; }

/* sidebar: 300x600, sticks while the feed scrolls, crossfades between house ads */
.rail-wrap { position: sticky; top: 1.5em; }
.ad-rail { display: flex; flex-direction: column; gap: .55em; }
.ad-rail .ad-box { width: 100%; max-width: 300px; height: 600px; border-radius: 16px; background: var(--panel); }
.house-rail { position: absolute; inset: 0; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 1.8em 1.6em 1.6em; color: var(--on-panel); transition: opacity .6s var(--ease), transform .7s var(--ease-out); }
.house-rail::before { content: ''; position: absolute; right: -30%; top: 26%; width: 120%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); opacity: .9; z-index: 0; }
.house-rail > * { position: relative; z-index: 1; }
.house-rail .house-copy b { font-size: 2.1em; letter-spacing: -.025em; line-height: 1.05; }
.house-rail .house-copy small { color: var(--on-panel-2); font-size: .92em; margin-top: .7em; max-width: 14em; }
.house-rail .house-cta { background: var(--panel); color: var(--on-panel); height: 3em; padding: 0 1.3em; }
.house-rail:hover .house-cta { background: var(--panel-2); }
.house-rail.is-entering { opacity: 0; transform: translateY(14px); }
.house-rail.is-leaving { opacity: 0; }

.browse-grid > .side, .post-grid > .side { position: static; align-self: stretch; }
@media (max-width: 1024px) { .rail-wrap { display: none; } }

/* ------------------------- Cookie consent -------------------------------------------------- */

.consent { position: fixed; right: 16px; bottom: 16px; z-index: 960; width: min(25em, calc(100vw - 32px)); padding: 1.3em 1.3em 1.2em; border-radius: 20px; background: var(--panel); color: var(--on-panel); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .55); font-size: .9em; line-height: 1.5; animation: consent-in .7s var(--ease-out) both; }
@keyframes consent-in { from { opacity: 0; transform: translateY(1.2em); } }
.consent h4 { font-size: 1.25em; margin-bottom: .4em; }
.consent p { color: var(--on-panel-2); margin-bottom: 1em; font-size: 1em; }
.consent a { color: var(--on-panel); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .45em; }
.consent-actions .btn-pill { justify-content: center; height: 3em; padding: 0 1em; font-size: .92em; border-color: var(--panel-line); }
.consent-actions .is-wide { grid-column: 1 / -1; }
.consent-actions .btn-pill .btn-fill { background: var(--accent); }
.consent-actions .btn-pill.is-blue .btn-fill { background: var(--accent-2); }
.consent-opts { display: grid; gap: .6em; margin: 0 0 1em; }
.consent-opt { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; padding: .8em .9em; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.consent-opt b { display: block; font-weight: 550; }
.consent-opt small { display: block; color: var(--on-panel-2); font-size: .85em; margin-top: .15em; }
.toggle { display: inline-flex; align-items: center; cursor: pointer; flex: none; margin-top: .2em; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { position: relative; width: 2.6em; height: 1.5em; border-radius: 999px; background: rgba(255, 255, 255, .2); transition: background .3s var(--ease); }
.toggle-ui::after { content: ''; position: absolute; left: .22em; top: .22em; width: 1.06em; height: 1.06em; border-radius: 50%; background: var(--bg); transition: transform .35s var(--ease); }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(1.1em); }
.toggle input:disabled + .toggle-ui { opacity: .55; }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--bg); outline-offset: 2px; }

/* ------------------------- Misc -------------------------------------------------- */

.footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-disclaim { margin-top: .35em; font-size: .78em; color: var(--on-panel-2); max-width: 22em; }
.footer-top .avatar.mark-ball { width: clamp(4em, 6vw, 6.5em); height: clamp(4em, 6vw, 6.5em); background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1em; }
.footer-top .avatar.mark-ball .mark { width: 42%; height: 42%; color: var(--on-panel); }
.lost-copy { margin-top: 0; }
.lost-copy h5 { margin-bottom: 1.5em; }
.legal-date { color: var(--c-gray); font-size: .9em; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .92em; }
.legal th, .legal td { text-align: left; padding: .6em .8em .6em 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-weight: 550; color: var(--ink); }
.mono-num { font-family: var(--mono); font-size: .8em; color: var(--c-gray); }
.u { border-bottom: 1px solid currentColor; }
.page-header.is-compact { padding-bottom: calc(var(--section) * .3); }
.page-header.is-compact h1 { font-size: clamp(3em, 6vw, 6.4em); }
.btn-pill .btn-text svg, .link-btn svg { width: 1em; height: 1em; flex: none; }
.prompt-block .btn-pill { border-color: var(--panel-line); }
.prompt-block .btn-pill .btn-fill { background: var(--accent); }
.btn-pill.is-saved { border-color: var(--accent); color: var(--accent-ink); }
.seg.tabs { display: inline-flex; max-width: 100%; overflow-x: auto; }

/* ------------------------- Feed pages (home, browse) -------------------------------------------------- */

.feed-page { padding: calc(var(--gap) * 4.2) 0 var(--section); }
.feed-title { font-size: clamp(2.4em, 4.5vw, 4.2em); line-height: 1.05; letter-spacing: -.025em; margin-bottom: .5em; overflow-wrap: anywhere; }
.top-week { margin-bottom: 2.4em; }
.top-week .list-head { padding-bottom: 1em; }
.top-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.top-strip li { background: var(--bg); }
.top-strip a { position: relative; display: flex; flex-direction: column; gap: .5em; height: 100%; min-height: 9.5em; padding: 1.1em 1.2em; overflow: hidden; isolation: isolate; transition: color .4s var(--ease); }
.top-strip a .btn-fill { background: var(--solid); }
.top-strip a:hover { color: var(--on-solid); }
.top-strip a:hover .top-meta, .top-strip a:hover .top-stats { color: var(--on-solid-2); }
.top-strip span:not(.btn-fill) { position: relative; z-index: 2; }
.top-meta { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; color: var(--c-gray); transition: color .4s; }
.top-title { flex: 1; font-size: 1.08em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-stats { font-size: .8em; color: var(--c-gray); transition: color .4s; }
@media (max-width: 900px) { .top-strip { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .top-strip { grid-template-columns: 1fr; } .top-strip a { min-height: 0; } }
.side-create { width: 100%; justify-content: center; }
.side-links { display: flex; gap: 1em; font-size: .82em; color: var(--c-gray); }
.side-links a:hover { color: var(--ink); }
.about-name { font-size: 1.6em; margin-bottom: .3em; }
.side-card .about-count { font-family: var(--mono); font-size: .78em; color: var(--c-gray); margin: 0; }
.feed-toolbar .seg { flex-wrap: wrap; }
.top-week .list-head { align-items: center; }

/* ------------------------- Theme fixes -------------------------------------------------- */

body { background: var(--bg); color: var(--ink); transition: background-color .4s var(--ease), color .4s var(--ease); }
.badge { background: var(--bg-mute); color: var(--ink); backdrop-filter: none; }
.vote-btn .btn-fill { background: var(--bg-mute); }
.avatar { color: #121311; }
.side-sections a:hover, .side-sections a.is-current { color: var(--accent-ink); }
.side-sections a.is-current { font-weight: 550; }
.side-sections a.is-current span:first-child::before { content: ''; display: inline-block; width: .45em; height: .45em; margin-right: .55em; border-radius: 50%; background: var(--accent); vertical-align: .12em; box-shadow: 0 0 0 1px var(--accent-2); }
.field .line, .form-row .line { background: var(--accent-2); }
.composer:focus-within, .auth-field input:focus, .auth-field select:focus, .settings .auth-field textarea:focus, .dialog-card textarea:focus, .dialog-card input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box:focus-within { box-shadow: 0 0 0 1.5px var(--accent-2), 0 30px 60px -30px var(--shadow); }
:focus-visible { outline-color: var(--accent-ink); }
.seg { background: var(--bg-mute); }
.auth-card, .dialog-card { background: var(--bg); color: var(--ink); }
.auth-field input, .auth-field select, .settings .auth-field textarea, .dialog-card textarea, .dialog-card input[type=text], .dialog-card input[type=number], .composer, .lib-search, .select { background-color: var(--bg); color: var(--ink); }
.select, .auth-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238B8E86' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1em center; background-size: auto; }
.lib-search input, .composer textarea, .field input[type=text], .field textarea { color: var(--ink); }
.legal a, .auth-legal a, .auth-agree a, .notes a, .comment-body a, .mod-log td a { color: var(--accent-ink); }
.auth-agree input, .dialog-card .radios input { accent-color: var(--accent-2); }
.post-notice { background: color-mix(in srgb, #FF7A45 16%, var(--bg)); color: var(--ink); }
.post-notice.is-info { background: var(--accent-soft); color: var(--ink); }
.account-banner { background: color-mix(in srgb, #FF7A45 16%, var(--bg)); color: var(--ink); }
.status-pill.is-live { background: var(--accent-soft); color: var(--ink); }
.status-pill.is-held { background: color-mix(in srgb, #F2C230 25%, var(--bg)); color: var(--ink); }
.status-pill.is-removed, .row-meta .badge.is-warn { background: color-mix(in srgb, #E5484D 18%, var(--bg)); color: var(--ink); }
.rm-toast { background: var(--solid); color: var(--on-solid); }
.stars button i { background: var(--ink-faint); }
.stars button.is-lit i { background: var(--star-color); }
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 0%, var(--bg-mute) 50%, var(--bg-soft) 100%); background-size: 200% 100%; }
.mod-reports b { color: #E5484D; }

/* ------------------------- Logo + theme toggle -------------------------------------------------- */

.mark { display: inline-flex; width: 1.55em; height: 1.55em; flex: none; }
.mark svg { width: 100%; height: 100%; display: block; }
.nav-logo .btn-text { gap: .55em; }
.nav-logo .wordmark { font-weight: 700; letter-spacing: -.03em; font-size: 1.15em; }
.nav-logo .copy { display: inline-flex; transition: transform .6s var(--ease-out); }
.nav-logo:hover .copy { transform: rotate(-8deg) scale(1.06); }
.footer-logo .mark { width: clamp(4em, 6vw, 6.5em); height: clamp(4em, 6vw, 6.5em); }
.auth-mark .mark { width: 3.4em; height: 3.4em; }
.theme-toggle svg { width: 1.15em; height: 1.15em; }
.menu-theme { display: inline-flex; align-items: center; gap: .6em; margin-top: 1.5em; padding-left: 0; color: var(--on-panel); }
.nav-links .nav-theme { display: flex; align-items: center; }
@media (max-width: 720px) { .nav-links .nav-theme { display: none; } }
.rail-wrap { top: 8.5em; }
.ad-rail .ad-box { border: 1px solid var(--panel-line); }
.house-rail .house-cta { background: var(--on-panel); color: var(--panel); }
.house-rail:hover .house-cta { background: var(--accent); color: var(--on-accent); }
