/* vib.ee — direction G, "Quiet chart, compact" */
:root {
  --bg: #F5F3EE;
  --ink: #141414;
  --ink-2: #45433E;
  --muted: #5F5C55;
  --line: #DEDAD1;
  --line-2: #D2CEC4;
  --accent: #F04E23;
  --accent-hover: #FF6A3D;
  --link-hover: #B8371A;
  --panel: rgba(236, 233, 225, 0.85);
  --disp: 'Archivo', 'Arial Narrow', sans-serif;
  --body: 'Geist', system-ui, -apple-system, sans-serif;
  --wrap: 1320px;
  --gutter: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
  position: relative; min-height: 100vh; overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--link-hover); }
.prose a, .notice a, .empty a, .muted a, p a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; }
.disp { font-family: var(--disp); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; color: var(--bg); }

/* background: warm mesh at the top, dot grid the full length */
.bg { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; z-index: 0; }
.bg-mesh {
  height: 820px;
  background:
    radial-gradient(42% 62% at 80% 6%, rgba(240,78,35,0.22), rgba(240,78,35,0) 70%),
    radial-gradient(40% 58% at 32% -4%, rgba(246,190,110,0.42), rgba(246,190,110,0) 70%),
    radial-gradient(36% 52% at 58% 46%, rgba(170,192,214,0.38), rgba(170,192,214,0) 70%),
    radial-gradient(30% 40% at 4% 40%, rgba(214,200,232,0.35), rgba(214,200,232,0) 70%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.bg-dots { bottom: 0; background-image: radial-gradient(rgba(20,20,20,0.12) 1px, transparent 1.3px); background-size: 18px 18px; }
.page { position: relative; z-index: 1; }
#main { min-height: calc(100vh - 140px); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 500; font-size: 15px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.g-logo { flex: none; display: block; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.dark:hover { background: #34332F; color: var(--bg); }
.btn.quiet { background: rgba(255,255,255,0.55); border-color: var(--line-2); color: var(--ink); }
.btn.quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn.quiet.white { background: #fff; }
.btn.hot { min-height: 44px; padding: 0 18px; background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.btn.hot:hover { background: var(--accent-hover); color: var(--ink); }
/* Header Submit app: same dark-with-orange-glow look as the home page "Get your app on the chart" banner */
.btn.submit { background: repeating-linear-gradient(-45deg, var(--accent) 0 2px, transparent 2px 6px) right / 14px 100% no-repeat, var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; padding-right: 26px; }
.btn.submit:hover { background: repeating-linear-gradient(-45deg, var(--accent) 0 2px, transparent 2px 6px) right / 14px 100% no-repeat, #2a2926; color: #fff; }
.btn.danger { background: #fff; border-color: #B42318; color: #B42318; }
.btn.danger:hover { background: #B42318; color: #fff; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
.link-btn:hover { color: var(--link-hover); }
.danger-text { color: #B42318; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.7); display: inline-flex; align-items: center; justify-content: center; }
.kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 11px; color: var(--muted); }

/* header */
.site-header { padding-top: 14px; padding-bottom: 14px; display: flex; align-items: center; gap: 28px; }
.logo { font-size: 26px; line-height: 1; font-weight: 800; font-stretch: 112%; letter-spacing: -0.045em; color: var(--ink); }
.logo:hover { color: var(--ink); }
.brand { display: flex; flex-direction: column; gap: 5px; flex: none; }
.site-line { font-size: 13px; line-height: 1.2; color: var(--muted); white-space: nowrap; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.main-nav { display: flex; gap: 24px; font-size: 15px; }
.search { display: flex; align-items: center; gap: 8px; width: 260px; min-height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,0.7); }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; }
.site-header .btn { flex: none; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding-left: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(20,20,20,0.12); z-index: 20; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 0; background: none; text-align: left; width: 100%; font-size: 15px; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg); color: var(--ink); }
.menu-pop form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

/* footer */
.site-footer { padding-top: 8px; padding-bottom: 32px; display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }

/* headings */
.h-small { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.h-mid { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.h-huge { margin: 0 0 0 -3px; font-size: 84px; line-height: 0.82; font-weight: 800; font-stretch: 108%; letter-spacing: -0.05em; }
.count { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.more { font-size: 14px; color: var(--muted); }

/* movement badge */
.mv { display: inline-flex; align-items: center; min-height: 20px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.mv-new { background: var(--accent); border-color: var(--accent); color: #fff; }
.mv-up { background: #E3F4EA; border-color: #9FD3B4; color: #116B3A; }
.mv-down { background: #FDECEA; border-color: #F1B0A8; color: #B42318; }

/* home: hot strip */
.section-hot { padding-top: 16px; padding-bottom: 44px; display: flex; flex-direction: column; gap: 12px; }
.hot-strip { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 16px; }
.hot-strip li { border-top: 1px solid var(--ink); padding-top: 10px; }
.hot-strip a { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; }
.hot-strip .rank { font-size: 40px; line-height: 0.8; font-weight: 700; font-stretch: 62%; letter-spacing: -0.04em; }
.rank.first { color: var(--accent); }
.hs-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 0 1 auto; }
.hs-thumb { margin-left: auto; flex: none; width: 56px; height: 35px; border-radius: 6px; border: 1px solid var(--line-2); object-fit: cover; object-position: top; background: #fff; }
.hs-thumb.ph { --h: 20; display: flex; align-items: center; justify-content: center; background: hsl(var(--h) 45% 90%); color: hsl(var(--h) 45% 30%); font-family: var(--disp); font-weight: 800; font-size: 16px; }
.hs-name { font-size: 15px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hs-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* home: categories */
.section-cats { padding-bottom: 64px; display: flex; flex-direction: column; gap: 18px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--line); }
.cell { padding: 28px 30px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; transition: background .15s; }
.cell:hover { background: rgba(255,255,255,0.6); }
.soon-cell { opacity: 0.4; }
.soon-cell:hover { background: none; }
.cell-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cell-name { font-size: 34px; line-height: 1.02; font-weight: 700; font-stretch: 104%; letter-spacing: -0.03em; }
.subs { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 17px; }
.subs a { color: var(--ink-2); }
/* Homepage "Featured" cell and its phone version */
.feat { display: flex; gap: 16px; align-items: flex-start; color: var(--ink); }
.feat:hover .feat-name { color: var(--link-hover); }
.feat-shot { flex: none; width: 128px; height: 80px; border-radius: 8px; border: 1px solid var(--line-2); object-fit: cover; object-position: top; background: #fff; }
.feat-shot.ph { --h: 20; display: flex; align-items: center; justify-content: center; background: hsl(var(--h) 45% 90%); color: hsl(var(--h) 45% 30%); font-family: var(--disp); font-weight: 800; font-size: 28px; }
.feat-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feat-name { font-size: 18px; font-weight: 600; line-height: 1.2; }
.feat-tag { color: var(--ink-2); font-size: 15px; line-height: 1.4; }
/* Featured stands apart: dark panel with an orange striped band, like the Submit button. */
.featured-cell { background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, transparent 3px 11px) top / 100% 18px no-repeat, var(--ink); border-color: var(--ink); color: #fff; padding-top: 44px; }
.featured-cell:hover { background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, transparent 3px 11px) top / 100% 18px no-repeat, #22211e; }
.featured-cell .cell-name { color: #fff; }
.featured-cell .feat { color: #fff; }
.featured-cell .feat-name { color: #fff; font-size: 20px; }
.featured-cell .feat:hover .feat-name { color: #FFB199; }
.featured-cell .feat-tag { color: #D3CFC6; }
.featured-cell .feat-shot { width: 160px; height: 100px; border-color: rgba(255,255,255,0.18); }
.admin-feature { display: flex; align-items: center; gap: 10px; margin: 0; }
.subs a:hover { color: var(--link-hover); }
.subnav { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255,255,255,0.6); font-size: 15px; }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.all { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.subnav .pill { min-height: 36px; font-size: 14px; }

/* home: CTA */
.section-cta { padding-bottom: 48px; }
.cta { color: var(--bg); border-radius: 16px; padding: 24px 28px 24px 48px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, transparent 3px 11px) left / 18px 100% no-repeat, var(--ink); }
.cta h2 { margin: 0; flex: 1 1 420px; font-size: 32px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.cta-sub { color: #D3CFC6; font-size: 15px; }

/* list pages */
.list-page { max-width: 1120px; padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; }
.crumbs-head { display: flex; flex-direction: column; gap: 6px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.title-left { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; min-width: 0; }
.title-left .h-huge { overflow-wrap: anywhere; }
.tabs { display: flex; gap: 28px; }
.tab { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: -6px; }

/* Sponsored slot: dark panel with the striped band, like the Featured cell. */
.sponsored { display: flex; align-items: center; gap: 20px; margin-top: 6px; padding: 30px 24px 22px; border-radius: 14px; color: #fff; background: repeating-linear-gradient(-45deg, var(--accent) 0 3px, transparent 3px 11px) top / 100% 10px no-repeat, var(--ink); }
.sp-shot { flex: none; display: block; width: 160px; height: 100px; }
.sp-shot img, .sp-shot .ph { display: flex; width: 100%; height: 100%; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); object-fit: cover; object-position: top; background: #fff; }
.sp-shot .ph { --h: 20; align-items: center; justify-content: center; background: hsl(var(--h) 45% 90%); color: hsl(var(--h) 45% 30%); font-family: var(--disp); font-weight: 800; font-size: 32px; }
.sponsored .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-tag { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sp-name { font-size: 22px; font-weight: 600; color: #fff; }
.sp-name:hover { color: #FFB199; }
.sponsored .tagline { color: #D3CFC6; }

.rows { margin: 6px 0 0; padding: 0; list-style: none; }
.row { display: flex; align-items: center; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.row:hover { background: rgba(255,255,255,0.5); }
.row .rank { width: 52px; flex: none; text-align: right; font-size: 58px; line-height: 0.8; font-weight: 700; font-stretch: 62%; letter-spacing: -0.04em; font-family: var(--disp); }
.mvcol { width: 48px; flex: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.title a { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.tagline { color: var(--ink-2); }
.meta { color: var(--muted); font-size: 13px; }
.mv-inline { display: none; }
.acts { display: flex; align-items: center; gap: 8px; }
.row-thumb { flex: none; display: block; width: 96px; height: 60px; }
.row-thumb img, .row-thumb .ph { display: flex; width: 100%; height: 100%; border-radius: 8px; border: 1px solid var(--line-2); object-fit: cover; object-position: top; background: #fff; }
.row-thumb .ph { --h: 20; align-items: center; justify-content: center; background: hsl(var(--h) 45% 90%); color: hsl(var(--h) 45% 30%); font-family: var(--disp); font-weight: 800; font-size: 22px; }
.row.unranked { padding-left: 20px; }

.vote { width: 68px; min-height: 56px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vote:hover { border-color: var(--ink); }
.vote.on { background: var(--accent); border-color: var(--accent); }
.vote.busy, .save.busy { opacity: 0.7; }
.save { width: 44px; height: 44px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.save:hover { color: var(--ink); border-color: var(--line-2); }
.save.on { color: var(--ink); }
.save.on path { fill: currentColor; }

.vote.big { flex-direction: row; width: auto; min-height: 48px; padding: 0 18px; gap: 8px; font-size: 16px; }
.vote.big .lbl { font-weight: 500; }
.vote.disabled { cursor: default; background: rgba(255,255,255,0.6); }
.vote.disabled:hover { border-color: var(--line-2); }
.save.big { width: auto; height: 48px; padding: 0 16px; border-color: var(--line-2); background: rgba(255,255,255,0.6); color: var(--ink); font-weight: 500; }
.save.big.on { background: #fff; border-color: var(--ink); }

.pager { display: flex; justify-content: space-between; gap: 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border-bottom: 1px solid var(--line); }

/* search page */
.search-big { display: flex; gap: 8px; }
.search-big input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255,255,255,0.8); font-size: 18px; }
.search-big input:focus { outline: none; border-color: var(--ink); }
.search-big .btn { min-height: 52px; padding: 0 22px; }
.popular-tags a { margin-right: 10px; }

/* app page */
.app-page { max-width: 1120px; padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 22px; }
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.app-info { display: flex; flex-direction: column; gap: 18px; }
.app-name { font-size: 72px; overflow-wrap: anywhere; }
.app-tagline { margin: 0; font-size: 20px; line-height: 1.4; color: var(--ink-2); }
.app-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.app-actions .visit { min-height: 48px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; }
.placeholder { --h: 20; overflow: hidden; background: hsl(var(--h) 45% 92%); display: flex; flex-direction: column; }
.ph-bar { height: 26px; display: flex; gap: 6px; align-items: center; padding: 0 12px; background: hsl(var(--h) 30% 86%); }
.ph-bar i { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 20% 70%); }
.ph-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 8% 10%; }
.ph-body span { font-size: clamp(18px, 4vw, 40px); font-weight: 800; letter-spacing: -0.04em; color: hsl(var(--h) 45% 25%); line-height: 1; }
.ph-body b { display: block; height: 10px; border-radius: 5px; background: hsl(var(--h) 35% 80%); width: 70%; }
.ph-body b.short { width: 40%; }
.app-desc { max-width: 68ch; font-size: 17px; }
.app-desc p { margin: 0 0 12px; }
.app-tags { display: flex; flex-direction: column; gap: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,0.7); border: 1px solid var(--line-2); font-size: 13px; }
.tag:hover { border-color: var(--ink); color: var(--ink); }
.embed { border-top: 1px solid var(--line); padding-top: 14px; }
.embed summary { cursor: pointer; color: var(--muted); min-height: 32px; }
.embed-body { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; padding-top: 12px; }
.embed-body .field { flex: 1 1 320px; }

.notice { padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line-2); }
.notice.warn { background: #FFF4E5; border-color: #F3C98B; }

/* forms */
.form-page, .prose-page { max-width: 760px; padding-top: 28px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.form-page .h-huge, .prose-page .h-huge { font-size: 64px; }
.lead { margin: 0; font-size: 18px; color: var(--ink-2); }
.form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span:first-child, .field legend { font-weight: 500; font-size: 15px; padding: 0; margin-bottom: 6px; }
.field input:not([type=radio]):not([type=checkbox]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,0.85); font-size: 16px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field input[type=file] { min-height: 44px; padding: 8px 0; }
.field [aria-invalid=true] { border-color: #B42318 !important; }
.hint { font-size: 13px; color: var(--muted); }
.error { font-size: 14px; color: #B42318; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.review-choice { gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255,255,255,0.6); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); background: #fff; }
.choice.off { opacity: 0.6; cursor: not-allowed; }
.choice input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--ink); }
.choice > span { display: flex; flex-direction: column; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; min-height: 44px; padding-top: 10px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-actions .btn.submit { min-height: 44px; padding-left: 18px; }
.inline { display: inline; margin-left: 10px; }
.settings-block { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.settings-block p { margin: 0; }
.danger-zone { padding: 18px; border: 1px solid #F1B5AE; border-radius: 14px; background: rgba(255,255,255,0.6); margin-top: 8px; }
.danger-zone h3 { margin: 0; font-size: 17px; }
.my-apps, .plain-list { margin: 0; padding: 0; list-style: none; }
.my-apps li, .plain-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.my-apps .link-btn { margin-left: 10px; }
.status { font-weight: 500; }
.s-approved { color: #1E7A3C; }
.s-rejected { color: #B42318; }
.dev-login { display: flex; gap: 10px; flex-wrap: wrap; }

/* prose */
.prose { font-size: 17px; max-width: 64ch; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose h2 { font-size: 26px; letter-spacing: -0.025em; margin: 28px 0 10px; }

/* bookmarks */
.bm-page { max-width: 1120px; padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; }
.bm-filter { display: flex; gap: 8px; margin-bottom: 8px; }
.bm-filter input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,0.8); }
.bm-filter select { min-height: 40px; }
.bm-list { margin: 0; padding: 0; list-style: none; }
.bm { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; align-items: flex-start; }
.bm-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bm-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.bm-name { font-weight: 600; font-size: 17px; }
.bm-tagline { color: var(--ink-2); font-size: 15px; }
.bm-note { margin: 0; font-size: 15px; padding-left: 10px; border-left: 2px solid var(--line-2); color: var(--ink-2); white-space: pre-wrap; }
.bm-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.bm-meta .tag { min-height: 24px; color: #1D45B0; }
.private { font-weight: 600; color: var(--ink); }
.bm-side { display: flex; flex-direction: column; gap: 12px; }
.tag-cloud { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.tag-cloud a { color: #1D45B0; }
.tag-cloud a.on { font-weight: 700; color: var(--ink); }

/* admin */
.admin-page { max-width: 1120px; padding-top: 28px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 32px; }
.admin-page section { display: flex; flex-direction: column; gap: 12px; }
.cat-intro { margin: 10px 0 0; max-width: 760px; color: var(--ink-2); font-size: 18px; line-height: 1.45; }
.tool-index { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 0 32px; }
.tool-index li { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.tool-index a { font-size: 20px; font-weight: 600; }
.archive { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 24px; font-size: 15px; color: var(--muted); }
.archive a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.sp-example { margin: 8px 0 28px; display: flex; flex-direction: column; gap: 8px; }
.sp-example img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--ink); padding: 8px 12px 8px 0; white-space: nowrap; }
.data-table td { border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; vertical-align: top; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td a { font-weight: 600; }
.data-table .mv { margin-left: 8px; }
.admin-page .facts { gap: 6px 20px; margin: 0; padding-top: 0; border-top: 0; font-size: 16px; }
.queue { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; margin: 0; }
.bulk-bar .check { padding-top: 0; min-height: 40px; align-items: center; margin-right: 8px; }
.q-check { width: 20px; height: 20px; accent-color: var(--ink); margin: 4px 0 0; }
.q-item:has(.q-check) { grid-template-columns: 24px 260px 1fr; }
.q-item { display: grid; grid-template-columns: 260px 1fr; gap: 20px; padding: 16px; background: rgba(255,255,255,0.7); border: 1px solid var(--line-2); border-radius: 14px; }
.q-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.q-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; }
.q-desc { margin: 0; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; }
.q-actions { display: flex; gap: 8px; margin-top: 6px; }
.q-actions form { margin: 0; }
.q-actions { flex-wrap: wrap; align-items: center; }
.approve-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.go-live { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.go-live input { min-height: 44px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; }
.go-live input:focus { outline: none; border-color: var(--ink); }
.sched-item { grid-template-columns: 1fr; }
.sponsor-list { margin: 0; padding: 0; list-style: none; }
.sponsor-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sponsor-list li.focus { background: rgba(255,255,255,0.7); padding-left: 12px; padding-right: 12px; border-radius: 12px; }
.sponsor-list form { margin: 0; }

/* dialogs */
.dialog { border: 0; border-radius: 18px; padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--bg); color: var(--ink); box-shadow: 0 24px 64px rgba(20,20,20,0.25); }
.dialog::backdrop { background: rgba(20,20,20,0.4); }
.dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dialog h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; line-height: 1.05; }
.dialog p { margin: 0; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.dialog .field input, .dialog .field textarea { background: #fff; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.tag-suggest button { min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; cursor: pointer; }
.tag-suggest button:hover { border-color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* responsive helpers */
.mobile-only, .mobile-only-block { display: none !important; }

@media (max-width: 1080px) {
  .main-nav { display: none; }
  .search { width: 200px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .desktop-only, .desktop-only-grid { display: none !important; }
  .mobile-only { display: inline-flex !important; }
  .mobile-only-block { display: block !important; }
  .site-header { gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  /* Phones: the line sits on its own row under the logo and buttons, so it stays on one line
     and the top row keeps its old layout. */
  .site-header { position: relative; padding-bottom: 32px; }
  .site-header .brand { display: contents; }
  .site-header .logo { flex: 1; font-size: 24px; }
  .site-line { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 10px; font-size: 13px; }
  .site-header .grow { display: none; }
  .site-header .btn.dark { min-height: 44px; }
  .menu summary { min-height: 44px; padding: 0 8px; }

  .section-hot { padding-top: 4px; padding-bottom: 28px; gap: 2px; padding-left: 0; padding-right: 0; }
  .section-hot .section-head { padding: 0 16px; align-items: center; }
  .section-hot .more { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; }
  .hot-strip { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
  .hot-strip li { flex: none; width: 200px; padding-top: 8px; }
  .hot-strip .rank { font-size: 36px; }
  .section-cats { padding-bottom: 32px; gap: 10px; }
  .cell { padding: 20px 16px 22px; gap: 10px; }
  .cell-name { font-size: 28px; }
  .subs { gap: 0 18px; }
  .subs a { padding: 7px 0; } /* taller tap targets */
  .feat-shot, .featured-cell .feat-shot { width: 128px; height: 80px; }
  .h-mid { font-size: 22px; }
  .cta { flex-direction: column; align-items: stretch; gap: 10px; padding: 22px 18px 22px 42px; }
  .featured-cell { padding-top: 36px; }
  .cta h2 { flex: none; font-size: 28px; }

  .list-page, .app-page, .bm-page, .admin-page { padding-top: 18px; }
  .h-huge { font-size: 52px; line-height: 0.84; font-stretch: 104%; margin-left: -2px; }
  .form-page .h-huge, .prose-page .h-huge { font-size: 48px; }
  .title-row { border-bottom: 0; flex-direction: column; align-items: stretch; gap: 14px; }
  .title-left { justify-content: space-between; padding-bottom: 0; }
  .title-left .count { font-size: 14px; white-space: nowrap; }
  .tabs { gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 11px; background: rgba(255,255,255,0.6); }
  .tab { flex: 1; justify-content: center; padding: 0 4px; border: 0; border-radius: 8px; font-size: 14px; }
  .tab.on { background: var(--ink); color: var(--bg); }
  .filters { margin-top: 0; }

  .sponsored { flex-wrap: wrap; margin: 10px 0 0; padding: 24px 16px 16px; gap: 12px; }
  .sp-shot { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .sponsored .btn { width: 100%; min-height: 44px; }

  .rows { margin: 0; }
  .row { align-items: flex-start; gap: 12px; padding: 16px 0; }
  .row:hover { background: none; }
  .row .rank { width: 34px; font-size: 50px; }
  /* Phones: the thumbnail goes under the name and tagline, so the text keeps its full width. */
  .row:has(.row-thumb) { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "rank main acts" "rank thumb acts"; column-gap: 12px; row-gap: 10px; }
  .row:has(.row-thumb) .rank { grid-area: rank; }
  .row:has(.row-thumb) .main { grid-area: main; }
  .row:has(.row-thumb) .acts { grid-area: acts; align-self: start; }
  .row-thumb { grid-area: thumb; width: 112px; height: 70px; }
  .mvcol { display: none; }
  .mv-inline { display: inline-flex; }
  .title a { font-size: 17px; line-height: 1.25; }
  .tagline { font-size: 15px; line-height: 1.4; }
  .acts { flex-direction: column; gap: 6px; }
  .vote { width: 60px; }
  .save { width: 60px; height: 44px; border-color: var(--line-2); background: rgba(255,255,255,0.6); }
  .save.on { border-color: var(--ink); background: #fff; }
  .pager .btn { flex: 1; min-height: 48px; }

  .app-grid { grid-template-columns: 1fr; gap: 24px; }
  .app-name { font-size: 52px; }
  .app-tagline { font-size: 18px; }
  .app-actions > * { flex: 1 1 auto; }
  .bm-layout { grid-template-columns: 1fr; gap: 24px; }
  .bm-side { order: -1; }
  .tag-cloud { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .q-item { grid-template-columns: 1fr; }
  .search-big .btn { display: none; }
  .site-footer { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
