/* =====================================================================
   TADELE TEEN TALKS — DESIGN SYSTEM  (ttt.css)
   =====================================================================
   THE single source of truth for the whole platform. Every page links
   this one file, so the visual language can never drift between pages.

   HOW THIS CODEBASE IS ORGANISED (read README.md for the full map):
     assets/ttt.css .... this file — tokens + every component
     assets/ttt.js ..... shared header + footer ("chrome"), injected
                         into <header id="site-header"> / <footer id="site-footer">
     index.html ........ homepage (trending bento, rails, sections)
     category.html ..... category / "view all" archive (pure post grid)
     article.html ...... single post reading view
     login.html ........ sign-in screen
     admin.html ........ admin dashboard (list / edit / delete posts)
     editor.html ....... Medium-style post editor

   TABLE OF CONTENTS
     1.  TOKENS (colors, type, borders, spacing)
     2.  RESET & BASE
     3.  UTILITIES (wrap, media slot, buttons, view-all)
     4.  HEADER / masthead (+ compact-on-scroll + mobile)
     5.  SECTION LABEL ROW
     6.  BENTO GRID (trending)
     7.  VIDEO/BLOG RAIL (horizontal scroller)
     8.  ARTICLE CARD GRID
     9.  GALLERY (masonry)
     10. FOUNDERS
     11. NEWSLETTER
     12. FOOTER
     13. PAGE HEAD (archive / category hero)
     14. ARCHIVE (category + view-all listing)
     15. SINGLE ARTICLE (reading view + prose)
     16. LOGIN
     17. ADMIN (topbar, sidebar, stats, table)
     18. EDITOR (Medium-style composer)
     19. RESPONSIVE
   ===================================================================== */


/* =====================================================================
   1. TOKENS
   ===================================================================== */
:root {
  /* ---- COLOR · surfaces & ink -------------------------------------- */
  --ttt-bg:        #F5EDD8;  /* warm newsprint cream — page background    */
  --ttt-dark:      #1A0F05;  /* near-black — text, borders, fills         */
  --ttt-muted:     #7A5A3A;  /* muted brown — secondary text, nav, meta   */
  --ttt-red:       #D42B4F;  /* red accent — highlights, CTAs, links      */
  --ttt-red-deep:  #B01E40;  /* darker red — hover on red surfaces        */
  --ttt-paper:     #FFFFFF;  /* white — search bar, badges, polaroids     */
  --ttt-line-soft: rgba(26,15,5,0.14); /* hairline dividers on cream      */

  /* ---- COLOR · editorial card palette ------------------------------ */
  --card-peach:    #F4A26B;
  --card-pink:     #F2A0B5;
  --card-blue:     #88BEDD;
  --card-mint:     #6FC9A0;
  --card-yellow:   #F1D24E;
  --card-lavender: #B496E2;

  /* ---- TYPE · families --------------------------------------------- */
  --font-display:  'Bebas Neue', 'Arial Narrow', sans-serif; /* masthead, labels, tags */
  --font-serif:    'Playfair Display', Georgia, serif;       /* titles, pull quotes    */
  --font-sans:     'DM Sans', system-ui, sans-serif;         /* nav, body, meta        */

  /* ---- TYPE · tracking --------------------------------------------- */
  --track-label:   0.18em;
  --track-tab:     0.04em;

  /* ---- FORM · borders, radius, shadow ------------------------------ */
  --line:          1.5px solid var(--ttt-dark);
  --radius-card:   12px;
  --radius-pill:   100px;
  --shadow-print:  5px 5px 0 var(--ttt-dark);   /* flat print shadow, no blur */
  --lift:          translateY(-4px);

  /* ---- SPACING ----------------------------------------------------- */
  --gap-grid:      14px;
  --pad-card:      18px;
  --pad-page:      clamp(16px, 4vw, 40px);
  --section-y:     clamp(40px, 6vw, 72px);
  --cell-min:      185px;
  --maxw:          1320px;
}


/* =====================================================================
   2. RESET & BASE
   ===================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-anchor: none; }
body {
  background: var(--ttt-bg);
  color: var(--ttt-dark);
  font-family: var(--font-sans);
  background-image: radial-gradient(rgba(26,15,5,0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.star { color: var(--ttt-red); }
:focus-visible { outline: 2.5px solid var(--ttt-red); outline-offset: 2px; }


/* =====================================================================
   3. UTILITIES
   ===================================================================== */
.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---- media slot: any <img> fills via object-fit, never distorts ---- */
.media { display: block; position: relative; width: 100%; overflow: hidden; background: rgba(26,15,5,0.06); }
.media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media.r-16-9 { aspect-ratio: 16 / 9; }
.media.r-4-3  { aspect-ratio: 4 / 3; }
.media.r-1-1  { aspect-ratio: 1 / 1; }
.media.r-3-2  { aspect-ratio: 3 / 2; }
/* striped placeholder fill (delete once a real <img> is supplied) */
.media.ph {
  background-image: repeating-linear-gradient(-45deg,
    transparent, transparent 8px,
    rgba(26,15,5,0.08) 8px, rgba(26,15,5,0.08) 9px);
  display: grid; place-items: center;
}
.media.ph code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px; color: var(--ttt-muted); letter-spacing: 0.04em;
  background: var(--ttt-bg); padding: 3px 7px; border-radius: 3px;
}

/* ---- buttons ----------------------------------------------------- */
/* primary dark pill */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 17px; letter-spacing: 0.08em;
  color: var(--ttt-bg); background: var(--ttt-dark);
  border: var(--line); border-radius: var(--radius-pill);
  padding: 11px 22px 9px; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: var(--lift); box-shadow: var(--shadow-print); }
.btn svg { width: 16px; height: 16px; }
/* red variant */
.btn--red { background: var(--ttt-red); border-color: var(--ttt-dark); }
.btn--red:hover { background: var(--ttt-red-deep); }
/* ghost / outline variant */
.btn--ghost { background: transparent; color: var(--ttt-dark); }
.btn--ghost:hover { background: var(--ttt-dark); color: var(--ttt-bg); }
/* small */
.btn--sm { font-size: 14px; padding: 7px 15px 5px; }

/* ---- VIEW ALL link — the red per-section CTA --------------------- */
.view-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.08em;
  color: var(--ttt-red); background: transparent;
  border: 1.5px solid var(--ttt-red); border-radius: var(--radius-pill);
  padding: 5px 15px 3px; white-space: nowrap; cursor: pointer; line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.view-all svg { width: 13px; height: 13px; }
