/* ============================================================
   The Grey Area · design system dari brand pack.
   Cardo serif body 18px + Comfortaa (labels/buttons) + Caveat (signature).
   Satu accent taupe-gold #B8A88E. Editorial dark, book-feel.
   ============================================================ */

/* Comfortaa + Caveat from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Comfortaa:wght@400;500;600;700&display=swap');

/* Cardo self-hosted */
@font-face {
  font-family: "Cardo";
  src: url("/assets/fonts/Cardo-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("/assets/fonts/Cardo-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Cardo";
  src: url("/assets/fonts/Cardo-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* surfaces (dark → light) */
  --bg:    #0E0E10;
  --bg-2:  #141417;
  --bg-3:  #1C1C20;
  --bg-4:  #232328;
  --paper:   #ECE6DC;
  --paper-2: #DBD4C7;

  /* ink (text on dark) */
  --ink:   #F5F1EA;
  --ink-2: #C8C2B7;
  --ink-3: #8A857C;
  --ink-4: #555049;

  /* one accent — taupe-gold */
  --accent: #B8A88E;
  --gold:   #B8A88E; /* legacy alias */
  --gold-2: #D6C8AE;

  /* hairlines */
  --line:      rgba(245, 241, 234, 0.12);
  --line-2:    rgba(245, 241, 234, 0.18);
  --line-soft: rgba(245, 241, 234, 0.07);

  /* type */
  --serif:  "Cardo", "Times New Roman", Georgia, serif;
  --script: "Caveat", cursive;
  --sans:   "Comfortaa", ui-rounded, system-ui, sans-serif;
  --font-serif: var(--serif);   /* legacy alias */
  --font-sans:  var(--sans);    /* legacy alias */

  /* layout */
  --maxw: 720px;
  --gut:  24px;
  --radius: 6px;
  --radius-lg: 6px;
  --radius-pill: 999px;

  /* status colors — subdued */
  --ok:   #8BAE94;
  --warn: #D6C8AE;
  --err:  #C78E8E;
  --red:  #B11217; /* sale only */
  --cream: var(--paper);
  --bg-elev: var(--bg-2);
  --bg-card: var(--bg-3);
}

/* ---- base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1.05rem; }

/* .ro = "roman-off" — italic phrase within a headline, muted color */
.ro, em, .italic {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-2);
}

p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
small, .small { font-size: .82rem; color: var(--ink-3); }

/* Eyebrow: Comfortaa uppercase small caps */
.eyebrow {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
  display: inline-block; margin-bottom: 14px;
}

/* Spectrum divider — signature motif */
.spectrum {
  height: 2px; width: 100%; margin: 60px 0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--accent) 45%, var(--paper) 100%);
  border: none; opacity: .85;
}

/* Script signature */
.signature {
  font-family: var(--script); font-size: 2.2rem; color: var(--accent);
  line-height: 1; font-weight: 600;
}

/* ---- primitives ---- */
.wrap, .container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.container-wide { max-width: 1080px; }
.container-narrow { max-width: 560px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius-pill);
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--paper); background: var(--paper); color: var(--bg);
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #FFFAF0; color: var(--bg); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink-2); }
.btn-outline:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); background: transparent; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn .arrow, .btn .arw { font-family: var(--serif); font-style: normal; font-size: 1rem; letter-spacing: 0; }

/* ---- cards ---- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--ink-2);
  background: transparent;
}
.pill-ok { color: var(--ok); border-color: rgba(139,174,148,.4); }
.pill-warn { color: var(--warn); border-color: rgba(214,200,174,.4); }
.pill-err { color: var(--err); border-color: rgba(199,142,142,.4); }

/* ---- price ---- */
.price {
  font-family: var(--serif); font-size: 1.8rem; font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em;
}
.price-strike { color: var(--ink-4); text-decoration: line-through; margin-left: 10px; font-size: 1.1rem; }
.price-sale { color: var(--red); }

/* ---- forms ---- */
label {
  display: block; font-family: var(--sans); font-size: 10px; color: var(--ink-3);
  letter-spacing: .22em; text-transform: uppercase; margin-bottom: 10px; font-weight: 600;
}
input[type=text], input[type=email], input[type=password], input[type=file], textarea, select {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg-3); color: var(--ink);
  font-family: var(--serif); font-size: 1rem;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
textarea { min-height: 100px; resize: vertical; }
input[type=file] { padding: 10px 12px; color: var(--ink-2); font-family: var(--sans); font-size: .9rem; }
.form-group { margin-bottom: 20px; }
.form-error { color: var(--err); font-size: .9rem; margin-top: 8px; }
.form-note { color: var(--ink-3); font-size: .82rem; margin-top: 8px; }

