/* Skimming · design tokens and shared components
   Bold condensed headlines (Anton), calm body text (DM Sans), mono for timestamps.
   One deliberate light look: off-white paper, plum and forest grounds, five highlight colors. */
:root {
  --paper: #FAFAF6;
  --paper-2: #F3F3EE;
  --white: #FFFFFF;
  --ink: #121212;
  --ink-2: #2A2B2E;
  --muted: #45464A;
  --faint: #77786F;
  --line: #E2E2DA;
  --track: #E6E6DE;
  --plum: #3B0F1F;
  --plum-text: #D9B9C3;
  --forest: #163F2C;
  --forest-text: #DCE8E0;
  --lime: #D7F35B;
  --mustard: #F6C445;
  --pink: #F0A6CC;
  --mint: #7ED6A0;
  --lavender: #B9A6F5;
  --danger: #A1262E;
  --cta: #1E5A3C;
  --cta-hover: #174A31;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: var(--plum); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.dots { background-image: radial-gradient(rgba(0,0,0,.10) 1.3px, transparent 1.7px); background-size: 9px 9px; }
.dots-light { background-image: radial-gradient(rgba(255,255,255,.09) 1.3px, transparent 1.7px); background-size: 9px 9px; }

/* type */
.display { font-family: var(--display); font-weight: 400; letter-spacing: .005em; line-height: 1.04; margin: 0; text-wrap: balance; }
.h1 { font-size: clamp(48px, 7vw, 96px); }
.h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; }
.h3 { font-size: 22px; line-height: 1.15; }
.eyebrow { font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.lead { font-size: 19px; line-height: 1.55; }

/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 20px 0; margin-bottom: 8px;
  /* stays on top while scrolling; the shadow paints the bar edge to edge without widening the page */
  position: sticky; top: 0; z-index: 40; background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax -1px -100vmax); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 0 0 100vmax var(--paper), 0 1px 0 100vmax var(--line); }
.hdr-skim { flex: 1 1 280px; max-width: 480px; display: flex; gap: 6px; min-width: 0; }
.hdr-skim input { flex: 1; min-width: 0; height: 38px; border: 2px solid var(--ink); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; background: var(--white); color: var(--ink); }
.hdr-skim .btn { height: 38px; }
.show-sm { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { font-family: var(--display); font-size: 26px; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav a { font-size: 14px; font-weight: 600; text-decoration: none; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--pink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; text-decoration: none; color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; background: var(--lime); color: var(--ink); border-radius: 999px; padding: 6px 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn:hover { color: var(--ink); background: var(--paper-2); }
.btn-dark { background: var(--cta); border-color: var(--cta); color: var(--paper); }
.btn-dark:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--paper); }
.btn-forest { background: var(--cta); border-color: var(--cta); color: var(--paper); font-family: var(--body); font-weight: 700; font-size: 17px; height: 56px; padding: 0 26px; border-radius: 14px; }
.btn-forest:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--paper); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; border-width: 1.5px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.on { background: var(--cta); border-color: var(--cta); color: var(--paper); }

/* inputs */
.input { height: 52px; width: 100%; min-width: 0; border: 2px solid var(--ink); border-radius: 14px; padding: 0 16px; font: inherit; font-size: 16px; background: var(--white); color: var(--ink); }
textarea.input { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--forest); }

/* cards */
.card { background: var(--white); border: 2px solid var(--ink); border-radius: 20px; overflow: hidden; }
.tile { border-radius: 24px; padding: clamp(24px, 4vw, 48px); min-width: 0; }
.notice { border-radius: 14px; padding: 12px 16px; font-size: 15px; background: var(--paper-2); border: 1.5px solid var(--line); }
.notice.error { background: #FBEDEE; border-color: #E9B8BC; color: var(--danger); }

/* video cards (library, account) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.vcard { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.vcard:hover { color: inherit; }
.vcard .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--track); overflow: hidden; }
.vcard .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard .tag { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 600; background: var(--paper); border-radius: 999px; padding: 3px 10px; }
.vcard .len { position: absolute; right: 10px; bottom: 10px; font-family: var(--mono); font-size: 11px; background: rgba(18,18,18,.86); color: var(--paper); border-radius: 6px; padding: 3px 7px; }
.strip { display: flex; gap: 3px; height: 8px; }
.strip span { display: block; }
.vcard .body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.vcard .title { font-family: var(--display); font-size: 21px; line-height: 1.15; }

/* tabs and chips */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { height: 40px; padding: 0 14px; border-radius: 12px; border: 2px solid transparent; background: transparent; color: var(--ink); font-family: var(--display); font-size: 17px; letter-spacing: .02em; }
.tab[aria-selected="true"] { background: var(--cta); color: var(--paper); border-color: var(--cta); }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 2px solid rgba(250,250,246,.45); background: transparent; color: var(--paper); }
.chip[aria-pressed="true"] { background: var(--lime); color: var(--forest); border-color: var(--lime); }

/* tables (admin) */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; }
table.data th { font-size: 12px; letter-spacing: .06em; color: var(--muted); font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }

/* footer */
.site-footer { border-top: 2px solid var(--ink); margin-top: 64px; padding: 24px 0 40px; display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }

/* legal pages */
.legal { max-width: 760px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 40px 0 10px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }

@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .show-sm { display: inline !important; }
  .site-header { padding: 14px 0; margin-bottom: 24px; gap: 12px; }
  .brand span { font-size: 22px; }
  .hdr-skim { order: 3; flex: 1 1 100%; max-width: none; }
  .hdr-skim input { font-size: 16px; } /* 16px stops iOS from zooming in */
  .tile { border-radius: 20px; }
  .lead { font-size: 17px; }
  .input { font-size: 16px; }
  .btn-forest { height: 52px; font-size: 18px; }
  .site-footer { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.caps { text-transform: uppercase; }

/* share sheet */
.share-sheet { border: 0; border-radius: 20px; padding: 20px; width: min(420px, calc(100% - 32px)); background: var(--white); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.share-sheet::backdrop { background: rgba(18,18,18,.45); }
.share-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.share-title { font-family: var(--display); font-size: 24px; line-height: 1.1; }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-opt { width: 100%; height: 44px; padding: 0 8px; font-size: 14px; }
.share-link { display: flex; align-items: center; gap: 8px; margin-top: 14px; border: 2px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px; }
.share-link .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
@media (max-width: 420px) { .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* feedback */
.link-plain { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fb-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fb-kinds label { display: block; }
.fb-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.fb-kinds span { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 10px; border: 2px solid #C9CAC2; font-size: 14px; font-weight: 600; cursor: pointer; }
.fb-kinds input:checked + span { background: var(--cta); border-color: var(--cta); color: var(--paper); }
.fb-kinds input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* watch page: paste bar ends where the video ends */
@media (min-width: 901px) {
  body[data-page="watch"] .site-header { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 340px); column-gap: 32px; }
  body[data-page="watch"] .hdr-skim { justify-self: end; width: 100%; max-width: 560px; }
  body[data-page="watch"] .site-header .nav { justify-self: end; }
}