.view-all:hover {
  background: var(--ttt-red); color: var(--ttt-paper);
  transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ttt-dark);
}


/* =====================================================================
   4. HEADER — sticky masthead
   ===================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--ttt-bg);
  padding: 16px var(--pad-page) 0;
  border-bottom: var(--line);
  box-shadow: 0 3px 0 var(--ttt-red);   /* bold red baseline under the head */
  transition: padding 0.32s ease;
}
.masthead__top {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; max-width: var(--maxw); margin: 0 auto; min-width: 0;
}
.brand { min-width: 0; }
.brand a { display: block; }
.ticker {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 3px;
  color: var(--ttt-muted);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden;
}
.ticker .sep { opacity: 0.5; }
.wordmark {
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 58px); line-height: 0.92;
  color: var(--ttt-dark); letter-spacing: 0.01em; margin-top: 2px;
}

/* compact-on-scroll: brand melts away, tabs slide up beside search */
.brand {
  max-height: 120px; overflow: hidden;
  transition: max-height 0.32s ease, opacity 0.2s ease, transform 0.32s ease;
}
.masthead.is-compact { padding-top: 10px; }
.masthead.is-compact .brand { max-height: 0; opacity: 0; transform: translateY(-12px); }
.masthead.is-compact .login,
.masthead.is-compact .logo-badge {
  max-width: 0; opacity: 0; padding-left: 0; padding-right: 0; border-width: 0; overflow: hidden;
}
.masthead.is-compact .head-tools { padding-bottom: 0; gap: 0; }
@media (min-width: 721px) {
  .masthead.is-compact .nav {
    margin-top: -34px; padding-top: 0; padding-bottom: 12px;
    padding-right: clamp(195px, 23vw, 300px);
  }
}

/* search + login + logo cluster */
.head-tools {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-bottom: 6px;
  transition: gap 0.32s ease, padding 0.32s ease;
}
.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--ttt-paper); border: var(--line);
  border-radius: var(--radius-pill); padding: 9px 18px;
  width: clamp(160px, 20vw, 270px); transition: box-shadow 0.15s ease;
}
.search:focus-within { box-shadow: var(--shadow-print); }
.search svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ttt-dark); }
.search input {
  border: none; outline: none; background: transparent;
  font-family: var(--font-sans); font-size: 14px; color: var(--ttt-dark); width: 100%;
}
.search input::placeholder { color: var(--ttt-muted); opacity: 0.8; }

