/* arinjilley? site styles: dark grey, Luma-inspired, from the approved mock-up (SPEC §9). */

/* ───────────── Fonts (self-hosted) ───────────── */
@font-face {
  font-family: "General Sans";
  src: url(/fonts/GeneralSans-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url(/fonts/GeneralSans-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url(/fonts/GeneralSans-700.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url(/fonts/GeneralSans-500.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sentient";
  src: url(/fonts/Sentient-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sentient";
  src: url(/fonts/Sentient-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/JetBrainsMono-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/JetBrainsMono-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ───────────── Tokens ───────────── */
:root {
  --bg: #161618;
  --surface: #1e1e21;
  --raised: #26262a;
  --hover: #222226;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --t1: #f2f2f3;
  --t2: #a3a3ab;
  --t3: #6f6f78;
  --open: #3dd68c;
  --last: #f5a524;
  --closed: #8a8a93;
  --accent: #c8f560;
  --font-ui: "General Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Sentient", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --top-h: 60px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--t1);
  font: 500 15px / 1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html.lock,
html.lock body {
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.i {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.125em;
}
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition:
    background 0.15s,
    filter 0.15s,
    border-color 0.15s;
}
.btn .i {
  font-size: 17px;
}
.btn-primary {
  background: var(--accent);
  color: #111;
}
.btn-primary:hover {
  filter: brightness(1.07);
}
.btn-ghost {
  background: var(--raised);
  color: var(--t1);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: #2e2e33;
  border-color: var(--border-strong);
}
.btn-ghost[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--raised);
  color: var(--t2);
  font-size: 17px;
  transition:
    color 0.15s,
    background 0.15s;
}
.icon-btn:hover {
  color: var(--t1);
  background: #2e2e33;
}
.icon-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ───────────── Top bar ───────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.scrolled {
  border-bottom-color: var(--border);
}
.top-in {
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo .q {
  color: var(--accent);
}
.nav {
  display: flex;
  gap: 2px;
}
.nav a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--t2);
  font-weight: 500;
  font-size: 14px;
  transition:
    color 0.15s,
    background 0.15s;
}
.nav a:hover {
  color: var(--t1);
}
.nav a[aria-current="page"] {
  color: var(--t1);
  background: var(--raised);
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.clock {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--t2);
  font-size: 13px;
}
.flaps {
  display: flex;
  gap: 2px;
  perspective: 200px;
}
.flap {
  display: inline-block;
  min-width: 0.62em;
  text-align: center;
  background: var(--raised);
  border-radius: 3px;
  padding: 1px 2px;
  color: var(--t1);
  transform-origin: 50% 50%;
}
.flap.colon {
  background: none;
  min-width: auto;
  padding: 0;
  color: var(--t3);
}
.flap.flip {
  animation: flip 0.38s cubic-bezier(0.3, 0.7, 0.3, 1);
}
@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  45% {
    transform: rotateX(-88deg);
    opacity: 0.4;
  }
  55% {
    transform: rotateX(88deg);
    opacity: 0.4;
  }
  100% {
    transform: rotateX(0);
  }
}
@media (max-width: 720px) {
  .nav,
  .clock .tz {
    display: none;
  }
  .top-in {
    gap: 12px;
  }
  .top .btn .lbl-long {
    display: none;
  }
}

/* ───────────── Hero ───────────── */
.hero {
  position: relative;
  padding: 76px 0 64px;
}
.hero-text {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--t3);
}
.hero h1 {
  font-size: clamp(42px, 6.2vw, 70px);
  line-height: 1.02;
  margin: 18px 0 20px;
}
.hero h1 .acc {
  color: var(--accent);
}
.hero p {
  color: var(--t2);
  font-size: 17px;
  line-height: 1.55;
  max-width: 470px;
  margin: 0 auto 30px;
}
.hero-cta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  margin-top: 30px;
  font-size: 11.5px;
  color: var(--t3);
  letter-spacing: 0.1em;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats b {
  color: var(--t1);
  font-weight: 500;
}
.float {
  position: absolute;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.float:hover {
  transform: rotate(0deg) scale(1.04) !important;
  z-index: 3;
}
.hero-fan {
  display: none;
  position: relative;
  height: 168px;
  margin: 0 auto 28px;
  width: 280px;
}
.hero-fan .fp {
  position: absolute;
  top: 10px;
  width: 104px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow:
    0 20px 40px -14px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.07);
}
.float img,
.fp img,
.soon-thumb img,
.card-thumb img,
.pp img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
@media (max-width: 1180px) {
  .float.outer {
    display: none;
  }
}
@media (max-width: 980px) {
  .float {
    display: none;
  }
  .hero-fan {
    display: block;
  }
  .hero {
    padding: 28px 0 48px;
  }
}

/* ───────────── Closing soon ───────────── */
.board {
  max-width: 880px;
  margin: 0 auto;
}
.sec-label {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--t3);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.sec-label .live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--last);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--last) 22%, transparent);
}
.soon {
  margin: 0 auto 44px;
  max-width: 880px;
}
.soon:empty {
  display: none;
}
.soon-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.soon-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.soon-tile:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}
.soon-thumb {
  width: 38px;
  flex: none;
  border-radius: 5px;
  overflow: hidden;
}
.soon-txt {
  min-width: 0;
}
.soon-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.soon-cd {
  font-size: 11.5px;
  color: var(--t2);
  letter-spacing: 0.02em;
}
.soon-cd.last {
  color: var(--last);
}
@media (max-width: 860px) {
  .soon-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -20px;
    padding: 0 20px 4px;
    scrollbar-width: none;
  }
  .soon-row::-webkit-scrollbar {
    display: none;
  }
  .soon-tile {
    flex: 0 0 232px;
    scroll-snap-align: start;
  }
}