/* ---- hero ---- */
.hero { padding: 100px 0 60px; }
.hero .lead { font-size: 1.05rem; color: var(--ink-2); max-width: 560px; line-height: 1.6; }

/* ---- reader ---- */
.reader-page { background: var(--bg-2); padding: 40px 0 80px; }
.reader {
  background: var(--paper);
  color: #1A1614;
  padding: 60px clamp(24px, 6vw, 80px);
  max-width: 720px; margin: 40px auto;
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.75;
  position: relative;
  border-radius: var(--radius);
  user-select: none; -webkit-user-select: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.reader h1, .reader h2, .reader h3 { color: #1A1614; font-weight: 700; }
.reader .pill { color: #6B5F4A; border-color: #C8B893; }
.reader hr { border: none; border-top: 1px solid #C8B893; margin: 40px 0; }
.watermark {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  opacity: .07; overflow: hidden;
}
.watermark span {
  transform: rotate(-30deg);
  font-family: var(--sans); font-size: 1rem; color: #1A1614;
  padding: 40px; white-space: nowrap;
}

/* ---- admin table ---- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
th {
  font-weight: 600; color: var(--ink-3); background: var(--bg-2);
  letter-spacing: .18em; text-transform: uppercase; font-size: 10px; font-family: var(--sans);
}

/* ============================================================
   Page transitions
   ============================================================ */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: cubic-bezier(.32,.72,0,1);
}
::view-transition-old(root) { animation-name: pageOut; }
::view-transition-new(root) { animation-name: pageIn; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pageOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-4px); } }
.pub, .shell, .gate {
  animation: pageIn .28s cubic-bezier(.32,.72,0,1) both;
}
.pub-nav, .shell-side { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .pub, .shell, .gate { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 1ms; }
}
.pub-nav { view-transition-name: pub-nav; }
::view-transition-old(pub-nav), ::view-transition-new(pub-nav) { animation-duration: 0ms; }

/* ============================================================
   Public shell — multi-section nav
   ============================================================ */
.pub { background: var(--bg); min-height: 100vh; }
.pub-nav {
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  position: sticky; top: 0; z-index: 50;
}
.pub-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 32px; max-width: 1180px; margin: 0 auto; gap: 20px;
  height: 64px;
}
.pub-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 17px; font-style: italic;
  color: var(--ink); text-decoration: none; letter-spacing: -.005em;
}
.pub-brand img { width: 24px; height: 24px; object-fit: contain; }

.pub-nav-center { display: flex; gap: 28px; align-items: center; }
.pub-nav-center a {
  color: var(--ink-2); text-decoration: none; padding: 6px 0; position: relative;
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .06em;
}
.pub-nav-center a:hover { color: var(--ink); }
.pub-nav-center a.active { color: var(--ink); }
.pub-nav-center a.active::after {
  content: ''; position: absolute; bottom: -19px; left: 0; right: 0;
  height: 2px; background: var(--accent);
}
.pub-nav-right { display: flex; gap: 16px; align-items: center; }
.pub-nav-right a { color: var(--ink-2); text-decoration: none; font-family: var(--sans); font-size: 12px; }
.pub-nav-right a:hover { color: var(--accent); }

.pub-mobile-toggle {
  display: none; background: transparent; border: 1px solid var(--line-2);
  color: var(--ink); padding: 8px 12px; border-radius: 4px; cursor: pointer;
  font-size: 1.1rem; line-height: 1;
}
.pub-mobile-menu { display: none; padding: 16px 24px 24px; border-top: 1px solid var(--line); }
.pub-mobile-menu a {
  display: block; padding: 12px 4px; color: var(--ink-2);
  text-decoration: none; font-family: var(--sans); font-size: 13px; border-bottom: 1px solid var(--line);
}
.pub-mobile-menu a:last-child { border-bottom: none; }
.pub-mobile-menu.open { display: block; }

.pub-main { max-width: 1180px; margin: 0 auto; padding: 60px 32px; }

.pub-footer { border-top: 1px solid var(--line); padding: 40px 32px; color: var(--ink-3); font-size: .85rem; }
.pub-footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.pub-footer h4 {
  font-family: var(--sans); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; font-weight: 600;
}
.pub-footer ul { list-style: none; padding: 0; margin: 0; }
.pub-footer li { margin-bottom: 8px; }
.pub-footer a { color: var(--ink-2); text-decoration: none; font-family: var(--sans); font-size: 12px; }
.pub-footer a:hover { color: var(--accent); }
.pub-footer-bottom {
  max-width: 1180px; margin: 32px auto 0; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--sans); font-size: 11px;
}

.pub-hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: center;
  padding: 60px 0 80px;
}
.pub-hero h1 { max-width: 14ch; }
.pub-hero-side {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
}