/* LOGIN — hand-stamped press badge */
.login {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: 0.12em;
  color: var(--ttt-bg); background: var(--ttt-dark);
  border: var(--line); border-radius: var(--radius-pill);
  padding: 8px 16px 6px; cursor: pointer; max-width: 200px; white-space: nowrap;
  transform: rotate(-2deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
              max-width 0.32s ease, opacity 0.2s ease, padding 0.32s ease;
}
.login::before { content: "★"; color: var(--ttt-red); font-size: 12px; }
.login svg { width: 13px; height: 13px; }
.login:hover { transform: rotate(-2deg) translateY(-2px); box-shadow: 3px 3px 0 var(--ttt-red); background: #2c1a0c; }

/* circular TTT badge */
.logo-badge {
  width: 44px; height: 44px; border-radius: 50%;
  border: var(--line); background: var(--ttt-paper);
  display: grid; place-items: center; text-align: center; flex-shrink: 0; max-width: 44px;
  transition: transform 0.15s ease, max-width 0.32s ease, opacity 0.2s ease;
}
.logo-badge:hover { transform: rotate(-6deg); }
.logo-badge span {
  font-family: var(--font-serif); font-weight: 800; font-size: 8px;
  line-height: 0.95; color: var(--ttt-dark); letter-spacing: -0.02em;
}

/* nav tabs */
.nav {
  display: flex; gap: 9px; padding: 13px 0 14px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto;
  transition: margin 0.32s ease, padding 0.32s ease;
}
.tab {
  font-family: var(--font-display); font-size: 16px; letter-spacing: var(--track-tab);
  color: var(--ttt-muted); background: transparent; border: var(--line);
  border-radius: var(--radius-pill); padding: 6px 20px 4px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease; line-height: 1;
}
.tab:hover { transform: translateY(-1px); }
.tab:hover, .tab.is-active { background: var(--ttt-dark); color: var(--ttt-bg); }


/* =====================================================================
   5. SECTION LABEL ROW  "★★★  TITLE  ———  [meta] [VIEW ALL]  ★★★"
   ===================================================================== */
.section-label {
  display: flex; align-items: center; gap: 16px;
  padding: var(--section-y) var(--pad-page) 18px;
  max-width: var(--maxw); margin: 0 auto;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 3px;
  color: var(--ttt-muted);
}
.section-label .stars { letter-spacing: 2px; }
.section-label .title {
  white-space: nowrap; color: var(--ttt-dark);
  font-size: clamp(20px, 3vw, 30px); letter-spacing: 2px;
}
.section-label .rule { flex: 1; height: 2px; background: var(--ttt-dark); min-width: 12px; }
.section-label .meta { white-space: nowrap; color: var(--ttt-red); }
.section-label.first { padding-top: clamp(22px, 3vw, 34px); }


/* =====================================================================
   6. BENTO GRID (trending) — flexible: rows grow with content
   ===================================================================== */
.bento {
  display: grid; grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: minmax(var(--cell-min), auto);
  gap: var(--gap-grid); padding: 0 var(--pad-page);
  max-width: var(--maxw); margin: 0 auto;
}
.card {
  position: relative; border: var(--line); border-radius: var(--radius-card);
  padding: var(--pad-card); min-height: var(--cell-min); overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: var(--lift); box-shadow: var(--shadow-print); }

.c-peach { background: var(--card-peach); }
.c-pink { background: var(--card-pink); }
.c-blue { background: var(--card-blue); }
.c-mint { background: var(--card-mint); }
.c-yellow { background: var(--card-yellow); }
.c-lavender { background: var(--card-lavender); }

.card .tag {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2px;
  color: var(--ttt-dark); display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start; background: rgba(255,255,255,0.6);
  border: 1.5px solid var(--ttt-dark); border-radius: var(--radius-pill);
  padding: 3px 11px 1px; position: relative; z-index: 2; white-space: nowrap;
}
.card .title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.14;
  color: var(--ttt-dark); margin-top: 10px; position: relative; z-index: 2; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .byline {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  color: var(--ttt-dark); opacity: 0.8; margin-top: auto; padding-top: 10px;
  position: relative; z-index: 2;
}
.card .glyph {
  position: absolute; top: -14px; right: -6px;
  font-family: var(--font-display); font-size: 92px; line-height: 1;
  color: rgba(26,15,5,0.10); pointer-events: none; z-index: 1;
}
.k-opinionvideo { grid-column: 1;     grid-row: 1; }
.k-featured     { grid-column: 2 / 4; grid-row: 1 / 3; }
.k-artwork      { grid-column: 4;     grid-row: 1; }
.k-review       { grid-column: 5;     grid-row: 1; }
.k-photography  { grid-column: 1;     grid-row: 2; }
.k-newsvideo    { grid-column: 4;     grid-row: 2; }
.k-opinionart   { grid-column: 5;     grid-row: 2; }

.k-featured { padding: 26px; border-width: 2.5px; }
.k-featured .glyph { font-size: 230px; top: -42px; right: -20px; color: rgba(26,15,5,0.09); }
.k-featured .tag { font-size: 14px; background: var(--ttt-dark); color: var(--ttt-bg); }
.k-featured .tag .star { color: var(--ttt-red); }
.k-featured .title {
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; line-height: 1.03;
  margin-top: 14px; -webkit-line-clamp: 3;
}
.k-featured .sub {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(15px, 1.5vw, 19px); color: var(--ttt-dark); opacity: 0.85;
  margin-top: 12px; position: relative; z-index: 2; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.k-featured .byline { font-size: 13px; }
@media (max-width: 1099px) { .polaroid { display: none; } }
@media (min-width: 1100px) { .k-featured .title, .k-featured .sub { margin-right: 180px; } }

.polaroid {
  background: var(--ttt-paper); border: var(--line);
  padding: 7px 7px 22px; width: 150px; transform: rotate(-3deg);
  box-shadow: 3px 3px 0 rgba(26,15,5,0.2);
  position: absolute; top: 86px; right: 24px; z-index: 3;
}
.polaroid .cap {
  font-family: var(--font-sans); font-size: 10px; color: var(--ttt-muted);
  text-align: center; margin-top: 6px; letter-spacing: 0.04em;
}


/* =====================================================================
   7. VIDEO / BLOG RAIL — horizontal scroller
   ---------------------------------------------------------------------
   FIX: was `scroll-snap-type: x mandatory`, which force-snapped the
   first card flush to the scrollport and bounced back when you tried
   to reach position 0. Now `proximity` (never forces) + scroll-padding
   so snap points respect the page gutter. Vertical padding is generous
   so the hover lift + print shadow are NOT clipped by overflow-x.
   ===================================================================== */
.rail {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--pad-page);
  padding: 12px 0 26px;
  max-width: var(--maxw); margin: 0 auto;
  scrollbar-width: thin; scrollbar-color: var(--ttt-muted) transparent;
  overscroll-behavior-x: contain;
}
/* Fixed end-spacers (not container padding) GUARANTEE a gutter on both
   sides that scroll-snap can never eat — first card never touches the edge. */
.rail::before, .rail::after { content: ""; flex: 0 0 max(var(--pad-page), 22px); }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--ttt-muted); border-radius: 100px; }
.vcard {
  flex: 0 0 300px; scroll-snap-align: start;
  border: var(--line); border-radius: var(--radius-card);
  overflow: hidden; background: var(--ttt-paper);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.vcard:hover { transform: var(--lift); box-shadow: var(--shadow-print); }
.vcard .media { border-bottom: var(--line); }
.vcard .media::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 52px; height: 52px; border-radius: 50%;
  border: var(--line); background: rgba(255,255,255,0.85);
}
.vcard .media .tri {
  position: absolute; inset: 0; margin: auto; z-index: 2;
  width: 0; height: 0; transform: translateX(2px);
  border-left: 15px solid var(--ttt-dark);
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.vcard .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.vcard .tag {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 2px;
  align-self: flex-start; border: 1.5px solid var(--ttt-dark);
  border-radius: var(--radius-pill); padding: 2px 10px 0; margin-bottom: 10px;
}
.vcard .title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(17px, 1.6vw, 20px); line-height: 1.15; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vcard .byline {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  color: var(--ttt-muted); margin-top: auto; padding-top: 12px;
}
.vcard.c-peach .tag    { background: var(--card-peach); }
.vcard.c-pink .tag     { background: var(--card-pink); }
.vcard.c-blue .tag     { background: var(--card-blue); }
.vcard.c-mint .tag     { background: var(--card-mint); }
.vcard.c-yellow .tag   { background: var(--card-yellow); }
.vcard.c-lavender .tag { background: var(--card-lavender); }


/* =====================================================================
   8. ARTICLE CARD GRID
   ===================================================================== */
.articles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  padding: 0 var(--pad-page); max-width: var(--maxw); margin: 0 auto;
}
.acard {
  border: var(--line); border-radius: var(--radius-card);
  overflow: hidden; background: var(--ttt-paper);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.acard:hover { transform: var(--lift); box-shadow: var(--shadow-print); }
.acard .media { border-bottom: var(--line); }
.acard .body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.acard .pill {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 2px;
  align-self: flex-start; border: 1.5px solid var(--ttt-dark);
  border-radius: var(--radius-pill); padding: 2px 11px 0; margin-bottom: 12px;
  background: var(--card-yellow);
}
.acard .title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(18px, 1.8vw, 22px); line-height: 1.14; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.acard .desc {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  color: var(--ttt-dark); opacity: 0.78; margin-top: 10px; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.acard .meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  color: var(--ttt-muted); margin-top: auto; padding-top: 16px;
}
.acard .meta .dot { opacity: 0.5; }

/* lead article — spans 2 cols, photo beside text on wide screens */
.acard.lead { grid-column: span 2; }
.acard.lead .pill { background: var(--card-pink); }
@media (min-width: 769px) {
  .acard.lead { flex-direction: row; }
  .acard.lead .media { border-bottom: none; border-right: var(--line); flex: 0 0 46%; aspect-ratio: auto; }
  .acard.lead .title { font-size: clamp(22px, 2.4vw, 30px); -webkit-line-clamp: 3; }
  .acard.lead .desc { -webkit-line-clamp: 3; }
}
/* colour rotation for pills (homepage "latest" section) */
.articles .acard:nth-child(2) .pill { background: var(--card-blue); }
.articles .acard:nth-child(3) .pill { background: var(--card-yellow); }
.articles .acard:nth-child(4) .pill { background: var(--card-mint); }
.articles .acard:nth-child(5) .pill { background: var(--card-lavender); }
.articles .acard:nth-child(6) .pill { background: var(--card-peach); }


/* =====================================================================
   9. GALLERY — masonry wall
   ===================================================================== */
.gallery {
  columns: 4; column-gap: 16px;
  padding: 0 var(--pad-page); max-width: var(--maxw); margin: 0 auto;
}
.gitem {
  display: block;
  break-inside: avoid; margin-bottom: 16px;
  position: relative; border: var(--line); border-radius: var(--radius-card);
  overflow: hidden; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gitem:hover { transform: var(--lift); box-shadow: var(--shadow-print); }
.gitem .media { aspect-ratio: auto; }
.gitem .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 46px 14px 13px;
  display: flex; flex-direction: column; gap: 3px;
  background: linear-gradient(to top, rgba(26,15,5,0.94) 10%, rgba(26,15,5,0.6) 52%, rgba(26,15,5,0));
  color: var(--ttt-bg);
}
.gitem .cap .t {
  font-family: var(--font-serif); font-weight: 700; font-size: 16px; line-height: 1.18; text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gitem .cap .a { display: block; font-family: var(--font-sans); font-size: 12px; opacity: 0.9; }


/* =====================================================================
   10. FOUNDERS
   ===================================================================== */
.founders-head { text-align: center; padding: var(--section-y) var(--pad-page) 6px; }
.founders-head h2 {
  font-family: var(--font-display); font-size: clamp(40px, 7vw, 78px);
  line-height: 0.92; letter-spacing: 0.01em; color: var(--ttt-dark);
}
.founders-head p {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(15px, 1.6vw, 19px); color: var(--ttt-muted); margin-top: 6px;
}
.founders {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 28px var(--pad-page) 0; max-width: var(--maxw); margin: 0 auto;
}
.fcard {
  border: var(--line); border-radius: var(--radius-card);
  background: var(--ttt-paper); padding: 24px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fcard:hover { transform: var(--lift); box-shadow: var(--shadow-print); }
.fcard .avatar {
  width: 96px; height: 96px; border-radius: 50%; border: var(--line);
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--font-display); font-size: 36px; color: var(--ttt-dark);
}
.fcard .avatar.c-peach { background: var(--card-peach); }
.fcard .avatar.c-pink { background: var(--card-pink); }
.fcard .avatar.c-mint { background: var(--card-mint); }
.fcard .avatar.c-lavender { background: var(--card-lavender); }
.fcard .name { font-family: var(--font-serif); font-weight: 800; font-size: 21px; margin-top: 16px; color: var(--ttt-dark); }
.fcard .role {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ttt-red); margin-top: 4px;
}
.fcard .bio { font-family: var(--font-sans); font-size: 13px; line-height: 1.5; color: var(--ttt-muted); margin-top: 10px; text-wrap: pretty; }


/* =====================================================================
   11. NEWSLETTER STRIP
   ===================================================================== */
.newsletter {
  background: var(--ttt-red); color: var(--ttt-paper);
  border-top: var(--line); border-bottom: var(--line);
  margin-top: var(--section-y); padding: clamp(40px, 6vw, 64px) var(--pad-page);
  position: relative; overflow: hidden;
}
.newsletter::before {
  content: "★"; position: absolute; top: -40px; right: 2%;
  font-family: var(--font-display); font-size: 320px; line-height: 1;
  color: rgba(255,255,255,0.08); pointer-events: none;
}
.newsletter .nl-inner { max-width: 880px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.newsletter h2 { font-family: var(--font-display); font-size: clamp(40px, 7vw, 76px); line-height: 0.95; letter-spacing: 0.02em; }
.newsletter p { font-family: var(--font-sans); font-size: clamp(14px, 1.5vw, 16px); opacity: 0.92; margin-top: 8px; }
.nl-form { display: flex; gap: 10px; margin: 22px auto 0; max-width: 520px; }
.nl-form input {
  flex: 1; border: var(--line); border-radius: var(--radius-pill);
  padding: 13px 20px; font-family: var(--font-sans); font-size: 15px;
  background: var(--ttt-paper); color: var(--ttt-dark); outline: none; min-width: 0;
}
.nl-form button {
  font-family: var(--font-display); font-size: 18px; letter-spacing: 0.08em;
  color: var(--ttt-red); background: var(--ttt-paper);
  border: var(--line); border-radius: var(--radius-pill);
  padding: 13px 26px 11px; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nl-form button:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ttt-dark); }


/* =====================================================================
   12. FOOTER
   ===================================================================== */
.site-footer { background: var(--ttt-dark); color: var(--ttt-bg); padding: clamp(36px, 5vw, 56px) var(--pad-page) 28px; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: var(--maxw); margin: 0 auto; flex-wrap: wrap; }
.site-footer .fwordmark { font-family: var(--font-display); font-size: clamp(26px, 4vw, 40px); line-height: 0.95; color: var(--ttt-bg); }
.site-footer .flinks { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.site-footer .flinks a { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.06em; color: var(--ttt-bg); opacity: 0.85; transition: color 0.15s ease, opacity 0.15s ease; }
.site-footer .flinks a:hover { color: var(--ttt-red); opacity: 1; }
.fsocial-block { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.discord-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 17px; letter-spacing: 0.08em;
  color: var(--ttt-bg); background: var(--ttt-red);
  border: 1.5px solid var(--ttt-bg); border-radius: var(--radius-pill);
  padding: 9px 20px 7px; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.discord-btn svg { width: 19px; height: 19px; fill: currentColor; }
.discord-btn:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--ttt-bg); background: var(--ttt-red-deep); }
.social-row { display: flex; gap: 10px; }
.sbtn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--ttt-bg); color: var(--ttt-bg);
  display: grid; place-items: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.sbtn svg { width: 17px; height: 17px; fill: currentColor; }