/* ───────────── Board header: tabs, search, filter sentence ───────────── */
.bar {
  padding: 6px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.bar-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}
.tabs {
  display: flex;
  align-items: baseline;
  gap: 22px;
}
.tab {
  font-size: 30px;
  line-height: 1.1;
  color: var(--t3);
  transition: color 0.15s;
}
.tab:hover {
  color: var(--t2);
}
.tab[aria-selected="true"] {
  color: var(--t1);
}
.tab sup {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--t3);
  margin-left: 3px;
  vertical-align: 14px;
}
.find {
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.find-btn {
  width: 40px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--t2);
  font-size: 19px;
  border-radius: 9px;
  flex: none;
  transition: color 0.15s;
}
.find-btn:hover {
  color: var(--t1);
}
.find input {
  all: unset;
  width: 0;
  font-size: 15px;
  color: var(--t1);
  transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.find input::placeholder {
  color: var(--t3);
}
.find input::-webkit-search-cancel-button {
  display: none;
}
.find-x {
  display: none;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--t3);
  font-size: 15px;
  flex: none;
}
.find-x:hover {
  color: var(--t1);
}
.find.open {
  background: var(--surface);
  border-color: var(--border);
}
.find.open input {
  width: 240px;
}
.find.open .find-x {
  display: grid;
}
.find.open .find-btn {
  pointer-events: none;
}
.sentence {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 2;
  color: var(--t2);
  text-wrap: pretty;
}
.tok {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--t1);
  font-weight: 500;
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.22);
  line-height: 1.3;
  padding: 0 1px;
  transition:
    border-color 0.15s,
    color 0.15s;
}
.tok .i {
  font-size: 12px;
  color: var(--t3);
  transition: transform 0.15s;
}
.tok:hover {
  border-bottom-color: rgba(255, 255, 255, 0.55);
}
.tok.set {
  color: var(--accent);
  border-bottom-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.tok.set .i {
  color: var(--accent);
}
.tok[aria-expanded="true"] .i {
  transform: rotate(180deg);
}
.reset {
  margin-left: 10px;
  font-size: 13px;
  color: var(--t3);
  border-bottom: 1px solid transparent;
  vertical-align: 1px;
}
.reset:hover {
  color: var(--t1);
  border-bottom-color: var(--t3);
}
.menu {
  position: fixed;
  z-index: 70;
  min-width: 230px;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  background: var(--raised);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  display: none;
}
.menu.on {
  display: block;
  animation: pop 0.14s ease-out;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.menu-h {
  display: none;
}
.opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--t1);
  text-align: left;
}
.opt:hover,
.opt:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.opt .ck {
  font-size: 15px;
  color: var(--accent);
  visibility: hidden;
}
.opt[aria-selected="true"] .ck {
  visibility: visible;
}
.opt .n {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--t3);
}
.opt:disabled {
  opacity: 0.35;
  pointer-events: none;
}
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 69;
  background: rgba(8, 8, 10, 0.55);
  display: none;
}
@media (max-width: 720px) {
  .tab {
    font-size: 26px;
  }
  .tabs {
    gap: 16px;
  }
  .find.open {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    background: var(--surface);
  }
  .find.open input {
    width: 100%;
    flex: 1;
  }
  .sentence {
    font-size: 16px;
  }
  .menu {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    max-height: 75vh;
    border-radius: 18px 18px 0 0;
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
    animation: none;
  }
  .menu.on ~ .menu-scrim {
    display: block;
  }
  .menu-h {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--t3);
    padding: 6px 10px 8px;
  }
  .opt {
    padding: 13px 10px;
    font-size: 16px;
  }
}

