/* typeshit.news
   One stylesheet. The <html> element carries the design choice:
     feed-stack | feed-flow     how the feed scrolls (Stack: posts pop in like messages and fold into a deck under
                                the nav; Flow: a plain, fast timeline)
     cards-stroke | cards-glass how a post looks (Stroke: black with a white hairline frame, condensed caps, serif body;
                                Glass: frosted, rounded, system type, over an ambient wash of the post you're on)
   Both are switched live by the picker and saved per browser (app.js). */

:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f7;
  --fg2: #d2d2d7;
  --fg3: #8e8e93;
  --fg4: #636366;
  --line: rgba(255, 255, 255, .86);
  --hair: rgba(255, 255, 255, .14);
  --hair2: rgba(255, 255, 255, .08);
  --red: #ff3b30;
  --gn-h: 52px;
  --peek: 26px;
  --stack-top: calc(var(--gn-h) + var(--peek));
  --gutter: 22px;
  --col: 600px;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mark: var(--display);  /* the logo and the brand word: the same face as the page titles */
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --spring: cubic-bezier(.2, .95, .3, 1.12);
  --glass-bg: rgba(28, 28, 30, .62);
  --glass-line: rgba(255, 255, 255, .16);
  --glass-blur: blur(22px) saturate(180%);
  /* the content area; the white and gray pages below swap these, the header never does */
  --fg-body: #e8e8ed;
  --card-bg: #000;
  --media-bg: #111;
  --ava-bg: #2c2c2e;
  --btn-bg: #fff;
  --btn-fg: #000;
  --btn-hover: #d2d2d7;
  --glass-card: rgba(255, 255, 255, .065);
  --glass-card-stack: rgba(38, 38, 40, .74);
  --glass-sum: #a1a1a6;
  --glass-btn: rgba(255, 255, 255, .12);
  --glass-btn-hover: rgba(255, 255, 255, .2);
  --glass-btn-line: rgba(255, 255, 255, .16);
  --glass-fg: #fff;
  --glass-hi: rgba(255, 255, 255, .18);
  --rim: linear-gradient(150deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1) 28%, rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, .22));
  --card-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  --stack-shadow: 0 -14px 34px rgba(0, 0, 0, .55);
  --shade-color: #000;
  --ambient-filter: var(--ambient-filter);
  --ambient-on: .9;
  --sheet-bg: #000;
  --sheet-glass: rgba(28, 28, 30, .82);
  --grab: rgba(255, 255, 255, .35);
  --seg-bg: rgba(118, 118, 128, .24);
  --seg-on: #636366;
  --seg-on-fg: #fff;
}