.sbtn:hover { background: var(--ttt-bg); color: var(--ttt-dark); transform: translateY(-2px); }
.site-footer .handle { font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; color: var(--card-peach); }
.footer-base {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--maxw); margin: 26px auto 0; padding-top: 18px;
  border-top: 1.5px solid rgba(245,237,216,0.25); flex-wrap: wrap;
}
.footer-base .tagline { font-family: var(--font-serif); font-style: italic; font-size: 16px; color: var(--ttt-bg); opacity: 0.85; }
.footer-base .copy { font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; color: var(--ttt-bg); opacity: 0.6; }


/* =====================================================================
   13. PAGE HEAD — archive / category hero
   ===================================================================== */
.page-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) var(--pad-page) 6px;
}
.page-head .crumbs {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 2px;
  color: var(--ttt-muted); display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.page-head .crumbs a:hover { color: var(--ttt-red); }
.page-head .kicker {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 3px; color: var(--ttt-red);
  display: block; margin-bottom: 6px;
}
.page-head h1 {
  font-family: var(--font-display); font-size: clamp(52px, 12vw, 130px);
  line-height: 0.86; letter-spacing: 0.01em; color: var(--ttt-dark);
}
.page-head .lede {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(16px, 2vw, 22px); color: var(--ttt-muted);
  margin-top: 14px; max-width: 60ch; text-wrap: pretty;
}
.page-head .rule { height: 2px; background: var(--ttt-dark); margin-top: 22px; }

/* filter / sort bar */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto; padding: 20px var(--pad-page) 4px;
}
.filter-bar .chip {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.06em;
  color: var(--ttt-muted); background: transparent; border: var(--line);
  border-radius: var(--radius-pill); padding: 5px 16px 3px; cursor: pointer; line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.filter-bar .chip:hover { transform: translateY(-1px); }
.filter-bar .chip.is-active { background: var(--ttt-dark); color: var(--ttt-bg); }
.filter-bar .spacer { flex: 1; }
.filter-bar .count { font-family: var(--font-display); font-size: 14px; letter-spacing: 2px; color: var(--ttt-muted); }
/* archive story count in the page head (replaces the old filter chip row) */
.archive-count { max-width: var(--maxw); margin: 0 auto; padding: 16px var(--pad-page) 0; font-family: var(--font-display); font-size: 14px; letter-spacing: 3px; color: var(--ttt-muted); display: flex; align-items: center; gap: 10px; }
.archive-count .star { letter-spacing: 2px; }


/* =====================================================================
   14. ARCHIVE — category / view-all listing (pure post grid)
   ===================================================================== */
.archive {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  padding: 22px var(--pad-page) 0; max-width: var(--maxw); margin: 0 auto;
}
.archive .acard { height: 100%; }
.archive-more { display: flex; justify-content: center; padding: 36px var(--pad-page) 8px; }
.archive-empty {
  max-width: var(--maxw); margin: 0 auto; padding: 60px var(--pad-page);
  text-align: center; font-family: var(--font-serif); font-style: italic;
  font-size: 20px; color: var(--ttt-muted);
}


/* =====================================================================
   15. SINGLE ARTICLE — reading view
   ===================================================================== */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--pad-page); }