/* ───────────── Timeline ───────────── */
.day {
  display: grid;
  grid-template-columns: 118px 30px minmax(0, 1fr);
}
.day-date {
  padding-top: 15px;
}
.dd {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
}
.dw {
  color: var(--t3);
  font-size: 14px;
}
.day-rail {
  position: relative;
}
.day-rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 1px dashed rgba(255, 255, 255, 0.13);
}
.day:first-child .day-rail::before {
  top: 24px;
}
.day:last-child .day-rail::before {
  bottom: auto;
  height: 24px;
}
.day:only-child .day-rail::before {
  display: none;
}
.day-rail .dot {
  position: absolute;
  left: 50%;
  top: 21px;
  width: 7px;
  height: 7px;
  margin-left: -3px;
  border-radius: 50%;
  background: #55555c;
}
.day.is-today .dot {
  background: var(--last);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--last) 22%, transparent);
}
.day.is-today .dd {
  color: var(--last);
}
.day-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 30px;
  min-width: 0;
}
.card {
  display: flex;
  gap: 18px;
  padding: 16px 16px 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.card:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}
.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  min-width: 0;
}
.card-time {
  font-size: 11.5px;
  color: var(--t3);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-time.last {
  color: var(--last);
}
.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 0 0 8px;
}
.meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--t2);
  font-size: 14px;
  min-width: 0;
  line-height: 1.6;
}
.meta span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.meta .i {
  color: var(--t3);
  font-size: 15px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--t1);
  white-space: nowrap;
}
.fact .i {
  font-size: 15px;
  color: var(--t3);
}
.card-thumb {
  width: 100px;
  flex: none;
  align-self: flex-start;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}
.archived .card-thumb {
  filter: grayscale(0.7);
  opacity: 0.75;
}
.archived .card-title {
  color: var(--t2);
}
.pill {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 3px 7px;
  border-radius: 5px;
  line-height: 1.2;
}
.pill.open {
  color: var(--open);
  background: color-mix(in srgb, var(--open) 13%, transparent);
}
.pill.last {
  color: var(--last);
  background: color-mix(in srgb, var(--last) 14%, transparent);
}
.pill.closed,
.pill.departed {
  color: var(--closed);
  background: rgba(255, 255, 255, 0.06);
}
.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--t2);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
}
.empty b {
  display: block;
  color: var(--t1);
  font-size: 17px;
  margin-bottom: 4px;
}
.empty .btn {
  margin-top: 16px;
}
@media (max-width: 720px) {
  .day {
    grid-template-columns: minmax(0, 1fr);
  }
  .day-rail {
    display: none;
  }
  .day-date {
    display: flex;
    gap: 8px;
    align-items: baseline;
    padding: 4px 0 10px;
  }
  .day-cards {
    padding-bottom: 24px;
  }
  .card {
    padding: 14px;
    gap: 14px;
  }
  .card-thumb {
    width: 78px;
  }
  .card-title {
    font-size: 16.5px;
    margin-bottom: 6px;
  }
  .meta {
    font-size: 13.5px;
  }
  .facts {
    gap: 6px 14px;
  }
  .fact {
    font-size: 13px;
  }
}