/* Page: white (Uncrate's own look: black header, white page, black hairline frames) and Apple's soft gray */
:root.bg-white, :root.bg-gray {
  color-scheme: light;
  --bg: #fff;
  --fg: #1d1d1f;
  --fg2: #424245;
  --fg3: #6e6e73;
  --fg4: #86868b;
  --fg-body: #1d1d1f;
  --line: #1d1d1f;
  --hair: rgba(0, 0, 0, .1);
  --hair2: rgba(0, 0, 0, .06);
  --card-bg: #fff;
  --media-bg: #ececef;
  --ava-bg: #e8e8ed;
  --btn-bg: #1d1d1f;
  --btn-fg: #fff;
  --btn-hover: #424245;
  --glass-card: rgba(255, 255, 255, .62);
  --glass-card-stack: rgba(255, 255, 255, .8);
  --glass-sum: #6e6e73;
  --glass-btn: rgba(0, 0, 0, .05);
  --glass-btn-hover: rgba(0, 0, 0, .09);
  --glass-btn-line: rgba(0, 0, 0, .08);
  --glass-bg: rgba(255, 255, 255, .72);
  --glass-line: rgba(0, 0, 0, .08);
  --glass-fg: #1d1d1f;
  --glass-hi: rgba(255, 255, 255, .7);
  --rim: linear-gradient(150deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .5) 30%, rgba(0, 0, 0, .05) 62%, rgba(255, 255, 255, .7));
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .07);
  --stack-shadow: 0 -8px 28px rgba(0, 0, 0, .1);
  --shade-color: #fff;
  --ambient-filter: blur(80px) saturate(1.5) brightness(1.15);
  --ambient-on: .38;
  --sheet-bg: #fff;
  --sheet-glass: rgba(250, 250, 252, .86);
  --grab: rgba(0, 0, 0, .2);
  --seg-bg: rgba(118, 118, 128, .12);
  --seg-on: #fff;
  --seg-on-fg: #1d1d1f;
}
:root.bg-gray { --bg: #f5f5f7; --shade-color: #f5f5f7; --media-bg: #e8e8ed; --glass-card: rgba(255, 255, 255, .78); }
/* the header stays exactly as it is on every page color */
.gn {
  color-scheme: dark; color: #f5f5f7;
  --fg: #f5f5f7; --fg2: #d2d2d7; --fg3: #8e8e93; --fg4: #636366; --fg-body: #e8e8ed;
  --line: rgba(255, 255, 255, .86); --hair: rgba(255, 255, 255, .14); --media-bg: #1c1c1e;
  --glass-bg: rgba(28, 28, 30, .62); --glass-line: rgba(255, 255, 255, .16);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--gn-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
svg { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid #2997ff; outline-offset: 2px; }
.ts-word { font-family: var(--mark); font-weight: 700; letter-spacing: -.035em; }

@view-transition { navigation: auto; }
::view-transition-group(hero) { animation-duration: .46s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

/* ---------- the nav: logo, an Apple-style search bar in the middle, Follow. Sticky, so the search is always there ---------- */
.gn { position: sticky; top: 0; z-index: 40; height: var(--gn-h); background: rgba(18, 18, 19, .82); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.gn-bar { max-width: 1024px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr minmax(0, 440px) 1fr; align-items: center; gap: 16px; }
.gn-logo { justify-self: start; font: 700 23px/1 var(--mark); letter-spacing: -.035em; color: #fff; }
.gn-follow { justify-self: end; position: relative; }
.follow { font-size: 13px; font-weight: 500; padding: 6px 15px; border-radius: 980px; background: #fff; color: #000; transition: background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.follow:hover { background: #e8e8ed; }
.follow[aria-pressed="true"] { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }

/* the search bar: an iOS/macOS field with "______ typeshit" inside it */
.gn-search { position: relative; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; background: rgba(118, 118, 128, .24); cursor: text; transition: background .2s, box-shadow .2s; }
.gn-search:hover { background: rgba(118, 118, 128, .3); }
.gn-search.open { background: rgba(118, 118, 128, .34); box-shadow: 0 0 0 3.5px rgba(10, 132, 255, .45); }
.gn-search > svg { width: 15px; height: 15px; flex: none; fill: none; stroke: rgba(235, 235, 245, .6); stroke-width: 2.2; stroke-linecap: round; }
.ts-field { position: relative; display: flex; align-items: baseline; min-width: 0; flex: 1; overflow: hidden; cursor: text; font: 600 15px/1.2 var(--ui); letter-spacing: -.01em; white-space: nowrap; }
.ts-field input { font: inherit; letter-spacing: inherit; color: #fff; background: none; border: 0; outline: 0; padding: 0; margin: 0; min-width: 1ch; max-width: 100%; caret-color: #0a84ff; -webkit-appearance: none; appearance: none; border-radius: 0; }
/* the word is the bold white part, typed or suggested; "typeshit" after it stays gray */
.ts-field input::placeholder { color: rgba(255, 255, 255, .78); opacity: 1; }
.ts-field input::-webkit-search-cancel-button, .ts-field input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.ts-field .ts-mirror { position: absolute; visibility: hidden; white-space: pre; font: inherit; letter-spacing: inherit; }
.ts-field .ts-word { margin-left: .3em; color: rgba(235, 235, 245, .55); white-space: nowrap; }

/* what drops down under it: a panel, not a menu */
.gn-results { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); max-height: min(72vh, 600px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 16px; padding: 14px 16px 12px; border-radius: 16px; background: rgba(30, 30, 32, .95); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 70px rgba(0, 0, 0, .55); cursor: default; animation: panel .28s var(--ease); }
@keyframes panel { from { opacity: 0; transform: translate(-50%, -6px) scale(.985); } }
.gn-results h3 { margin: 0 0 4px; font: 600 12px/1 var(--ui); color: #8e8e93; }
.ts-row { display: flex; align-items: center; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; color: #e8e8ed; font-size: 14px; font-weight: 500; }
.ts-row:hover, .ts-row.sel { background: rgba(255, 255, 255, .08); color: #fff; }
.ts-row img, .ts-row .thumb { width: 52px; height: 30px; object-fit: cover; border-radius: 5px; flex: none; background: #2c2c2e; }
.ts-row .ar { margin-left: auto; color: #8e8e93; font-weight: 400; font-size: 13px; }
.ts-row .ar-l { color: #8e8e93; }
.ts-row small { display: block; font-weight: 400; color: #8e8e93; font-size: 12px; margin-top: 2px; }
.ts-community { font: 700 17px/1.2 var(--display); }
.ts-none { color: #8e8e93; font-size: 14px; margin: 0; }

/* Follow on pages that aren't one category: pick which */
.follow-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 250px; padding: 14px; border-radius: 16px; color: #f5f5f7; background: rgba(30, 30, 32, .95); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 70px rgba(0, 0, 0, .55); animation: drop-in .25s var(--ease); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }
.follow-menu p { margin: 0 0 10px; font-size: 12px; color: #8e8e93; }
.follow-menu .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.follow-menu .pill[aria-pressed="true"] { background: #fff; color: #000; }

.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }

/* the category pill on every post: "fitness typeshit" */
.pill { position: relative; z-index: 2; display: inline-flex; align-items: baseline; gap: .28em; padding: 5px 11px 6px; border-radius: 980px; font: 700 12px/1 var(--ui); letter-spacing: 0; text-transform: none; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; transition: background .2s, color .2s; }
.pill:hover { background: var(--fg); color: var(--bg); }
/* small "<word> typeshit" labels (pills, search bar, search rows): the word is the bold part, "typeshit" steps back */
.pill .ts-word, .ts-row .ts-word, .ts-field .ts-word { font-family: inherit; font-weight: 400; letter-spacing: inherit; }
.pill .ts-word, .ts-row .ts-word { opacity: .6; }
.cards-glass .pill { box-shadow: inset 0 0 0 1px var(--glass-btn-line); background: var(--glass-btn); }
.cards-glass .pill:hover { background: var(--glass-btn-hover); color: var(--fg); }
.kicker .topic { font: 700 11px/1 var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--fg3); }

/* ---------- page header (the community's name, big) ---------- */
.hero { max-width: 1024px; margin: 0 auto; padding: 44px var(--gutter) 22px; }
.hero h1 { margin: 0; font: 700 clamp(40px, 7vw, 72px)/1 var(--display); letter-spacing: -.035em; }
.hero h1 .ts-word { font-size: 1em; }
.hero p { margin: 12px 0 0; color: var(--fg3); font-size: 17px; max-width: 600px; }
.hero .stats { margin-top: 14px; font-size: 13px; color: var(--fg3); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .stats b { color: var(--fg); font-weight: 600; }
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #30d158; margin-right: 6px; box-shadow: 0 0 0 0 rgba(48, 209, 88, .6); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); } }

/* a community's name, in the feed column so it lines up with the cards */
/* no space above: the tallest letters ("f", "h") start about .16em below the line box, so pull that up and they sit
   right on the nav's bottom line */
.layout.layout-top { padding-top: 0; }
.feed-title { margin: calc(clamp(18px, 3vw, 28px) - .15em) 0 24px;  /* tallest letters sit 18-28px under the nav */
  font: 700 clamp(30px, 4.6vw, 44px)/1 var(--display); letter-spacing: -.03em; }
.feed-title .ts-word { font-size: 1em; }

.tiles { max-width: 1024px; margin: 0 auto; padding: 0 var(--gutter) 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tile { position: relative; display: block; border: 1px solid var(--line); padding: 18px; min-height: 172px; overflow: hidden; }
.tile .imgs { display: flex; gap: 6px; margin-bottom: 14px; }
.tile .imgs img { width: 33.333%; aspect-ratio: 1; object-fit: cover; }
.tile h2 { margin: 0; font: 600 24px/1 var(--display); letter-spacing: -.02em; }
.tile p { margin: 8px 0 0; color: var(--fg3); font-size: 13px; }
.tile.soon { border-style: dashed; border-color: var(--hair); color: var(--fg3); display: grid; place-content: center; text-align: center; }
.cards-glass .tile { border-radius: 24px; border-color: var(--glass-line); background: var(--glass-card); box-shadow: var(--card-shadow); }
.cards-glass .tile .imgs img { border-radius: 10px; }

/* ---------- layout ---------- */
.layout { max-width: 1024px; margin: 0 auto; padding: 18px var(--gutter) 120px; display: grid; grid-template-columns: minmax(0, var(--col)); justify-content: center; gap: 48px; }
.layout.solo { grid-template-columns: minmax(0, 680px); justify-content: center; }
.feed-col { min-width: 0; position: relative; }
/* ---------- feed ---------- */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.feed-end { display: grid; place-items: center; height: 120px; color: var(--fg4); font-size: 13px; }
.feed-end .spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hair); border-top-color: var(--fg); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 60px 0; text-align: center; color: var(--fg3); }
/* the blue pill CTA (a keeper: use it for any primary call to action). Never put a count in it. */
.btn-blue { display: inline-flex; width: max-content; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 980px; color: #fff; background: rgba(41, 151, 255, .9); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.btn-blue:hover { background: rgb(41, 151, 255); }

.post { position: relative; }
.card { position: relative; display: grid; isolation: isolate; }
.card-link { position: absolute; inset: 0; z-index: 1; }
.card-media { position: relative; overflow: hidden; background: var(--media-bg); }
.card-media > img { width: 100%; height: 100%; object-fit: cover; }
/* posters (movies): the whole poster, sharp at about its own size, over a blurred, darkened copy of itself */
.card-media.is-poster::before, .story-media.is-poster::before { content: ""; position: absolute; inset: -40px; background: var(--poster) center / cover no-repeat; filter: blur(30px) brightness(.45) saturate(1.2); }
.card-media.is-poster > img, .story-media.is-poster > img { position: relative; object-fit: contain; }
.badge { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 5px; font: 600 11px/1 var(--ui); padding: 5px 7px; color: #fff; background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 4px; font-variant-numeric: tabular-nums; }
.badge svg { width: 7px; height: 8px; fill: #fff; }
.strip { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 4px; }
.strip img { width: 46px; height: 46px; object-fit: cover; border: 1px solid rgba(255, 255, 255, .8); background: var(--media-bg); }
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kicker kicker" "hl hl" "sum sum" "by acts"; align-items: center; }
.kicker { grid-area: kicker; }
.hl { grid-area: hl; margin: 0; overflow-wrap: anywhere; }
.sum { grid-area: sum; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.byline { grid-area: by; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--fg3); }
.src { display: flex; align-items: center; gap: 7px; min-width: 0; }
.src b { font-weight: 600; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ava { width: 20px; height: 20px; border-radius: 50%; flex: none; object-fit: cover; background: var(--ava-bg); display: grid; place-items: center; font: normal 700 9px/1 var(--ui); color: var(--fg); }
.byline time::before { content: "\00b7"; margin-right: 8px; }
.acts { grid-area: acts; display: flex; align-items: center; gap: 2px; position: relative; z-index: 2; }
.act { width: 34px; height: 34px; display: grid; place-items: center; color: var(--fg3); border-radius: 50%; transition: color .15s, transform .15s; }
.act:hover { color: var(--fg); }
.act:active { transform: scale(.88); }
.act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.act[aria-pressed="true"] { color: var(--fg); }
.act[aria-pressed="true"] svg { fill: currentColor; }
.cta { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; position: relative; z-index: 2; }
.cta svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .cta { margin-left: 8px; }
.post:active .card { transform: scale(.992); }
.card { transition: transform .2s var(--ease); }

/* ===== Stroke cards (the Uncrate frame: black, white hairline, condensed caps, serif) ===== */
.cards-stroke .card { background: var(--card-bg); border: 1px solid var(--line); }
.cards-stroke .card-media { aspect-ratio: 2 / 1; border-bottom: 1px solid var(--line); }
.cards-stroke .card-body { padding: 16px 20px 12px; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cards-stroke .kicker { justify-content: center; margin-bottom: 12px; }
.cards-stroke .hl { text-align: center; font: 700 29px/.98 var(--cond); text-transform: uppercase; letter-spacing: .004em; text-wrap: balance; }
.cards-stroke .sum { margin-top: 10px; font: 16px/1.6 var(--serif); color: var(--fg2); text-wrap: pretty; }
.cards-stroke .byline { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); }
.cards-stroke .acts { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); }
.cards-stroke .byline, .cards-stroke .acts { align-self: stretch; }
.cards-stroke .card .cta { font: 700 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--btn-fg); background: var(--btn-bg); padding: 10px 12px; }
.cards-stroke .card .cta:hover { background: var(--btn-hover); }
.cards-stroke .strip img { border-radius: 0; }

/* ===== Glass cards (Apple: frosted, rounded, rim-lit, system type) ===== */
.cards-glass .card { background: var(--glass-card); border-radius: 26px; padding: 8px; box-shadow: var(--card-shadow); }
.cards-glass .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.cards-glass .card-media { aspect-ratio: 16 / 9; border-radius: 19px; }
.cards-glass .card-body { padding: 12px 10px 4px; grid-template-areas: "by by" "hl hl" "sum sum" "kicker acts"; }
.cards-glass .byline { margin-bottom: 8px; }
.cards-glass .kicker { margin-top: 8px; }
.cards-glass .kicker .topic { letter-spacing: .02em; text-transform: none; font-weight: 500; font-size: 12px; }
.cards-glass .hl { font: 600 19px/1.24 var(--display); letter-spacing: -.016em; text-wrap: pretty; }
.cards-glass .sum { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--glass-sum); }
.cards-glass .acts { margin-top: 6px; justify-self: end; }
.cards-glass .card .cta { font-size: 12px; font-weight: 600; padding: 8px 13px; border-radius: 980px; color: var(--fg); background: var(--glass-btn); box-shadow: inset 0 0 0 1px var(--glass-btn-line), inset 0 1px 0 var(--glass-hi); }
.cards-glass .card .cta:hover { background: var(--glass-btn-hover); }
.cards-glass .badge { border-radius: 980px; padding: 5px 9px; }
.cards-glass .strip img { border-radius: 9px; border-color: rgba(255, 255, 255, .5); }
.cards-glass .feed { gap: 14px; }

/* the ambient wash behind glass: the post you're looking at, blurred big */
.ambient { position: fixed; inset: -10%; z-index: -1; pointer-events: none; display: none; }
.ambient img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(1.7) brightness(.5); opacity: 0; transition: opacity 1.2s ease; transform: translateZ(0); }
.ambient img.on { opacity: var(--ambient-on); }
.cards-glass .ambient { display: block; }
.cards-glass body { background: transparent; }
.cards-glass .gn { background: rgba(30, 30, 32, .55); }


/* ---------- Flow: a plain, quick timeline ---------- */
.feed-flow #feed > .post { content-visibility: auto; contain-intrinsic-size: auto 520px; }

/* ---------- Stack: posts arrive like messages, then fold into a deck under the nav ---------- */
.feed-stack #feed { gap: 18px; }
.feed-stack #feed > .post { position: sticky; top: var(--stack-top); transform-origin: 50% 0; }
.feed-stack #feed > .post .card { box-shadow: var(--stack-shadow); }
.feed-stack #feed > .post .card::after { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: var(--shade-color); opacity: var(--shade, 0); pointer-events: none; }
.feed-stack #feed > .post.deep .card-link { cursor: n-resize; }
.feed-stack.cards-glass #feed > .post .card { background: var(--glass-card-stack); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); }
/* before app.js runs the first posts wait to be dealt in (and show anyway after 3s if it never does) */
.js:not(.app).feed-stack #feed > .post { opacity: 0; animation: reveal 0s 3s forwards; }
@keyframes reveal { to { opacity: 1; } }
.app.feed-stack #feed > .post:not(.in) { opacity: 0; }
.feed-stack #feed > .post.in { animation: arrive .62s var(--spring) both; animation-delay: var(--d, 0ms); }
/* once landed, drop the animation: an element mid-opacity-animation stops the glass above it from blurring what's beneath */
.feed-stack #feed > .post.in.landed { animation: none; }
@keyframes arrive { from { opacity: 0; translate: 0 46px; scale: .94; } 60% { opacity: 1; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* ---------- story (the sheet, and the story page) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); opacity: 0; transition: opacity .4s; }
.sheet.open .sheet-scrim { opacity: 1; }
.sheet-scrim { cursor: pointer; }
.sheet-panel { position: absolute; left: 50%; top: 28px; bottom: 0; width: min(760px, 100%); transform: translate(-50%, 104%); transition: transform .5s var(--ease); background: var(--sheet-bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); }
.sheet.open .sheet-panel { transform: translate(-50%, 0); }
.sheet.dragging .sheet-panel, .sheet.instant .sheet-panel, .sheet.instant .sheet-scrim { transition: none; }
.sheet-panel { transform-origin: 50% 80%; }
.sheet.thrown .sheet-panel { transition: transform .38s cubic-bezier(.2, .7, .3, 1); }
.sheet.thrown .sheet-scrim { transition: opacity .3s; }
.sheet-panel { view-transition-name: sheet-panel; }
::view-transition-new(sheet-panel):only-child { animation: sheet-in .5s var(--ease) both; }
::view-transition-old(sheet-panel):only-child { animation: sheet-out .38s var(--ease) both; }
@keyframes sheet-in { from { transform: translateY(100vh); } }
@keyframes sheet-out { to { transform: translateY(100vh); } }
html.sheet-open { overflow: hidden; overscroll-behavior-x: none; }
.sheet { overscroll-behavior: contain; }
.sheet.dragging .sheet-scrim { transition: none; }
html.sheet-open .picker { opacity: 0; pointer-events: none; }

.cards-glass .sheet-panel { background: var(--sheet-glass); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); border: 0; border-radius: 30px 30px 0 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 -20px 60px rgba(0, 0, 0, .5); }
.sheet-grab { position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--grab); z-index: 3; }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.sheet-close svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.sheet-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.cards-glass .sheet-scroll { padding: 8px 8px calc(40px + env(safe-area-inset-bottom)); }

.story-media { position: relative; aspect-ratio: 16 / 9; background: var(--media-bg); overflow: hidden; }
.story-media > img, .yt img { width: 100%; height: 100%; object-fit: cover; }
.yt { position: absolute; inset: 0; width: 100%; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); transition: transform .2s var(--ease); }
.yt:hover .yt-play { transform: scale(1.06); }
.yt-play svg { width: 20px; height: 24px; fill: #fff; margin-left: 4px; }
.story-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.story-body { padding: 26px clamp(20px, 6vw, 64px) 8px; }
.story .kicker { margin-bottom: 12px; }
.story .hl { margin-bottom: 14px; }
.story .byline { margin-bottom: 22px; font-size: 13px; }
.story .byline > span:not(.src)::before { content: "\00b7"; margin-right: 8px; }
.story-text p { margin: 0 0 1em; }
.points { margin: 0 0 1.4em; padding: 0; list-style: none; }
.points li { position: relative; padding: 0 0 .5em 18px; }
.points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: currentColor; opacity: .7; }
.products { list-style: none; margin: 4px 0 26px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.products a { display: block; font-size: 13px; line-height: 1.3; color: var(--fg2); }
.products img { aspect-ratio: 1; object-fit: cover; width: 100%; margin-bottom: 8px; background: var(--media-bg); }
.products b { display: block; margin-top: 3px; color: var(--fg); font-weight: 600; }
.cta-big { display: flex; justify-content: center; margin: 8px auto 18px; max-width: 460px; }
.story-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.story-acts .act { width: auto; height: 36px; padding: 0 12px; gap: 6px; display: flex; border-radius: 980px; font-size: 13px; color: var(--fg2); box-shadow: inset 0 0 0 1px var(--hair); }
.story-acts .act-link span { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit { text-align: center; font-size: 12px; color: var(--fg4); margin: 0 0 8px; }
.related { padding: 26px clamp(14px, 4vw, 40px) 10px; border-top: 1px solid var(--hair); }
.related h2 { font: 600 12px/1 var(--ui); text-transform: uppercase; letter-spacing: .09em; color: var(--fg3); margin: 0 0 16px; text-align: center; }
.related h2 .ts-word { text-transform: none; letter-spacing: -.01em; font-size: 14px; color: var(--fg); }
.related .feed { gap: 14px; }

.cards-stroke .story .kicker { justify-content: center; }
.cards-stroke .story .hl { text-align: center; font: 700 clamp(36px, 6vw, 50px)/.98 var(--cond); text-transform: uppercase; text-wrap: balance; }
.cards-stroke .story .byline { justify-content: center; }
.cards-stroke .story-text { font: 19px/1.68 var(--serif); color: var(--fg-body); text-wrap: pretty; }
.cards-stroke .story-media { border-bottom: 1px solid var(--line); }
.cards-stroke .points { font: 17px/1.55 var(--serif); color: var(--fg2); }
.cards-stroke .cta-big { font: 700 13px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; background: var(--btn-bg); color: var(--btn-fg); padding: 18px 20px; }
.cards-stroke .cta-big:hover { background: var(--btn-hover); }
.cards-glass .story-media { border-radius: 24px; }
.cards-glass .story .kicker .topic { letter-spacing: .02em; text-transform: none; font-weight: 500; font-size: 13px; }
.cards-glass .story .hl { font: 700 clamp(28px, 4.6vw, 38px)/1.12 var(--display); letter-spacing: -.025em; }
.cards-glass .story-text { font-size: 18px; line-height: 1.55; color: var(--fg-body); }
.cards-glass .points { color: var(--fg2); }
.cards-glass .points li::before { border-radius: 50%; }
.cards-glass .products img { border-radius: 14px; }
.cards-glass .cta-big { font-size: 15px; font-weight: 600; padding: 15px 22px; border-radius: 980px; background: var(--btn-bg); color: var(--btn-fg); }

/* the story as its own page */
.story-page .story { border: 1px solid var(--line); }
.cards-glass .story-page .story { border: 0; border-radius: 30px; background: var(--glass-card); padding: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.story-page .back { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 14px; font-size: 13px; color: var(--fg3); }
.story-page .back:hover { color: var(--fg); }

/* sources page */
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.src-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.src-list .ava { width: 40px; height: 40px; font-size: 13px; }
.src-list b { display: block; font-size: 16px; }
.src-list small { color: var(--fg3); }
.src-list .st { font-size: 12px; color: var(--fg3); text-align: right; }
.src-list .st.bad { color: #ff9f0a; }
.prose { max-width: 680px; font-size: 17px; line-height: 1.6; color: var(--fg2); }
.prose h2 { color: var(--fg); font: 600 24px/1.2 var(--display); margin: 1.6em 0 .5em; }

/* ---------- toast, dock, picker ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 980px; font-size: 13px; font-weight: 600; background: rgba(44, 44, 46, .9); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: opacity .25s, transform .35s var(--spring); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.glass, .picker { background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 var(--glass-hi), 0 10px 34px rgba(0, 0, 0, .22); }

.picker { position: fixed; left: 20px; bottom: 20px; z-index: 35; border-radius: 20px; padding: 12px 14px; display: grid; gap: 9px; font-size: 12px; color: var(--fg3); transition: opacity .3s, transform .35s var(--ease); }
.picker-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.seg { display: flex; padding: 2px; border-radius: 9px; background: var(--seg-bg); }
.seg button { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 7px; color: var(--fg2); transition: background .25s var(--ease), color .2s; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--seg-on-fg); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.picker-lab { text-align: center; color: #2997ff; padding-top: 2px; }
.picker-lab:hover { text-decoration: underline; }
.embed .picker { display: none !important; }
.embed .foot { display: none; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--hair); color: var(--fg4); font-size: 12px; }
.foot-in { max-width: 1024px; margin: 0 auto; padding: 22px var(--gutter) 48px; }
.foot p { margin: 0 0 8px; }
.foot-mark { color: var(--fg3); }
.foot-mark .gn-logo { font-size: 16px; color: var(--fg); margin-right: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--fg3); }
.foot-links a:hover { color: var(--fg); }

/* ---------- lab ---------- */
.lab-grid { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter) 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 26px; }
.lab-cell h2 { margin: 0 0 4px; font: 600 19px/1.2 var(--display); }
.lab-cell p { margin: 0 0 12px; color: var(--fg3); font-size: 13px; min-height: 3.2em; }
.lab-cell iframe { width: 100%; height: 760px; border: 1px solid var(--hair); border-radius: 30px; background: var(--bg); }
.lab-cell .use { margin-top: 10px; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 980px; background: var(--btn-bg); color: var(--btn-fg); }
.lab-cell .use[aria-pressed="true"] { background: #30d158; }

/* ---------- small screens ---------- */
@media (max-width: 833px) {
  .gn-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
}
@media (max-width: 733px) {
  :root { --gutter: 12px; --peek: 22px; }
  .gn-logo { font-size: 19px; }
  .gn-search { padding: 0 10px; }
  .follow { padding: 6px 12px; }
  .picker { left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; }
  .picker.open { opacity: 1; transform: none; pointer-events: auto; }
  .layout { padding: 12px 10px 120px; }
  .hero { padding: 26px var(--gutter) 14px; }
  .feed-title { margin-bottom: 16px; }
  .hero p { font-size: 15px; }
  .cards-stroke .card-body { padding: 14px 14px 10px; }
  .cards-stroke .hl { font-size: 26px; }
  .cards-stroke .sum { font-size: 15.5px; line-height: 1.55; }
  .cards-glass .hl { font-size: 18px; }
  .card .cta { display: none; }
  .sheet-panel { top: 10px; border-radius: 12px 12px 0 0; }
  .story-body { padding-top: 22px; }
  .cards-stroke .story-text { font-size: 18px; }
  .lab-cell iframe { height: 680px; }
}
@media (hover: none) {
  .post:active .card { transform: scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .feed-stack #feed > .post { position: relative; top: auto; }
  .feed-stack #feed > .post, .app.feed-stack #feed > .post:not(.in) { opacity: 1; }
}
.page-lab .picker { display: none; }

/* lab: pick the page color for all four phones */
.lab-bar { max-width: 1760px; margin: -6px auto 22px; padding: 0 var(--gutter); display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--fg3); }
/* on white and gray pages the header keeps its black: more opaque, so the page doesn't wash it out */
:root:is(.bg-white, .bg-gray) .gn { background: rgb(18, 18, 19); }


/* "<word> needs a typeshit category": the suggestion row at the bottom of the search panel */
.ts-suggest { align-items: center; gap: 14px; padding: 10px 8px; line-height: 1.3; }
.ts-suggest small { margin-top: 3px; }
/* pinned to the bottom of the panel, so it's never cut off when the posts above it scroll */
.gn-results .ts-foot { position: sticky; bottom: -12px; z-index: 1; margin: -6px -16px -12px; padding: 8px 16px 12px; background: rgb(30, 30, 32); border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 0 0 16px 16px; }
.ts-suggest .plus { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; font: 400 20px/1 var(--ui); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.ts-suggest b { color: #fff; font-weight: 700; }
.ts-suggest .ts-word { color: #fff; }
.ts-suggest:hover .plus, .ts-suggest.sel .plus { background: #fff; color: #000; }
.empty-suggest { max-width: 420px; margin: 18px auto 0; text-align: left; }
.empty-suggest .ts-suggest { box-shadow: none; color: var(--fg-body); }
.empty-suggest .ts-suggest b, .empty-suggest .ts-suggest .ts-word { color: var(--fg); }
.empty-suggest .ts-suggest .plus { color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------- the frame: a linked page read inside typeshit, over everything, closed the same ways as a post ---------- */
.frame { z-index: 70; }
.frame .sheet-panel { view-transition-name: none; top: 14px; width: min(1120px, calc(100% - 48px)); }
.frame-bar { position: relative; flex: none; height: 52px; display: flex; align-items: center; gap: 10px; padding: 6px 14px 0 10px; background: var(--sheet-bg); border-bottom: 1px solid var(--hair); touch-action: none; cursor: grab; }
.frame-bar .sheet-grab { top: 6px; }
.frame-x { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; }
.frame-x svg { width: 15px; height: 15px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.frame-x:hover { background: var(--glass-btn); }
.frame-title { flex: 1; min-width: 0; text-align: center; font: 600 14px/1.2 var(--ui); color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-out { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fg3); cursor: pointer; }
.frame-out:hover { color: var(--fg); }
.frame-out svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.frame-body { position: relative; flex: 1; background: #fff; }
.frame-view { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.frame-wait { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; font-size: 14px; color: #6e6e73; background: #fff; }
.frame.loaded .frame-wait { display: none; }
html.frame-open { overflow: hidden; overscroll-behavior-x: none; }
@media (max-width: 733px) {
  .frame .sheet-panel { top: 10px; width: 100%; }
  .frame-out { font-size: 0; gap: 0; }
  .frame-out svg { width: 16px; height: 16px; }
}

/* titled pages share the feed's column, so their titles line up with the content below like a category's */
.tiles.tiles-col { max-width: none; margin: 0; padding: 0; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.feed-col .prose { max-width: none; }
.feed-col .src-list { margin-top: 4px; }
.page-note { color: var(--fg3); font-size: 17px; margin: 0; }
.page-note a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* the end of a list carries on into the bigger one: nutrition -> fitness -> all of typeshit */
.feed-divider { list-style: none; margin: 0; padding: 44px 0 24px; border-top: 1px solid var(--hair); text-align: center; }
.feed-divider p { margin: 0 0 8px; font-size: 13px; color: var(--fg3); }
.feed-divider h2 { margin: 0; font: 700 clamp(26px, 4.4vw, 40px)/1 var(--display); letter-spacing: -.03em; color: var(--fg); }
.feed-divider h2 .ts-word { font-size: 1em; }