.article-head { padding: clamp(28px, 5vw, 52px) 0 0; }
.article-head .crumbs {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 2px;
  color: var(--ttt-muted); display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.article-head .crumbs a:hover { color: var(--ttt-red); }
.article-cat {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 2px; color: var(--ttt-dark);
  background: var(--card-pink); border: 1.5px solid var(--ttt-dark); border-radius: var(--radius-pill);
  padding: 4px 14px 2px; display: inline-block;
}
.article-head h1 {
  font-family: var(--font-serif); font-weight: 800;
  font-size: clamp(32px, 5.4vw, 58px); line-height: 1.04; margin-top: 18px;
  color: var(--ttt-dark); text-wrap: pretty;
}
.article-head .deck {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(18px, 2.4vw, 24px); color: var(--ttt-muted);
  margin-top: 16px; line-height: 1.4; text-wrap: pretty;
}
.byline-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-bottom: 22px; border-bottom: var(--line);
}
.byline-row .av {
  width: 46px; height: 46px; border-radius: 50%; border: var(--line);
  background: var(--card-mint); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 18px; color: var(--ttt-dark); flex-shrink: 0;
}
.byline-row .who { font-family: var(--font-sans); }
.byline-row .who .n { font-weight: 700; font-size: 15px; color: var(--ttt-dark); }
.byline-row .who .m { font-size: 13px; color: var(--ttt-muted); margin-top: 1px; }
.byline-row .share { margin-left: auto; display: flex; gap: 8px; }
.byline-row .share .sbtn { width: 38px; height: 38px; border: var(--line); color: var(--ttt-dark); }
.byline-row .share .sbtn:hover { background: var(--ttt-dark); color: var(--ttt-bg); }

.article-cover { max-width: 1040px; margin: 26px auto 0; padding: 0 var(--pad-page); }
.article-cover .media { border: var(--line); border-radius: var(--radius-card); }
.article-cover .cap { font-family: var(--font-sans); font-size: 12px; color: var(--ttt-muted); margin-top: 8px; text-align: center; }

/* prose — the readable body */
.prose { font-family: var(--font-sans); font-size: 18px; line-height: 1.72; color: var(--ttt-dark); padding: 34px 0 0; }
.prose > * + * { margin-top: 22px; }
.prose p { text-wrap: pretty; }
.prose a { color: var(--ttt-red); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--ttt-red-deep); }
.prose h2 { font-family: var(--font-serif); font-weight: 800; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.12; margin-top: 40px; }
.prose h3 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(20px, 2.6vw, 24px); margin-top: 32px; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: 8px; }
.prose img { border: var(--line); border-radius: var(--radius-card); width: 100%; }
.prose figure { margin-top: 26px; }
.prose figcaption { font-size: 13px; color: var(--ttt-muted); margin-top: 8px; text-align: center; }
.prose blockquote, .pullquote {
  font-family: var(--font-serif); font-style: italic; font-weight: 600;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.3; color: var(--ttt-dark);
  border-left: 4px solid var(--ttt-red); padding: 4px 0 4px 22px; margin: 34px 0;
}
.prose hr { border: none; border-top: var(--line); margin: 36px 0; }
.drop-cap::first-letter {
  font-family: var(--font-serif); font-weight: 800; float: left;
  font-size: 4.4em; line-height: 0.74; padding: 8px 10px 0 0; color: var(--ttt-red);
}

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 30px 0; border-top: var(--line); margin-top: 34px; }
.article-tags .t {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 1.5px; color: var(--ttt-muted);
  border: 1.5px solid var(--ttt-muted); border-radius: var(--radius-pill); padding: 3px 12px 1px;
}