/* ───────────── Detail (side panel + page) ───────────── */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8, 8, 10, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.scrim.on {
  opacity: 1;
  pointer-events: auto;
}
.panel {
  position: fixed;
  z-index: 50;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(540px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  transform: translateX(28px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.18s,
    visibility 0s linear 0.24s;
}
.panel.on {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.18s;
}
.pbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.pbar .sp {
  flex: 1;
}
.pbar .x-m {
  display: none;
}
.pscroll {
  flex: 1;
  overflow-y: auto;
  /* Never scroll sideways, even if some text is too long. */
  overflow-x: hidden;
  padding: 28px 28px 36px;
  overscroll-behavior: contain;
}
.pp {
  max-width: 300px;
  margin: 0 auto 28px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 26px 60px -24px rgba(0, 0, 0, 0.85),
    0 0 0 1px var(--border);
}
.d-title {
  font-size: 34px;
  line-height: 1.08;
  margin: 0 0 10px;
}
.d-by {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--t2);
  margin-bottom: 24px;
  font-size: 15px;
}
.d-by .av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--raised);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--t2);
}
.rows {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
  margin-bottom: 24px;
}
.grid2:empty {
  display: none;
}
.row {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.grid2 .row {
  align-items: flex-start;
}
.row > div:last-child {
  min-width: 0;
}
.ibox {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--t2);
  font-size: 20px;
}
.cal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: center;
}
.cal .mo {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.07);
  color: var(--t2);
  padding: 2px 0 1px;
}
.cal .da {
  flex: 1;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--t1);
}
.row b {
  display: block;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}
.row .sub {
  display: block;
  color: var(--t2);
  font-size: 13.5px;
  line-height: 1.4;
}
.cta {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 6px;
}
.cta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.cd-pill {
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--t2);
  white-space: nowrap;
}
.cd-pill b {
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.cd-pill.last b {
  color: var(--last);
}
.cta h3 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cta p {
  margin: 0 0 16px;
  color: var(--t2);
  font-size: 14px;
}
.cta-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.cta-actions .btn-primary {
  grid-column: 1 / -1;
  height: 44px;
}
.cta-actions .btn-sm {
  padding: 0 10px;
}
.psec h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--t3);
  margin: 28px 0 10px;
}
.psec p {
  margin: 0;
  color: #d6d6db;
  line-height: 1.6;
}
.how {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  counter-reset: s;
}
.how li {
  display: flex;
  gap: 12px;
  color: #d6d6db;
  line-height: 1.55;
}
.how li::before {
  counter-increment: s;
  content: counter(s, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 3px;
  flex: none;
}
/* Themes wrap onto new lines; the dot sits at the end of a line, never at the start of the next one. */
.tags {
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  color: #d6d6db;
  line-height: 1.7;
  min-width: 0;
}
.tags span {
  overflow-wrap: anywhere;
}
.tags span:not(:last-child)::after {
  content: "·";
  color: var(--t3);
  margin: 0 9px;
}
.src {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--t3);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.src .i {
  font-size: 15px;
  margin-top: 1px;
}
.src a {
  text-decoration: underline;
}
.pfoot {
  display: none;
}
@media (max-width: 1023px) {
  .scrim {
    display: none;
  }
  .panel {
    inset: 0;
    width: auto;
    border: 0;
    border-radius: 0;
    transform: translateY(18px);
  }
  .pbar .x-d {
    display: none;
  }
  .pbar .x-m {
    display: grid;
  }
  .pscroll {
    padding: 22px 18px 28px;
  }
  .pfoot {
    display: block;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .pfoot .btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
  }
  .panel .cta-actions .btn-primary {
    display: none;
  }
  .d-title {
    font-size: 30px;
  }
  .pp {
    max-width: 280px;
  }
}
@media (max-width: 440px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  .pbar .reg-d {
    display: none;
  }
}

/* full detail page (direct visits to /h/slug) */
.page-detail {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 120px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--t2);
  font-size: 14px;
  margin-bottom: 24px;
}
.back:hover {
  color: var(--t1);
}
.page-cta {
  display: none;
}
@media (max-width: 1023px) {
  .page-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
  }
  .page-cta .btn {
    width: 100%;
    height: 48px;
    font-size: 15px;
  }
  .page-detail .cta-actions .btn-primary {
    display: none;
  }
}