/* Editorial tile */
.tile {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 28px;
  transition: border-color .18s ease, transform .18s ease;
}
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile .kicker {
  font-family: var(--sans); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px; font-weight: 600;
}
.tile h3 { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 8px; }
.tile .excerpt { color: var(--ink-2); font-size: .95rem; line-height: 1.55; }
.tile-cover {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(400px 200px at 30% 20%, rgba(184,168,142,.28), transparent 65%),
    linear-gradient(135deg, var(--bg-3), var(--bg));
  border: 1px solid var(--line-2);
  border-radius: var(--radius); margin-bottom: 16px;
  display: flex; align-items: flex-end; padding: 16px;
  color: var(--accent); font-family: var(--serif); font-style: italic; font-size: 1rem;
}
.tile-cover.book       { background: radial-gradient(400px 200px at 30% 20%, rgba(214,200,174,.28), transparent 60%), linear-gradient(135deg, #2C231A, #0E0E10); }
.tile-cover.worksheet  { background: radial-gradient(400px 200px at 30% 20%, rgba(184,168,142,.25), transparent 60%), linear-gradient(135deg, #1E2320, #0E0E10); }
.tile-cover.bundle     { background: radial-gradient(400px 200px at 30% 20%, rgba(184,168,142,.28), transparent 60%), linear-gradient(135deg, #292226, #0E0E10); }
.tile-cover.article    { background: radial-gradient(400px 200px at 30% 20%, rgba(214,200,174,.22), transparent 60%), linear-gradient(135deg, #232019, #0E0E10); }

/* Section bands */
.band { padding: 80px 0; }
.band + .band { border-top: 1px solid var(--line); }
.band-tight { padding: 40px 0; }
.band-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
}
.band-head h2 { margin: 0; }
.band-head .action { font-family: var(--sans); color: var(--accent); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; font-weight: 600; }
.band-head .action:hover { color: var(--gold-2); }

/* FAQ accordion */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; font-family: var(--serif); font-size: 1.15rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 1.4rem; color: var(--accent); transition: transform .2s; font-family: var(--serif);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p, .faq details > div { color: var(--ink-2); margin-top: 12px; line-height: 1.7; }

/* Article body */
.article { max-width: 720px; margin: 0 auto; font-family: var(--serif); font-size: 1.15rem; line-height: 1.8; color: var(--ink); }
.article h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.article .meta {
  font-family: var(--sans); font-size: 10px; color: var(--ink-3);
  letter-spacing: .22em; text-transform: uppercase; margin-bottom: 40px; font-weight: 600;
}
.article p { margin-bottom: 1.4em; }
.article blockquote {
  border-left: 3px solid var(--accent); padding-left: 20px; margin: 24px 0;
  font-style: italic; color: var(--ink-2);
}

/* Testimonial card (new) */
.testi {
  display: grid; grid-template-columns: 60px 1fr; gap: 16px; align-items: start;
  padding: 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.testi img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.testi .quote { font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 1rem; line-height: 1.55; }
.testi .attr { font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; font-weight: 600; }

/* ============================================================
   App shell — authed
   ============================================================ */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.shell-side {
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px 20px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 24px;
  overflow-y: auto;
}
.shell-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 15px; font-style: italic;
  color: var(--ink); text-decoration: none;
}
.shell-brand img { width: 22px; height: 22px; object-fit: contain; }

.shell-user {
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; align-items: center; gap: 10px;
}
.shell-user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-4); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; font-family: var(--serif);
}
.shell-user .name { font-family: var(--serif); font-size: .95rem; color: var(--ink); line-height: 1.2; }
.shell-user .role { font-family: var(--sans); font-size: 9px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .18em; font-weight: 600; }

.shell-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.shell-nav .group-label {
  font-family: var(--sans); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-4); font-weight: 600;
  padding: 16px 12px 8px;
}
.shell-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius);
  color: var(--ink-2); text-decoration: none;
  font-family: var(--sans); font-size: 13px;
  transition: background .12s ease, color .12s ease;
}
.shell-nav a:hover { background: var(--bg-3); color: var(--ink); }
.shell-nav a.active { background: var(--bg-3); color: var(--ink); }
.shell-nav a .ico { width: 18px; text-align: center; opacity: .8; font-size: 1rem; font-family: var(--serif); }
.shell-nav a .count {
  margin-left: auto; font-size: 10px; padding: 2px 8px;
  border-radius: 999px; background: var(--bg-4); color: var(--ink-2);
  font-family: var(--sans); font-weight: 600;
}

.shell-main { min-width: 0; padding: 32px 40px 80px; }
.shell-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; gap: 20px; flex-wrap: wrap;
}
.shell-topbar h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.shell-topbar .sub { color: var(--ink-3); font-size: .95rem; margin-top: 4px; }

.shell.focus-mode .shell-side { display: none; }
.shell.focus-mode { grid-template-columns: 1fr; }

.section { margin-bottom: 40px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 1.35rem; }
.section-head .action { font-family: var(--sans); font-size: 11px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; text-decoration: none; }
.section-head .action:hover { color: var(--accent); }

.empty {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  padding: 32px; text-align: center; color: var(--ink-3);
}
.empty h3 { color: var(--ink-2); font-family: var(--serif); font-size: 1.1rem; margin: 0 0 8px; }

.continue-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.continue-card {
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease;
}
.continue-card:hover { border-color: var(--accent); }
.continue-card .kicker { font-family: var(--sans); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.continue-card .title { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.continue-card .meta { font-size: .85rem; color: var(--ink-3); }
.continue-card .progress {
  height: 3px; background: var(--line); border-radius: 999px; margin-top: 8px; overflow: hidden;
}
.continue-card .progress .bar { height: 100%; background: var(--accent); }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ---- auth gate ---- */
.gate {
  min-height: 100vh; display: grid; place-items: center;
  padding: 32px; background:
    radial-gradient(1200px 600px at 80% 20%, rgba(184,168,142,.06), transparent 60%),
    radial-gradient(800px 400px at 20% 80%, rgba(184,168,142,.03), transparent 60%),
    var(--bg);
}
.gate-card {
  max-width: 440px; width: 100%;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px;
}
.gate-brand {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  font-family: var(--serif); font-style: italic; color: var(--ink);
  text-decoration: none; font-size: 17px;
}
.gate-brand img { width: 24px; height: 24px; object-fit: contain; }
.gate h1 { font-size: 1.8rem; margin-bottom: 8px; }
.gate .sub { color: var(--ink-3); margin-bottom: 28px; font-size: .95rem; }
.tab-row { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab-row button {
  background: transparent; border: none; color: var(--ink-3); cursor: pointer;
  font-family: var(--sans); font-size: 11px; padding: 12px 0;
  border-bottom: 2px solid transparent; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 600;
}
.tab-row button.active { color: var(--ink); border-bottom-color: var(--accent); }

/* Responsive */
@media (max-width: 1080px) {
  .pub-nav-center { gap: 20px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .shell-side {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0;
    height: auto; padding: 8px 12px; border-right: none; border-top: 1px solid var(--line);
    flex-direction: row; gap: 4px; overflow-x: auto;
    background: var(--bg-2); z-index: 30;
  }
  .shell-brand, .shell-user, .shell-nav .group-label { display: none; }
  .shell-nav { flex-direction: row; gap: 4px; flex: 1; justify-content: space-around; }
  .shell-nav a { flex-direction: column; gap: 4px; padding: 8px 6px; font-size: 10px; min-width: 60px; text-align: center; }
  .shell-nav a .ico { font-size: 1.1rem; }
  .shell-nav a .count { display: none; }
  .shell-main { padding: 24px 20px 100px; }
}
@media (max-width: 620px) {
  .card { padding: 24px; }
  .reader { padding: 32px 24px; margin: 20px auto; }
  .container { padding: 0 20px; }
  .pub-hero { grid-template-columns: 1fr; gap: 32px; padding: 24px 0 40px; }
  .pub-main { padding: 32px 20px; }
  .pub-nav-center { display: none; }
  .pub-mobile-toggle { display: inline-block; }
  .pub-nav-inner { padding: 10px 20px; height: 56px; }
  .pub-brand span:last-child { display: none; } /* hide wordmark on mobile */
  .pub-nav-right { gap: 10px; }
  .pub-nav-right .btn {
    padding: 8px 14px !important;
    font-size: 10px !important;
    white-space: nowrap;
    letter-spacing: .12em;
  }
  .pub-mobile-toggle { padding: 6px 10px; font-size: 1rem; }
  .pub-footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .band { padding: 48px 0; }
  body { font-size: 17px; }
  h1 { font-size: clamp(1.9rem, 8vw, 2.6rem) !important; }
  h2 { font-size: clamp(1.4rem, 5.5vw, 1.9rem) !important; }
  /* Homepage-specific mobile */
  .home-main, .about-main, .p-main, .s-main, .ws-main {
    padding: 40px 20px !important;
  }
  .mission-card, .ws-cta-final, .s-contact, .p-cara {
    padding: 32px 24px !important;
  }
  .reflection-grid { grid-template-columns: 1fr !important; }
  .reflection-item { padding: 20px !important; }
  .author-block, .author-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    justify-items: center;
  }
  .author-block img, .author-grid img { max-width: 200px !important; margin: 0 auto; }
}

/* Helpers */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
.text-center { text-align: center; }
.gold, .accent-color { color: var(--accent); }
img { max-width: 100%; }