.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  border: var(--line); border-radius: var(--radius-card); background: var(--ttt-paper);
  padding: 22px; margin: 0 0 8px;
}
.author-box .av { width: 66px; height: 66px; border-radius: 50%; border: var(--line); background: var(--card-mint); display: grid; place-items: center; font-family: var(--font-display); font-size: 26px; flex-shrink: 0; }
.author-box .n { font-family: var(--font-serif); font-weight: 800; font-size: 20px; }
.author-box .r { font-family: var(--font-sans); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ttt-red); margin-top: 3px; }
.author-box .b { font-family: var(--font-sans); font-size: 14px; line-height: 1.55; color: var(--ttt-muted); margin-top: 8px; }


/* =====================================================================
   16. LOGIN
   ===================================================================== */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px var(--pad-page); }
.auth-card {
  width: min(940px, 100%); display: grid; grid-template-columns: 1fr 1fr;
  border: var(--line); border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow-print); background: var(--ttt-paper);
}
/* left brand panel */
.auth-brand {
  background: var(--ttt-dark); color: var(--ttt-bg);
  padding: clamp(30px, 4vw, 48px); position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 430px;
}
.auth-brand::before {
  content: "★"; position: absolute; bottom: -70px; right: -30px;
  font-family: var(--font-display); font-size: 300px; color: rgba(212,43,79,0.18); line-height: 1;
}
.auth-brand .ticker { color: var(--card-peach); }
.auth-brand .bm {
  font-family: var(--font-display); font-size: clamp(48px, 6vw, 74px);
  line-height: 0.9; color: var(--ttt-bg); margin-top: 10px; position: relative; z-index: 2;
}
.auth-brand .tag2 {
  font-family: var(--font-serif); font-style: italic; font-size: 20px;
  color: var(--ttt-bg); opacity: 0.9; position: relative; z-index: 2; max-width: 26ch;
}
.auth-brand .stat { position: relative; z-index: 2; font-family: var(--font-sans); font-size: 13px; opacity: 0.75; }
/* right form panel */
.auth-form { padding: clamp(30px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.auth-form h2 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 46px); letter-spacing: 0.01em; }
.auth-form .sub { font-family: var(--font-sans); font-size: 14px; color: var(--ttt-muted); margin-top: 4px; }
.field { margin-top: 18px; }
.field label { font-family: var(--font-display); font-size: 14px; letter-spacing: 1.5px; color: var(--ttt-muted); display: block; margin-bottom: 6px; }
.field .inp, .auth-form input {
  width: 100%; border: var(--line); border-radius: 10px; background: var(--ttt-bg);
  padding: 13px 15px; font-family: var(--font-sans); font-size: 15px; color: var(--ttt-dark); outline: none;
  transition: box-shadow 0.15s ease;
}
.field .inp:focus, .auth-form input:focus { box-shadow: var(--shadow-print); }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-family: var(--font-sans); font-size: 13px; }
.auth-row a { color: var(--ttt-red); }
.auth-row a:hover { text-decoration: underline; }
.auth-form .btn { width: 100%; margin-top: 22px; font-size: 20px; padding: 14px; }
.auth-div { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: var(--ttt-muted); font-family: var(--font-display); letter-spacing: 2px; font-size: 13px; }
.auth-div::before, .auth-div::after { content: ""; flex: 1; height: 1.5px; background: var(--ttt-line-soft); }
.auth-alt { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.auth-foot { font-family: var(--font-sans); font-size: 13px; color: var(--ttt-muted); margin-top: 22px; text-align: center; }
.auth-foot a { color: var(--ttt-red); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }
.auth-back { position: fixed; top: 20px; left: 20px; z-index: 10; }


/* =====================================================================
   17. ADMIN
   ===================================================================== */
.admin { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
/* sidebar */
.admin-side { background: var(--ttt-dark); color: var(--ttt-bg); padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.admin-side .brandmark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.admin-side .brandmark .dot { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ttt-bg); display: grid; place-items: center; font-family: var(--font-serif); font-weight: 800; font-size: 11px; }
.admin-side .brandmark b { font-family: var(--font-display); font-size: 22px; line-height: 0.9; letter-spacing: 0.02em; }
.admin-side .brandmark small { display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: 3px; color: var(--card-peach); }
.admin-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.admin-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--ttt-bg); opacity: 0.8;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.admin-nav a svg { width: 17px; height: 17px; }
.admin-nav a:hover { background: rgba(245,237,216,0.1); opacity: 1; }
.admin-nav a.is-active { background: var(--ttt-red); opacity: 1; }
.admin-side .side-foot { margin-top: auto; padding-top: 16px; border-top: 1.5px solid rgba(245,237,216,0.2); }
.admin-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.admin-user .av { width: 34px; height: 34px; border-radius: 50%; background: var(--card-pink); border: 1.5px solid var(--ttt-bg); display: grid; place-items: center; font-family: var(--font-display); font-size: 14px; color: var(--ttt-dark); }
.admin-user .nm { font-family: var(--font-sans); font-size: 13px; font-weight: 600; }
.admin-user .nm small { display: block; font-weight: 400; opacity: 0.7; }

/* main */
.admin-main { padding: 0 0 60px; min-width: 0; background: var(--ttt-bg); }
.admin-top {
  position: sticky; top: 0; z-index: 20; background: var(--ttt-bg);
  border-bottom: var(--line); padding: 16px clamp(18px, 3vw, 34px);
  display: flex; align-items: center; gap: 16px;
}
.admin-top h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 38px); letter-spacing: 0.01em; }
.admin-top .grow { flex: 1; }
.admin-top .adm-search {
  display: flex; align-items: center; gap: 8px; background: var(--ttt-paper); border: var(--line);
  border-radius: var(--radius-pill); padding: 8px 15px; width: clamp(150px, 24vw, 280px);
}
.admin-top .adm-search svg { width: 15px; height: 15px; }
.admin-top .adm-search input { border: none; background: transparent; outline: none; font-family: var(--font-sans); font-size: 14px; width: 100%; }
.admin-body { padding: clamp(18px, 3vw, 32px); }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { border: var(--line); border-radius: var(--radius-card); background: var(--ttt-paper); padding: 18px; position: relative; overflow: hidden; }
.stat-card .k { font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; color: var(--ttt-muted); }
.stat-card .v { font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px); line-height: 1; margin-top: 8px; }
.stat-card .d { font-family: var(--font-sans); font-size: 12px; color: var(--ttt-red); margin-top: 6px; font-weight: 600; }
.stat-card.c-peach { background: var(--card-peach); }
.stat-card.c-blue { background: var(--card-blue); }
.stat-card.c-mint { background: var(--card-mint); }
.stat-card.c-lavender { background: var(--card-lavender); }