/* ───────────── About / 404 ───────────── */
.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}
.prose h1 {
  font-size: clamp(40px, 6vw, 58px);
  line-height: 1.04;
  margin: 14px 0 24px;
}
.prose h1 .acc {
  color: var(--accent);
}
.prose h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 10px;
  letter-spacing: -0.01em;
}
.prose p,
.prose li {
  color: #d6d6db;
  font-size: 16.5px;
  line-height: 1.7;
}
.prose ul {
  padding-left: 20px;
}
.prose a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nf {
  max-width: 560px;
  margin: 0 auto;
  padding: 96px 20px;
  text-align: center;
}
.nf .code {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--last);
}
.nf h1 {
  font-size: clamp(38px, 6vw, 56px);
  margin: 16px 0 14px;
}
.nf p {
  color: var(--t2);
  margin: 0 0 28px;
}

/* ───────────── Footer, toast ───────────── */
.foot {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0 48px;
  color: var(--t3);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot .logo {
  font-size: 19px;
  color: var(--t1);
}
.foot p {
  margin: 8px 0 0;
  max-width: 360px;
  line-height: 1.55;
}
.foot nav {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.foot nav a:hover {
  color: var(--t1);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translate(-50%, 20px);
  opacity: 0;
  background: var(--t1);
  color: #121214;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 10px;
  transition: all 0.2s;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ───────────── Install app (PWA) ───────────── */
.install-btn {
  font: inherit;
  letter-spacing: inherit;
  color: var(--accent);
}
.install-btn:hover {
  text-decoration: underline;
}
.link-btn {
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* "Get the app" card (client/pwa.ts) */
.install-card {
  position: fixed;
  z-index: 60;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--raised);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.25s;
}
.install-card.on {
  transform: none;
  opacity: 1;
}
.install-card img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex: none;
}
.ic-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ic-text b {
  font-size: 15px;
  font-weight: 600;
}
.ic-text span {
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.45;
}
.ic-text .ios-share {
  font-size: 16px;
  vertical-align: -3px;
  color: var(--t1);
}
.ic-actions {
  display: flex;
  gap: 8px;
  flex: none;
}
@media (min-width: 721px) {
  .install-card {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 420px;
  }
}
@media (max-width: 480px) {
  .install-card {
    flex-wrap: wrap;
  }
  .ic-text {
    flex-basis: calc(100% - 58px);
  }
  .ic-actions {
    width: 100%;
  }
  .ic-actions .btn {
    flex: 1;
    height: 40px;
  }
}

/* Long words or links in the detail view wrap instead of pushing the layout sideways. */
.pscroll,
.page-detail {
  overflow-wrap: anywhere;
}
.page-detail {
  overflow-x: hidden;
}
.row > div:last-child,
.psec,
.cta,
.d-by {
  min-width: 0;
}

/* Logo: split-flap mark + wordmark */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.logo-mark {
  width: auto;
  height: 1.25em;
  flex: none;
  display: block;
}
.foot .logo .logo-mark {
  height: 1.15em;
}
