/* The site's small pages: login, choose your agent, my videos, privacy. A white sheet with a bold outline, dead centre on
   the landing page's yellow graph paper, in the landing page's type. Fonts are served from here: these pages load nothing
   from outside. */
@font-face { font-family: Geist; src: url(/fonts/geist-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist-mono-latin.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  --yellow: #FDFB89; --ink: #131209; --paper: #FFFFFF; --tint: #F6F6EE;
  --muted: rgba(19, 18, 9, .72); --line: rgba(19, 18, 9, .14); --bad: #B4400E;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* a panel's own display: grid must never undo hidden */
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative; isolation: isolate; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; margin: 0;
  padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px));
  background: var(--yellow); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
body::before {  /* the graph paper: strongest behind the sheet, fading towards the edges */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(19, 18, 9, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(19, 18, 9, .09) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 40%, transparent 100%);
}

h1, h2, p, ul, ol { margin: 0; }
h1 { font-size: clamp(1.875rem, 5vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
ul, ol { padding-left: 1.25rem; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
code { padding: .1em .4em; border-radius: 6px; background: var(--tint); font: 500 .9em var(--mono); overflow-wrap: anywhere; }
.muted { color: var(--muted); }

/* the sheet */
.card {
  display: grid; gap: 20px; width: 100%; max-width: 460px; min-width: 0; padding: 36px 32px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink);
}
.centered { justify-items: center; text-align: center; }
.wide { max-width: 680px; padding: 40px; }
.logo { display: block; flex: none; }
.logo img { display: block; width: 48px; height: 48px; border-radius: 50%; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.problem { color: var(--bad); font-weight: 600; }

/* buttons: ink with yellow text, as on the landing page */
button { padding: 11px 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--yellow); font: 600 15px/1.3 var(--sans); cursor: pointer; }
button:hover { background: #2E2D1C; }
button:active { transform: scale(.98); }
button.plain { padding: 9px 18px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
button.plain:hover { background: var(--yellow); }

/* login */
#google { display: flex; justify-content: center; width: 100%; min-height: 44px; }

/* choose your agent */
.choices { display: grid; gap: 10px; width: 100%; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 18px;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 16px; text-align: left;
}
.choice:hover { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.choice:active { box-shadow: none; transform: none; }

/* privacy */
.reading { display: grid; gap: 10px; }
.reading + .reading { padding-top: 20px; border-top: 1px solid var(--line); }

/* my videos: a whole page under the landing page's header, not a sheet in the middle */
body.app { display: block; padding: 124px max(16px, env(safe-area-inset-right, 0px)) 72px max(16px, env(safe-area-inset-left, 0px)); }

/* the landing page's header: a floating glass pill */
.bar { position: fixed; inset: 16px 0 auto; z-index: 50; display: flex; justify-content: center; pointer-events: none; }
.pill {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(1152px, calc(100% - 32px));
  min-height: 64px; padding: 8px; pointer-events: auto; border: 2px solid var(--ink); border-radius: 16px; background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); box-shadow: 4px 4px 0 var(--ink);
}
.pill .logo img { width: 44px; height: 44px; }
.links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.links a { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-size: .875rem; line-height: 1.25rem; font-weight: 600; text-decoration: none; transition: background-color .3s, color .3s; white-space: nowrap; }
.links a:hover, .links a[aria-current] { background: var(--yellow); color: var(--ink); }
.links a[aria-current] { box-shadow: inset 0 0 0 2px var(--ink); }

.page { display: grid; gap: 32px; width: min(1152px, 100%); margin: 0 auto; }
.intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }
.intro h1 { font-size: clamp(2.5rem, 7vw, 3.75rem); }
.intro p { max-width: 56ch; margin-top: 10px; }
#status:not([hidden]) { padding: 12px 16px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px 24px; }
.video, .empty { background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); }
.video { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 10px 10px 16px; }
.video h2 { margin: 10px 6px 0; overflow-wrap: anywhere; }
.video .meta { margin: 0 6px; color: var(--muted); font-size: 14px; }
.video .where { margin: 8px 6px 0; padding: 6px 10px; border-radius: 8px; background: var(--tint); color: var(--muted); font: 500 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
/* a card's picture: the landing page's graph paper, in ink, with Play in the middle */
.video .frame {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; padding: 0; border-radius: 12px;
  background-color: var(--ink); background-size: 24px 24px;
  background-image: linear-gradient(rgba(253, 251, 137, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(253, 251, 137, .13) 1px, transparent 1px);
}
.video .frame:hover { background-color: #26250F; }
.play { display: grid; place-items: center; width: 64px; height: 64px; padding-left: 5px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 22px; box-shadow: 0 0 0 8px rgba(253, 251, 137, .16); transition: transform .2s; }
.video .frame:hover .play { transform: scale(1.08); }
.length { position: absolute; right: 10px; bottom: 10px; padding: 1px 8px; border-radius: 6px; background: var(--paper); color: var(--ink); font: 500 12px/1.6 var(--mono); }
.empty { display: grid; gap: 10px; justify-items: start; max-width: 560px; padding: 28px 32px; }
.empty a { font-weight: 600; }

/* the player: the browser's own dialog, over the page */
.watch { width: min(1100px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 0; border: 2px solid var(--ink); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.watch::backdrop { background: rgba(19, 18, 9, .62); }
.watch-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 12px 0; }
.player { display: grid; gap: 4px; padding: 12px 20px 20px; }
.player video { display: block; width: 100%; max-height: calc(100vh - 200px); aspect-ratio: 16 / 9; border-radius: 12px; background: var(--ink); }
.player h2 { margin-top: 10px; font-size: 1.25rem; overflow-wrap: anywhere; }
.player .meta { color: var(--muted); font-size: 14px; }
button.plain.small { padding: 6px 14px; font-size: 14px; }

@media (max-width: 900px) {
  .links { display: none; }  /* ponytail: no menu button here; the logo goes back to the landing page and its sections */
}

@media (max-width: 480px) {
  body { padding-top: 24px; padding-bottom: 24px; }
  .card, .wide { padding: 28px 22px; border-radius: 18px; }
}