/* section header inside admin */
.admin-sec { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; }
.admin-sec h2 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); letter-spacing: 0.02em; }
.admin-sec .rule { flex: 1; height: 2px; background: var(--ttt-dark); }

/* posts table */
.table-wrap { border: var(--line); border-radius: var(--radius-card); background: var(--ttt-paper); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
table.posts { width: 100%; border-collapse: collapse; min-width: 760px; }
table.posts th {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 1.5px; color: var(--ttt-muted);
  text-align: left; padding: 14px 16px; border-bottom: var(--line); background: rgba(26,15,5,0.04);
}
table.posts td { padding: 14px 16px; border-bottom: 1.5px solid var(--ttt-line-soft); font-family: var(--font-sans); font-size: 14px; vertical-align: middle; }
table.posts tr:last-child td { border-bottom: none; }
table.posts tr { transition: background 0.12s ease; }
table.posts tbody tr:hover { background: rgba(26,15,5,0.03); }
.post-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.post-cell .thumb { width: 56px; height: 40px; border-radius: 6px; border: var(--line); flex-shrink: 0; overflow: hidden; }
.post-cell .thumb .media { height: 100%; aspect-ratio: auto; }
.post-cell .tt { font-family: var(--font-serif); font-weight: 700; font-size: 15px; line-height: 1.2; text-wrap: pretty; }
.post-cell .tt small { display: block; font-family: var(--font-sans); font-weight: 400; font-size: 12px; color: var(--ttt-muted); margin-top: 2px; }
.cat-chip { font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; border: 1.5px solid var(--ttt-dark); border-radius: var(--radius-pill); padding: 2px 10px 0; white-space: nowrap; background: var(--card-yellow); }
.status { font-family: var(--font-display); font-size: 12px; letter-spacing: 1.5px; border-radius: var(--radius-pill); padding: 3px 11px 1px; border: 1.5px solid var(--ttt-dark); white-space: nowrap; }
.status.published { background: var(--card-mint); }
.status.draft { background: transparent; color: var(--ttt-muted); border-color: var(--ttt-muted); }
.status.disabled { background: transparent; color: var(--ttt-muted); border-color: var(--ttt-muted); text-decoration: line-through; }
/* sidebar count badge (beside Drafts) */
.side-badge {
  margin-left: auto; font-family: var(--font-display); font-size: 12px; letter-spacing: 1px;
  background: var(--ttt-red); color: var(--ttt-bg); border-radius: var(--radius-pill);
  min-width: 22px; text-align: center; padding: 2px 7px 0; line-height: 1.25;
}
.side-badge.alt { background: var(--card-yellow); color: var(--ttt-dark); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: var(--line); background: var(--ttt-bg);
  display: grid; place-items: center; cursor: pointer; color: var(--ttt-dark);
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { transform: translateY(-1px); background: var(--ttt-dark); color: var(--ttt-bg); }
.icon-btn.danger:hover { background: var(--ttt-red); border-color: var(--ttt-red); color: var(--ttt-paper); }


/* =====================================================================
   18. EDITOR — Medium-style composer
   ===================================================================== */
.editor-page { min-height: 100vh; display: flex; flex-direction: column; }
.editor-top {
  position: sticky; top: 0; z-index: 30; background: var(--ttt-bg);
  border-bottom: var(--line); box-shadow: 0 3px 0 var(--ttt-red);
  display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 3vw, 30px);
}
.editor-top .back { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 15px; letter-spacing: 1px; color: var(--ttt-muted); }
.editor-top .back:hover { color: var(--ttt-red); }
.editor-top .back svg { width: 15px; height: 15px; }
.editor-top .grow { flex: 1; }
.editor-top .save-state { font-family: var(--font-sans); font-size: 13px; color: var(--ttt-muted); }
.editor-top .status { align-self: center; }

.editor-scroll { flex: 1; overflow: visible; }
.editor-meta { max-width: 740px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) var(--pad-page) 0; }
/* title + category + deck fields */
.editor-fieldrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.editor-select {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 1px; color: var(--ttt-dark);
  border: var(--line); border-radius: var(--radius-pill); padding: 8px 16px; background: var(--card-pink);
  cursor: pointer; appearance: none;
}
.editor-cover-btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-size: 15px; letter-spacing: 1px; color: var(--ttt-dark); background: var(--ttt-bg);
  border: var(--line); border-radius: var(--radius-pill); padding: 8px 16px; cursor: pointer;
}
.editor-cover-btn svg { width: 15px; height: 15px; }
.editor-cover-btn:hover { background: var(--ttt-dark); color: var(--ttt-bg); }
.editor-title {
  width: 100%; border: none; outline: none; background: transparent; resize: none; overflow: hidden;
  font-family: var(--font-serif); font-weight: 800; font-size: clamp(30px, 5vw, 50px);
  line-height: 1.05; color: var(--ttt-dark);
}
.editor-title::placeholder { color: rgba(26,15,5,0.25); }
.editor-deck {
  width: 100%; border: none; outline: none; background: transparent; resize: none; overflow: hidden;
  font-family: var(--font-serif); font-style: italic; font-size: clamp(17px, 2.2vw, 22px);
  color: var(--ttt-muted); margin-top: 12px;
}
.editor-deck::placeholder { color: rgba(122,90,58,0.5); }
.editor-cover { max-width: 740px; margin: 20px auto 0; padding: 0 var(--pad-page); }
.editor-cover .media { border: var(--line); border-radius: var(--radius-card); }
.editor-cover-remove { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-family: var(--font-sans); font-size: 13px; color: var(--ttt-red); cursor: pointer; }
.editor-metaline { max-width: 740px; margin: 12px auto 0; padding: 0 var(--pad-page); font-family: var(--font-sans); font-size: 13px; color: var(--ttt-muted); }

/* the writable body */
.editor-body {
  max-width: 740px; margin: 8px auto 0; padding: 14px var(--pad-page) 120px;
  font-family: var(--font-sans); font-size: 19px; line-height: 1.7; color: var(--ttt-dark); outline: none;
}
.editor-body:empty::before { content: attr(data-placeholder); color: rgba(26,15,5,0.28); }
.editor-body > * + * { margin-top: 20px; }
.editor-body h2 { font-family: var(--font-serif); font-weight: 800; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.14; }
.editor-body h3 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(20px, 2.6vw, 24px); }
.editor-body blockquote { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: clamp(21px, 3vw, 28px); line-height: 1.3; border-left: 4px solid var(--ttt-red); padding-left: 20px; }
.editor-body ul, .editor-body ol { padding-left: 1.3em; }
.editor-body li { margin-top: 6px; }
.editor-body a { color: var(--ttt-red); text-decoration: underline; }
.editor-body img { border: var(--line); border-radius: var(--radius-card); width: 100%; }
.editor-body figure { margin: 8px 0; }
.editor-body figcaption { font-family: var(--font-sans); font-size: 13px; color: var(--ttt-muted); text-align: center; margin-top: 8px; }
.editor-body hr { border: none; border-top: var(--line); margin: 10px 0; }

/* inline "+" add menu (Medium-style, appears at left of current block) */
.add-menu { position: absolute; z-index: 40; display: none; }
.add-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: var(--line); background: var(--ttt-bg);
  display: grid; place-items: center; cursor: pointer; transition: transform 0.2s ease, background 0.15s ease;
}
.add-toggle svg { width: 20px; height: 20px; transition: transform 0.2s ease; }
.add-menu.open .add-toggle { background: var(--ttt-dark); color: var(--ttt-bg); }
.add-menu.open .add-toggle svg { transform: rotate(45deg); }
.add-actions { position: absolute; left: 50px; top: 0; display: none; gap: 8px; }
.add-menu.open .add-actions { display: flex; }
.add-actions button {
  width: 42px; height: 42px; border-radius: 50%; border: var(--line); background: var(--ttt-paper);
  display: grid; place-items: center; cursor: pointer; color: var(--ttt-dark);
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.add-actions button svg { width: 18px; height: 18px; }
.add-actions button:hover { transform: translateY(-2px); background: var(--ttt-red); color: var(--ttt-paper); border-color: var(--ttt-red); }

/* selection bubble toolbar */
.bubble {
  position: absolute; z-index: 50; display: none; gap: 2px; align-items: center;
  background: var(--ttt-dark); border-radius: 10px; padding: 5px; box-shadow: 0 6px 22px rgba(26,15,5,0.35);
}
.bubble.show { display: flex; }
.bubble button {
  min-width: 34px; height: 34px; padding: 0 9px; border: none; background: transparent; color: var(--ttt-bg);
  border-radius: 7px; cursor: pointer; font-family: var(--font-serif); font-size: 16px;
  display: grid; place-items: center; transition: background 0.12s ease, color 0.12s ease;
}
.bubble button svg { width: 16px; height: 16px; }
.bubble button:hover, .bubble button.on { background: var(--ttt-red); }
.bubble .sep { width: 1.5px; height: 22px; background: rgba(245,237,216,0.25); margin: 0 3px; }


/* =====================================================================
   19. RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .articles, .archive { grid-template-columns: repeat(2, 1fr); }
  .acard.lead { grid-column: span 2; }
  .gallery { columns: 3; }
  .founders { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .k-opinionvideo, .k-artwork, .k-review,
  .k-photography, .k-newsvideo, .k-opinionart { grid-column: auto; grid-row: auto; }
  .k-featured { grid-column: 1 / 3; grid-row: auto; }
  .section-label .meta { display: none; }
  .acard.lead { flex-direction: column; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-brand { min-height: 240px; }
  /* admin: collapse sidebar to a top strip */
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 12px; overflow-x: auto; }
  .admin-side .brandmark { padding: 0 12px 0 4px; }
  .admin-nav { flex-direction: row; margin-top: 0; }
  .admin-nav a span { display: none; }
  .admin-side .side-foot { margin: 0 0 0 auto; padding: 0 0 0 12px; border: none; border-left: 1.5px solid rgba(245,237,216,0.2); }
  .admin-user .nm { display: none; }
}

/* ---- MOBILE HEADER FIX ---------------------------------------------
   ≤720px: the search becomes a round ICON button. Tapping it expands a
   full-width search bar across the masthead (see .is-open, toggled in
   ttt.js) instead of vanishing. Category tabs sit TOGETHER on one
   swipeable row; the wordmark shrinks so the logo badge never clips.
   Above 720px the full search pill stays as-is — no collapse.
   -------------------------------------------------------------------- */
@media (max-width: 720px) {
  .search {
    width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center;
    border-radius: 50%; cursor: pointer;
  }
  .search input { display: none; }
  .search svg { width: 18px; height: 18px; }
  .search.is-open {
    position: absolute; z-index: 6; top: 14px; left: var(--pad-page); right: var(--pad-page);
    width: auto; min-width: 0; height: 46px; padding: 9px 18px;
    justify-content: flex-start; border-radius: var(--radius-pill); box-shadow: var(--shadow-print);
  }
  .search.is-open input { display: block; }
  .wordmark { font-size: clamp(30px, 8.5vw, 46px); }
  .masthead__top { align-items: center; gap: 12px; }
  .nav {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 12px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .masthead.is-compact .nav { margin-top: 0; padding-top: 0; padding-right: 0; }
}

@media (max-width: 620px) {
  .filter-bar .spacer { display: none; }
  .byline-row .share { margin-left: 0; }
  .editor-top .save-state { display: none; }
}

@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; }
  .k-featured { grid-column: 1; }
  .section-label .rule { display: none; }
  /* fixed 300px card is wider than a phone → make it viewport-relative so a
     left gutter shows and the next card peeks in (reads as a slider) */
  .vcard { flex: 0 0 80vw; }
  .articles, .archive { grid-template-columns: 1fr; }
  .acard.lead { grid-column: auto; }
  .gallery { columns: 2; }
  .founders { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .footer-grid, .footer-base { flex-direction: column; text-align: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .row-actions { flex-wrap: wrap; }
  .page-head h1 { font-size: clamp(44px, 15vw, 72px); }
}
