/* ============================================================
   Yoreate — eight weather states, one quiet product.
   Every color routes through variables; [data-theme] swaps the
   whole atmosphere. The deck artwork stays constant — the cards
   are physical objects, the world around them changes.
   ============================================================ */

:root {
  /* -------- Moonlit Sea (default) -------- */
  --bg-0: #080d19;
  --bg-1: #0e1527;
  --bg-2: #151e32;
  --panel: #172138;
  --panel-2: #1d2942;
  --panel-hi: rgba(27, 38, 62, 0.94);
  --panel-lo: rgba(14, 22, 39, 0.94);
  --line: rgba(188, 198, 218, 0.15);
  --line-accent: rgba(195, 166, 116, 0.28);

  --heading: #f5f2ea;
  --text: #e6e8ee;
  --text-soft: #b2bacb;
  --mist: #8994a8;

  --accent: #c6a674;
  --accent-hi: #ddc79e;
  --accent-deep: #9b7d54;
  --accent-ink: #d1b584;
  --accent-glow: rgba(198, 166, 116, 0.22);
  --on-accent: #17130e;

  --sky-glow: #26355e;
  --sky-top: #0c1226;
  --sky-mid: #101a36;
  --sky-bot: #0d1530;

  --shadow: rgba(4, 7, 18, 0.9);
  --grain-opacity: 0.05;

  /* type */
  --serif: "Cormorant Garamond", "Songti SC", Georgia, serif;
  --sans:  "Inter", "PingFang SC", -apple-system, sans-serif;

  --radius: 12px;
  --container: 1140px;
}

/* -------- Firefly Pond — ink green, amber light -------- */
:root[data-theme="lotus"] {
  --bg-0: #090e09;
  --bg-1: #0d130d;
  --bg-2: #111a12;
  --panel: #152016;
  --panel-2: #1a281c;
  --panel-hi: rgba(27, 40, 29, 0.92);
  --panel-lo: rgba(16, 24, 17, 0.92);
  --line: rgba(168, 196, 170, 0.13);
  --line-accent: rgba(216, 182, 120, 0.28);

  --heading: #f1efe3;
  --text: #e7e6da;
  --text-soft: #adb6a8;
  --mist: #7e8a7a;

  --accent: #d8b678;
  --accent-hi: #eed3a0;
  --accent-deep: #a9854f;
  --accent-ink: #d8b678;
  --accent-glow: rgba(216, 182, 120, 0.3);
  --on-accent: #221a0e;

  --sky-glow: #22301f;
  --sky-top: #0a100a;
  --sky-mid: #0f1810;
  --sky-bot: #0b120c;

  --shadow: rgba(3, 7, 4, 0.9);
  --grain-opacity: 0.06;
}

/* -------- Morning Paper — warm cream, first light -------- */
:root[data-theme="dawn"] {
  --bg-0: #ded5c5;
  --bg-1: #eee8dc;
  --bg-2: #e8dfd0;
  --panel: #f6f1e8;
  --panel-2: #eee6d9;
  --panel-hi: rgba(248, 244, 236, 0.94);
  --panel-lo: rgba(235, 227, 214, 0.94);
  --line: rgba(98, 88, 70, 0.16);
  --line-accent: rgba(132, 101, 68, 0.3);

  --heading: #2f2a23;
  --text: #40382e;
  --text-soft: #665e52;
  --mist: #6f665a;

  --accent: #a77f55;
  --accent-hi: #c19c70;
  --accent-deep: #a17a52;
  --accent-ink: #795936;
  --accent-glow: rgba(137, 100, 62, 0.18);
  --on-accent: #21180f;

  --sky-glow: #f6e9cd;
  --sky-top: #f8f3e9;
  --sky-mid: #f4eddd;
  --sky-bot: #efe7d4;

  --shadow: rgba(86, 72, 52, 0.34);
  --grain-opacity: 0.04;
}

/* -------- Lavender Dusk — dusty mauve, silk veil -------- */
:root[data-theme="lavender"] {
  --bg-0: #d8d0d6;
  --bg-1: #e9e3e7;
  --bg-2: #ded6dd;
  --panel: #f3eef1;
  --panel-2: #e9e1e6;
  --panel-hi: rgba(246, 241, 244, 0.94);
  --panel-lo: rgba(227, 217, 223, 0.94);
  --line: rgba(78, 65, 74, 0.16);
  --line-accent: rgba(128, 96, 108, 0.28);

  --heading: #342f34;
  --text: #433d43;
  --text-soft: #6b626a;
  --mist: #725c64;

  --accent: #80636d;
  --accent-hi: #856a74;
  --accent-deep: #684d58;
  --accent-ink: #745965;
  --accent-glow: rgba(133, 101, 113, 0.18);
  --on-accent: #ffffff;

  --sky-glow: #e3d9df;
  --sky-top: #eee8eb;
  --sky-mid: #e5dce2;
  --sky-bot: #d9cfd6;

  --shadow: rgba(75, 59, 69, 0.3);
  --grain-opacity: 0.035;
}

/* -------- Ink & Water — pale blue, flowing -------- */
:root[data-theme="aqua"] {
  --bg-0: #d9e6f0;
  --bg-1: #eef4f9;
  --bg-2: #e2ecf4;
  --panel: #fbfdff;
  --panel-2: #f0f6fb;
  --panel-hi: rgba(251, 253, 255, 0.92);
  --panel-lo: rgba(237, 244, 250, 0.92);
  --line: rgba(60, 88, 120, 0.16);
  --line-accent: rgba(61, 111, 168, 0.34);

  --heading: #22354b;
  --text: #2d3f55;
  --text-soft: #54687e;
  --mist: #8095aa;

  --accent: #4a7ab0;
  --accent-hi: #6f9cc9;
  --accent-deep: #33608f;
  --accent-ink: #33608f;
  --accent-glow: rgba(74, 122, 176, 0.25);
  --on-accent: #ffffff;

  --sky-glow: #dcebf7;
  --sky-top: #f2f7fb;
  --sky-mid: #e8f1f8;
  --sky-bot: #dfeaf3;

  --shadow: rgba(50, 80, 110, 0.3);
  --grain-opacity: 0.03;
}

/* -------- Clear Sky — noon blue, sun gold -------- */
:root[data-theme="sunny"] {
  --bg-0: #d3e4f1;
  --bg-1: #f0f7fc;
  --bg-2: #e3eef8;
  --panel: #fcfeff;
  --panel-2: #f1f7fc;
  --panel-hi: rgba(252, 254, 255, 0.92);
  --panel-lo: rgba(235, 244, 251, 0.92);
  --line: rgba(70, 100, 130, 0.16);
  --line-accent: rgba(196, 148, 58, 0.4);

  --heading: #1f3347;
  --text: #2b4257;
  --text-soft: #52708a;
  --mist: #7f96ab;

  --accent: #d9a13e;
  --accent-hi: #ecc06a;
  --accent-deep: #b07f27;
  --accent-ink: #a2751f;
  --accent-glow: rgba(217, 161, 62, 0.32);
  --on-accent: #2b2110;

  --sky-glow: #fdeec8;
  --sky-top: #ecf5fb;
  --sky-mid: #dfedf8;
  --sky-bot: #d5e7f4;

  --shadow: rgba(60, 90, 120, 0.32);
  --grain-opacity: 0.03;
}

/* -------- Evening Rain — slate glass, silver mist -------- */
:root[data-theme="rain"] {
  --bg-0: #111720;
  --bg-1: #18202b;
  --bg-2: #202a36;
  --panel: #242f3c;
  --panel-2: #2b3847;
  --panel-hi: rgba(43, 56, 72, 0.94);
  --panel-lo: rgba(23, 31, 42, 0.94);
  --line: rgba(176, 190, 202, 0.15);
  --line-accent: rgba(145, 170, 189, 0.28);

  --heading: #edf0f2;
  --text: #e0e5e9;
  --text-soft: #abb6bf;
  --mist: #8998a3;

  --accent: #91aabd;
  --accent-hi: #b9cad5;
  --accent-deep: #6f899c;
  --accent-ink: #a6bac8;
  --accent-glow: rgba(145, 170, 189, 0.18);
  --on-accent: #101820;

  --sky-glow: #26344a;
  --sky-top: #131822;
  --sky-mid: #171e2c;
  --sky-bot: #141a27;

  --shadow: rgba(3, 6, 12, 0.9);
  --grain-opacity: 0.05;
}

/* -------- Quiet Overcast — dove grey, silver light -------- */
:root[data-theme="overcast"] {
  --bg-0: #d6dade;
  --bg-1: #eef0f2;
  --bg-2: #e3e6ea;
  --panel: #fafbfc;
  --panel-2: #f0f2f4;
  --panel-hi: rgba(250, 251, 252, 0.92);
  --panel-lo: rgba(233, 236, 239, 0.92);
  --line: rgba(80, 90, 100, 0.15);
  --line-accent: rgba(109, 122, 137, 0.35);

  --heading: #30363d;
  --text: #3e444c;
  --text-soft: #646c76;
  --mist: #8c939d;

  --accent: #8d9aa8;
  --accent-hi: #adb9c6;
  --accent-deep: #6d7a89;
  --accent-ink: #5f6c7b;
  --accent-glow: rgba(141, 154, 168, 0.3);
  --on-accent: #ffffff;

  --sky-glow: #f7f8f9;
  --sky-top: #f0f2f4;
  --sky-mid: #e8ebee;
  --sky-bot: #e0e4e8;

  --shadow: rgba(70, 80, 90, 0.3);
  --grain-opacity: 0.035;
}

/* ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- type ---------- */

h1, h2, blockquote { font-family: var(--serif); font-weight: 400; color: var(--heading); }

h1 { font-size: clamp(2.8rem, 5.6vw, 4.4rem); line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.2; }
h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--heading); }
h4 { font-family: var(--sans); font-size: 0.95rem; font-weight: 550; color: var(--text); }

p { color: var(--text-soft); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, summary):focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.1rem;
}

.lede { font-size: 1.06rem; max-width: 30em; margin-top: 1.5rem; }

.label {
  display: block;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.35rem;
}

.dim { color: var(--mist); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.8em 1.8em;
  border-radius: 9px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}

.btn-gold {
  color: var(--on-accent);
  background: linear-gradient(115deg, var(--accent-deep), var(--accent) 58%, var(--accent-hi));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-hi) 40%, transparent) inset,
              0 6px 24px -8px var(--accent-glow);
}
.btn-gold:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-hi) 55%, transparent) inset,
              0 8px 32px -8px var(--accent-glow);
  filter: saturate(0.92) brightness(1.04);
  transform: translateY(-1px);
}

.btn-sm { padding: 0.62em 1.3em; font-size: 0.84rem; }

.link-quiet {
  font-size: 0.9rem;
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-accent);
  padding-bottom: 3px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.link-quiet:hover { color: var(--accent-ink); border-color: var(--accent); }
.link-quiet .arrow { display: inline-block; transition: transform 0.25s ease; }
.link-quiet:hover .arrow { transform: translateX(4px); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-1) 80%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.6s ease;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--heading);
  text-decoration: none;
}

.wordmark-sigil { color: var(--accent); font-size: 0.85em; }

.nav-links { display: flex; gap: clamp(1.15rem, 2vw, 2.2rem); }
.nav-links a {
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent-ink); }

.mobile-menu-toggle,
.mobile-nav {
  display: none;
}

.mobile-menu-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-accent);
  border-radius: 50%;
  background: var(--panel);
  color: var(--heading);
  cursor: pointer;
  place-items: center;
}

.mobile-menu-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease;
}
.mobile-menu-toggle span:first-child { transform: translate(-50%, -4px); }
.mobile-menu-toggle span:last-child { transform: translate(-50%, 4px); }
.mobile-menu-toggle[aria-expanded="true"] span:first-child { transform: translate(-50%, 0) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:last-child { transform: translate(-50%, 0) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 0.75rem clamp(20px, 4vw, 48px) 1.25rem;
  background: color-mix(in srgb, var(--bg-1) 96%, transparent);
  box-shadow: 0 24px 48px -32px var(--shadow);
}

.mobile-nav a:not(.btn) {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.92rem;
  text-decoration: none;
}

.mobile-nav a[aria-current="page"] { color: var(--accent-ink); }
.mobile-nav .btn { display: block; margin-top: 1rem; text-align: center; }

/* ---------- hero ---------- */

/* The fixed scene remains behind every content surface. */
main { position: relative; }

.hero-grid,
main > section:not(.hero),
.footer {
  position: relative;
  z-index: 2;
}

.hero {
  position: relative;
  z-index: 1;
  padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(5rem, 10vw, 8.5rem);
  /* transparent — the fixed scene shows through raw here */
}

.hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.hero-actions { display: flex; align-items: center; gap: 1.7rem; margin-top: 2.3rem; }

.hero-note {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  color: var(--mist);
  letter-spacing: 0.05em;
}

/* ---------- Today's Pull card ---------- */

.pull-card {
  background: linear-gradient(165deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--line-accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.4rem;
  backdrop-filter: blur(6px);
  box-shadow:
    0 30px 70px -30px var(--shadow),
    0 0 90px -30px var(--accent-glow);
}

.pull-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
  margin-bottom: 1.1rem;
}

.pull-title { font-family: var(--serif); font-size: 1.25rem; color: var(--heading); }
.pull-date  { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-ink); }

.pull-question p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.35;
  color: var(--heading);
}

.pull-cards {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.3rem 0 1.2rem;
}

.tcard { width: 96px; aspect-ratio: 3 / 5; display: block; filter: drop-shadow(0 10px 22px var(--shadow)); }
.tcard.xs { width: 64px; }
.tcard.dot { width: 34px; flex: none; }

.pull-cards .tcard { transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.45s ease; }
.pull-cards .tilt-l { transform: rotate(-5deg) translateY(4px); }
.pull-cards .tilt-r { transform: rotate(5deg) translateY(4px); }
.pull-cards .lift   { transform: translateY(-4px); }
.pull-cards .tcard:hover {
  transform: translateY(-10px);
  filter: drop-shadow(0 16px 30px var(--shadow)) drop-shadow(0 0 18px var(--accent-glow));
}

.pull-reflection p { font-size: 0.9rem; line-height: 1.65; }

.pull-foot {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.revisit-pill {
  font-size: 0.76rem;
  color: var(--accent-ink);
  border: 1px solid var(--line-accent);
  border-radius: 999px;
  padding: 0.32em 1em;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* ---------- ribbon ---------- */

.ribbon {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg-0) 72%, transparent),
    color-mix(in srgb, var(--bg-2) 76%, transparent));
  padding: clamp(2.6rem, 5vw, 3.6rem) 0;
  transition: background 0.6s ease;
}

.ribbon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
}

.ribbon-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 1rem;
  row-gap: 0.25rem;
  align-items: start;
}
.ribbon-item .ricon { grid-row: 1 / 3; }
.ribbon-item h3, .ribbon-item p { grid-column: 2; }

.ricon {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent) 3%, transparent));
}
.ricon svg { width: 22px; height: 22px; }

.ribbon-item h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 550; }
.ribbon-item p { font-size: 0.82rem; margin-top: 0.25rem; color: var(--mist); }

/* ---------- dashboard ---------- */

.dashboard {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg-2) 72%, transparent),
    color-mix(in srgb, var(--bg-1) 74%, transparent));
  transition: background 0.6s ease;
}

.section-head { max-width: 42em; margin-bottom: clamp(2.5rem, 5vw, 3.8rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub { margin-top: 1.1rem; }

.app-frame {
  border: 1px solid var(--line-accent);
  border-radius: 16px;
  background: var(--bg-2);
  box-shadow:
    0 50px 110px -50px var(--shadow),
    0 0 120px -40px var(--accent-glow);
  overflow: hidden;
}

.app-chrome {
  display: flex;
  gap: 7px;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-0) 50%, transparent);
}
.app-chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-accent); opacity: 0.7; }

.app-body { display: grid; grid-template-columns: 200px 1fr; min-height: 460px; }

.app-side {
  border-right: 1px solid var(--line);
  padding: 1.4rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background: color-mix(in srgb, var(--bg-0) 40%, transparent);
}

.app-logo { font-family: var(--serif); font-size: 1.05rem; color: var(--accent-ink); }

.app-nav { display: grid; gap: 0.25rem; }

.app-link {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 0.45em 0.8em;
  border-radius: 7px;
}
.app-link.active {
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent-ink);
  border: 1px solid var(--line-accent);
}
.app-link.dim { margin-top: auto; color: var(--mist); }

.app-main { padding: 1.6rem 1.8rem; }

.app-greeting h4 { font-family: var(--serif); font-size: 1.45rem; font-weight: 400; color: var(--heading); }
.app-greeting .sigil { color: var(--accent); font-size: 0.8em; }
.app-greeting p { font-size: 0.82rem; color: var(--mist); margin-top: 0.15rem; }

.app-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.1rem;
  margin-top: 1.3rem;
}

.app-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 1.1rem 1.2rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}
.panel-head .dim { font-size: 0.75rem; }

.panel-q {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--heading);
  margin-bottom: 0.8rem;
}

.panel-cards { display: flex; gap: 0.55rem; margin-bottom: 0.9rem; }

.panel-r { font-size: 0.8rem; margin-bottom: 1rem; }

.app-btn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--on-accent);
  background: linear-gradient(105deg, var(--accent-deep), var(--accent) 55%, var(--accent-hi));
  border-radius: 7px;
  padding: 0.5em 1.1em;
}
.app-btn.ghost {
  background: transparent;
  color: var(--accent-ink);
  border: 1px solid var(--line-accent);
}

.revisit-list { list-style: none; display: grid; gap: 0.65rem; margin-bottom: 1rem; }

.revisit-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.55rem 0.75rem;
  background: color-mix(in srgb, var(--bg-0) 30%, transparent);
}

.revisit-list strong { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text); }
.revisit-list .dim { font-size: 0.7rem; }
.chev { margin-left: auto; color: var(--accent); font-size: 1.1rem; }

.app-recent { margin-top: 1.2rem; }

.recent-row { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.5rem; }

.recent-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  font-size: 0.78rem;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.55em 0.95em;
  background: var(--panel);
}
.recent-chip i { color: var(--accent-ink); font-style: normal; }
.recent-chip em { font-style: normal; color: var(--mist); font-size: 0.9em; }

.dash-points {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
}

.dash-point { border-top: 1px solid var(--line-accent); padding-top: 1rem; }
.dash-point p { font-size: 0.82rem; color: var(--mist); margin-top: 0.25rem; }

/* ---------- decks ---------- */

.decks {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  background:
    radial-gradient(ellipse 50% 60% at 82% 50%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 65%),
    linear-gradient(to bottom,
      color-mix(in srgb, var(--bg-1) 68%, transparent),
      color-mix(in srgb, var(--bg-2) 72%, transparent));
  border-top: 1px solid var(--line);
  transition: background 0.6s ease;
}

.decks-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.decks-copy > p { margin-top: 1.2rem; max-width: 32em; }

.feature-list { list-style: none; margin-top: 2rem; display: grid; gap: 1.4rem; }

.feature-list li {
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
  transition: border-color 0.3s ease;
}
.feature-list li:hover { border-left-color: var(--accent); }
.feature-list p { font-size: 0.86rem; margin-top: 0.2rem; color: var(--mist); }

.decks-fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
}

.fan-glow {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  opacity: 0.5;
  filter: blur(10px);
  animation: fan-breathe 7s ease-in-out infinite;
}

@keyframes fan-breathe {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50%      { opacity: 0.55; transform: scale(1.05); }
}

.tcard.fan {
  width: clamp(120px, 13vw, 158px);
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fan-l { transform: rotate(-11deg) translate(26px, 14px); }
.fan-c { z-index: 2; transform: translateY(-8px); animation: card-float 8s ease-in-out infinite; }
.fan-r { transform: rotate(11deg) translate(-26px, 14px); }

.decks-fan:hover .fan-l { transform: rotate(-14deg) translate(10px, 10px); }
.decks-fan:hover .fan-r { transform: rotate(14deg) translate(-10px, 10px); }

@keyframes card-float {
  0%, 100% { transform: translateY(-8px); }
  50%      { transform: translateY(-16px); }
}

/* ---------- philosophy ---------- */

.philosophy {
  background: color-mix(in srgb, var(--bg-0) 70%, transparent);
  padding: clamp(5rem, 10vw, 8.5rem) 0;
  border-top: 1px solid var(--line);
  transition: background 0.6s ease;
}

.philosophy-inner { text-align: center; }

.moon-line {
  display: block;
  width: 1px;
  height: 60px;
  margin: 0 auto 2.6rem;
  background: linear-gradient(to bottom, transparent, var(--accent));
  box-shadow: 0 0 14px var(--accent-glow);
}

.philosophy blockquote p {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.45;
  color: var(--heading);
  font-style: italic;
  font-weight: 300;
}

.principles {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  text-align: left;
}

.principle { border-top: 1px solid var(--line-accent); padding-top: 1.2rem; }
.principle p { font-size: 0.86rem; color: var(--mist); margin-top: 0.5rem; }

/* ---------- begin ---------- */

.begin {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background:
    radial-gradient(ellipse 45% 55% at 50% 115%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    linear-gradient(to bottom,
      color-mix(in srgb, var(--bg-0) 70%, transparent),
      color-mix(in srgb, var(--bg-1) 74%, transparent));
  transition: background 0.6s ease;
}

.begin-inner { text-align: center; max-width: 44em; margin: 0 auto; }
.begin h2 { line-height: 1.3; }

.begin-form {
  margin-top: 2.4rem;
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.begin-form input {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.8em 1.3em;
  width: min(21rem, 100%);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.begin-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.begin-form input::placeholder { color: var(--mist); }

.begin-form button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.form-status {
  flex-basis: 100%;
  min-height: 1.4em;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--mist);
}

.form-status.is-error { color: #e7a6a6; }
.form-status.is-success { color: var(--accent-ink); }

.form-thanks {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent-ink);
}

/* ---------- auth ---------- */

.auth-section {
  min-height: calc(100svh - 72px);
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.auth-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.72fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.auth-copy { max-width: 34rem; }
.auth-copy .lede { max-width: 31rem; }

.auth-points {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-top: 2.3rem;
}

.auth-points li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.85rem;
  align-items: start;
  color: var(--text-soft);
}

.auth-points li > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-accent);
  border-radius: 50%;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.auth-points strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 550;
}

.auth-points small {
  display: block;
  margin-top: 0.12rem;
  color: var(--mist);
  font-size: 0.78rem;
  line-height: 1.55;
}

.auth-card {
  width: 100%;
  max-width: 31rem;
  justify-self: end;
  border: 1px solid var(--line-accent);
  border-radius: 18px;
  padding: clamp(1.25rem, 3vw, 1.8rem);
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 32px 90px -42px var(--shadow), 0 0 70px -40px var(--accent-glow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg-0) 28%, transparent);
}

.auth-tab {
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  background: transparent;
  color: var(--text-soft);
  font: 500 0.86rem/1.2 var(--sans);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.auth-tab:hover { color: var(--text); }
.auth-tab.active {
  color: var(--on-accent);
  background: linear-gradient(115deg, var(--accent-deep), var(--accent) 58%, var(--accent-hi));
  box-shadow: 0 4px 18px -10px var(--accent-glow);
}

.auth-panel {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.auth-panel[hidden] { display: none; }
.auth-form { display: grid; gap: 0.95rem; }

.auth-field {
  display: grid;
  gap: 0.38rem;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.auth-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.78rem 0.9rem;
  background: color-mix(in srgb, var(--panel-2) 88%, transparent);
  color: var(--text);
  font: 400 0.9rem/1.3 var(--sans);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.45;
  cursor: pointer;
}

.auth-check input {
  width: 15px;
  height: 15px;
  margin-top: 0.08rem;
  accent-color: var(--accent-deep);
  flex: none;
}

.auth-consent { margin: 0.15rem 0; }

.auth-forgot {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-ink);
  font: 500 0.76rem/1.3 var(--sans);
  cursor: pointer;
}

.auth-submit { width: 100%; margin-top: 0.15rem; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--mist);
  font-size: 0.72rem;
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.auth-provider {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.72rem 0.9rem;
  background: color-mix(in srgb, var(--panel-2) 58%, transparent);
  color: var(--text);
  font: 500 0.84rem/1.25 var(--sans);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-provider:hover {
  border-color: var(--line-accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
}

.auth-message {
  min-height: 2.8em;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: center;
}

.auth-message.is-preview { color: var(--accent-ink); }

/* ---------- foundation pages ---------- */

.legal-page,
.contact-page,
.not-found-page {
  min-height: calc(100vh - 72px);
}

.legal-shell,
.contact-inner,
.not-found-inner {
  position: relative;
  z-index: 2;
}

.legal-shell { max-width: 920px; }
.legal-hero { max-width: 700px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.legal-hero h1,
.contact-inner h1,
.not-found-inner h1 {
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.98;
}

.legal-intro,
.contact-inner > .lede,
.not-found-inner > .lede {
  max-width: 42rem;
  margin-top: 1.35rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.75;
}

.draft-badge {
  display: inline-flex;
  margin-top: 1.35rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--line-accent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--accent-ink);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-content {
  display: grid;
  gap: 1rem;
}

.legal-section,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 24px 60px -48px var(--shadow);
  backdrop-filter: blur(14px);
}

.legal-section { padding: clamp(1.4rem, 3vw, 2rem); }
.legal-section h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.2;
}
.legal-section p,
.legal-section li {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.75;
}
.legal-section p { margin-top: 0.7rem; }
.legal-section ul { margin: 0.7rem 0 0 1.15rem; }
.legal-section a,
.contact-card a { color: var(--accent-ink); }

.contact-inner,
.not-found-inner { max-width: 720px; }
.contact-card {
  max-width: 580px;
  margin-top: 2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
}
.contact-card .label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--mist);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-card a {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
.contact-card p {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.86rem;
  line-height: 1.7;
}
.not-found-inner .hero-actions { margin-top: 2rem; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-0) 92%, transparent);
  padding: 3rem 0 2.6rem;
  transition: background 0.6s ease;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-tag { margin-top: 0.6rem; font-size: 0.82rem; color: var(--mist); }

.footer-links { display: flex; gap: 1.8rem; }
.footer-links a { font-size: 0.82rem; color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--accent-ink); }

.footer-fine { font-size: 0.75rem; color: var(--mist); align-self: flex-end; }

/* ---------- pricing ---------- */

.nav-links a.active { color: var(--accent-ink); }

.hero-compact { padding: clamp(3.5rem, 6vw, 5.5rem) 0 clamp(3rem, 5.5vw, 5rem); }
.hero-compact-inner { position: relative; max-width: 44em; }

.page-title { font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.12; }

.plans-section {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 7vw, 6rem);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg-2) 72%, transparent),
    color-mix(in srgb, var(--bg-1) 74%, transparent));
  border-top: 1px solid var(--line);
  transition: background 0.6s ease;
}

.billing-wrap { text-align: center; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.billing-toggle button {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
  background: none;
  border: none;
  border-radius: 999px;
  padding: 0.55em 1.4em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  transition: background 0.25s ease, color 0.25s ease;
}

.billing-toggle button.active {
  color: var(--on-accent);
  background: linear-gradient(105deg, var(--accent-deep), var(--accent) 55%, var(--accent-hi));
}

.save-chip {
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-hi) 26%, transparent);
  color: inherit;
}
.billing-toggle button:not(.active) .save-chip {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-ink);
}

.billing-hint {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--accent-ink);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2.2vw, 1.8rem);
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.8rem 1.7rem 1.6rem;
}

.plan.featured {
  border-color: var(--line-accent);
  background: linear-gradient(170deg, var(--panel-hi), var(--panel-lo));
  box-shadow: 0 30px 70px -35px var(--shadow), 0 0 80px -30px var(--accent-glow);
}

.plan-badge {
  position: absolute;
  top: -0.85em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 550;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: linear-gradient(105deg, var(--accent-deep), var(--accent) 55%, var(--accent-hi));
  border-radius: 999px;
  padding: 0.35em 1.1em;
  white-space: nowrap;
}

.plan-name { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; color: var(--heading); }

.plan-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--mist);
  margin-top: 0.15rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin-top: 1.4rem;
}

.price-value {
  font-family: var(--serif);
  font-size: 2.7rem;
  line-height: 1;
  color: var(--heading);
}

.price-cycle { font-size: 0.85rem; color: var(--mist); }

.price-note {
  font-size: 0.78rem;
  color: var(--accent-ink);
  margin-top: 0.45rem;
  min-height: 1.2em;
}

.plan-list {
  list-style: none;
  margin: 1.4rem 0 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.7rem;
  flex: 1;
}

.plan-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.plan-list li strong { color: var(--text); font-weight: 550; }
.plan-list li::before {
  content: "✦";
  position: absolute;
  left: 0.1rem;
  top: 0.05em;
  font-size: 0.7em;
  color: var(--accent);
}

.plan-cta { text-align: center; }

.btn-ghost-plan {
  display: block;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: none;
  border: 1px solid var(--line-accent);
  border-radius: 9px;
  padding: 0.75em 1.4em;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn-ghost-plan:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }

.plans-note {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--mist);
  max-width: 40em;
  margin: clamp(1.8rem, 3.5vw, 2.6rem) auto 0;
}

.assure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  margin-top: clamp(2.4rem, 4.5vw, 3.6rem);
}

.assure-item { border-top: 1px solid var(--line-accent); padding-top: 1rem; }
.assure-item p { font-size: 0.82rem; color: var(--mist); margin-top: 0.25rem; }

/* faq */

.faq-section {
  padding: clamp(4rem, 7vw, 6rem) 0;
  background: color-mix(in srgb, var(--bg-1) 70%, transparent);
  border-top: 1px solid var(--line);
  transition: background 0.6s ease;
}

.faq { max-width: 46em; }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.15rem 0;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
  flex: none;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-ink); }

.faq details p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-soft);
  padding: 0 2.5rem 1.3rem 0;
}

/* ---------- theme dock ---------- */

.theme-dock { position: fixed; right: 20px; bottom: 20px; z-index: 95; }

.theme-toggle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--accent-ink);
  border: 1px solid var(--line-accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 34px -12px var(--shadow), 0 0 24px -8px var(--accent-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.6s ease;
}
.theme-toggle svg { width: 22px; height: 22px; }
.theme-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--shadow), 0 0 34px -8px var(--accent-glow); }

.theme-menu {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 236px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem;
  box-shadow: 0 24px 60px -24px var(--shadow);
  max-height: min(70vh, 540px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.theme-dock.open .theme-menu { opacity: 1; transform: none; pointer-events: auto; }

.theme-menu-title {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  padding: 0.4rem 0.6rem 0.55rem;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 450;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.theme-option:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.theme-option.active {
  border-color: var(--line-accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.theme-option em { display: block; font-style: normal; font-size: 0.68rem; color: var(--mist); }
.theme-option small { display: block; font-size: 0.68rem; color: var(--mist); }

.swatch {
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sa) 50%, var(--sb) 50%);
  border: 1px solid rgba(127, 127, 127, 0.3);
}

.theme-swatch {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sa) 50%, var(--sb) 50%);
  border: 1px solid rgba(127, 127, 127, 0.3);
}
.theme-option[data-theme="moonlit"] .theme-swatch { --sa: #0e1527; --sb: #c6a674; }
.theme-option[data-theme="lotus"] .theme-swatch { --sa: #0d130d; --sb: #d8b678; }
.theme-option[data-theme="dawn"] .theme-swatch { --sa: #eee8dc; --sb: #a77f55; }
.theme-option[data-theme="lavender"] .theme-swatch { --sa: #e9e3e7; --sb: #80636d; }
.theme-option[data-theme="aqua"] .theme-swatch { --sa: #eef4f9; --sb: #4a7ab0; }
.theme-option[data-theme="sunny"] .theme-swatch { --sa: #eaf4fb; --sb: #d9a13e; }
.theme-option[data-theme="rain"] .theme-swatch { --sa: #18202b; --sb: #91aabd; }
.theme-option[data-theme="overcast"] .theme-swatch { --sa: #eef0f2; --sb: #8d9aa8; }

/* ---------- reveal ---------- */

.reveal,
.js-enabled .reveal,
.js-enabled .reveal:not(.is-visible),
.js-enabled .reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}
.reveal { transition: none; }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal,
  .js-enabled .reveal:not(.is-visible),
  .js-enabled .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .fan-glow, .fan-c { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid, .decks-grid { grid-template-columns: 1fr; }
  .pull-card { max-width: 30rem; }
  .ribbon-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-points { grid-template-columns: repeat(2, 1fr); }
  .app-body { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; align-items: center; border-right: none; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .app-nav { display: flex; gap: 0.2rem; }
  .app-link.dim { margin: 0; }
  .principles { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .mobile-menu-toggle { display: grid; margin-left: auto; }
  .mobile-nav:not([hidden]) { display: block; }
  body.menu-open { overflow: hidden; }
  .plans { grid-template-columns: 1fr; max-width: 30rem; margin: 0 auto; }
  .plan.featured { order: -1; }
  .assure { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .auth-copy { max-width: 38rem; }
  .auth-card { max-width: 36rem; justify-self: start; }
}

@media (max-width: 560px) {
  .ribbon-grid { grid-template-columns: 1fr; }
  .app-columns { grid-template-columns: 1fr; }
  .dash-points { grid-template-columns: 1fr; }
  .hero-actions { flex-wrap: wrap; }
  .tcard { width: 78px; }
  .theme-dock { right: 14px; bottom: 14px; }
  .nav-inner > .btn { display: none; }
  .nav-inner { gap: 1rem; }
  .auth-section { padding: 3rem 0 4rem; }
  .auth-card { padding: 1.1rem; border-radius: 14px; }
  .auth-row { align-items: flex-start; }
  .legal-page,
  .contact-page,
  .not-found-page { padding: 3.5rem 0 4rem; }
  .footer-links { gap: 0.9rem 1.2rem; flex-wrap: wrap; }
}

/* ============================================================
   Journal app shell (app.html) — the member system.
   Lives inside the fixed atmosphere; every surface is a veil.
   All selectors j-prefixed or scoped to .jshell to avoid
   touching marketing-page rules.
   ============================================================ */

.app-body-page { min-height: 100vh; }

.jshell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 40px);
  gap: clamp(1.2rem, 3vw, 2.6rem);
}

/* ---------- sidebar ---------- */

.jside {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0 1.6rem;
}

.jside-mark { font-size: 1.3rem; }

.jnav { display: grid; gap: 0.3rem; }

.jnav-link {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 450;
  text-align: left;
  color: var(--text-soft);
  background: none;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.6em 0.9em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.jnav-link:hover { color: var(--accent-ink); }
.jnav-link.active {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--line-accent);
}

.jside-foot { margin-top: auto; display: grid; gap: 0.6rem; }

.jplan {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4em 0.9em;
  text-align: center;
}

.jside-action {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-soft);
  background: none;
  border: none;
  padding: 0.3em 0.2em;
  text-align: left;
  cursor: pointer;
}
.jside-action:hover { color: var(--accent-ink); }

/* ---------- main column ---------- */

.jmain { padding: 2.2rem 0 4rem; max-width: 640px; }

.jgreet h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  color: var(--heading);
}
.jgreet .sigil { color: var(--accent); font-size: 0.75em; }
.jgreet p { font-size: 0.85rem; margin-top: 0.2rem; }

.jview { margin-top: 1.6rem; display: grid; gap: 1.2rem; }

.jpanel {
  background: linear-gradient(165deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.5rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px -32px var(--shadow);
}

.jpanel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--heading);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
  margin-bottom: 1.1rem;
}

.jlabel {
  display: block;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0.9rem 0 0.4rem;
}
.jlabel.label-accent, .jshell .label-accent { color: var(--accent-ink); }

.jtext {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-0) 35%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75em 1em;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.jtext:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}
.jtext::placeholder { color: var(--mist); font-style: italic; }

.jdraw { margin-top: 1.2rem; }
.jnote { font-size: 0.8rem; color: var(--mist); margin-top: 0.9rem; }

/* ---------- deck & card backs ---------- */

.jdeck {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.6rem 0 0.4rem;
}

.jcard-back {
  display: block;
  width: 92px;
  aspect-ratio: 3 / 5;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, #d4af6e 55%, transparent);
  background:
    radial-gradient(circle at 50% 42%, rgba(212, 175, 110, 0.16), transparent 55%),
    linear-gradient(160deg, #1c2748, #10182e);
  box-shadow: inset 0 0 0 4px #131c36, inset 0 0 0 5px rgba(212, 175, 110, 0.3),
              0 12px 26px -12px var(--shadow);
  position: relative;
}
.jcard-back::after {
  content: "✦";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d4af6e;
  font-size: 1.1rem;
  opacity: 0.85;
}
.jdeck .tilt-l { transform: rotate(-6deg) translateY(5px); }
.jdeck .tilt-r { transform: rotate(6deg) translateY(5px); }
.jdeck .lift   { transform: translateY(-4px); }

.jcard { width: 132px; display: block; filter: drop-shadow(0 14px 28px var(--shadow)); }
.jcard.sm { width: 88px; }
.jcard.xs { width: 60px; }

/* ---------- the reveal flip ---------- */

.jreveal {
  width: 132px;
  aspect-ratio: 3 / 5;
  margin: 1.2rem auto 0.4rem;
  perspective: 900px;
}
.jreveal-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.25, 0.7, 0.25, 1);
}
.jreveal.is-flipped .jreveal-inner { transform: rotateY(180deg); }
.jface {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.jface-front.jcard-back { width: 100%; }
.jface-back { transform: rotateY(180deg); }
.jface-back .jcard { width: 100%; }

.jwhisper {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent-ink);
  margin-top: 0.7rem;
}

.jquestion-echo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--heading);
  margin-top: 0.4rem;
}

/* ---------- moods & chips ---------- */

.jmoods { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }

.jmood {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-soft);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 1em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.jmood:hover { border-color: var(--line-accent); }
.jmood.active {
  color: var(--accent-ink);
  border-color: var(--line-accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.jshell .chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.jshell .chip {
  font-size: 0.72rem;
  color: var(--accent-ink);
  border: 1px solid var(--line-accent);
  border-radius: 999px;
  padding: 0.18em 0.85em;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

/* ---------- done / entries / revisits ---------- */

.jdone { display: flex; gap: 1.2rem; align-items: flex-start; }
.jdone-card { flex: none; }
.jdone-text p { font-size: 0.9rem; line-height: 1.65; }

.jentry {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.jentry:last-child { border-bottom: none; }
.jentry-body { min-width: 0; flex: 1; }
.jentry-body header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
}
.jentry-body p { font-size: 0.88rem; line-height: 1.65; }

.jlookback-note {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-left: 2px solid var(--line-accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-radius: 0 9px 9px 0;
}
.jlookback-note p { margin-top: 0.3rem; }

.jrevisit { border-color: var(--line-accent); box-shadow: 0 24px 60px -32px var(--shadow), 0 0 60px -24px var(--accent-glow); }
.jrevisit-item { padding: 0.4rem 0 1.2rem; }
.jrevisit-item + .jrevisit-item { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.jrevisit-head { display: flex; gap: 1rem; margin-bottom: 0.4rem; }
.jrevisit-head strong { font-size: 0.92rem; font-weight: 550; color: var(--heading); }
.jrevisit-then { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.3rem; }

/* ---------- insights ---------- */

.jgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

.jbig {
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--heading);
}

.jshell .freq { list-style: none; display: grid; gap: 0.8rem; padding: 0; }
.jshell .freq li {
  display: grid;
  grid-template-columns: minmax(6em, auto) 1fr 2.4em;
  align-items: center;
  gap: 0.7em;
  font-size: 0.82rem;
}
.jshell .freq-name { color: var(--text); }
.jshell .freq-bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.jshell .freq-bar i { display: block; height: 100%; width: var(--w, 50%); background: var(--accent); border-radius: 2px; }
.jshell .freq-count { color: var(--mist); text-align: right; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .jshell { grid-template-columns: 1fr; }
  .jside {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.4rem;
    padding: 1.1rem 0 0.4rem;
  }
  .jnav { display: flex; gap: 0.2rem; }
  .jside-foot { margin: 0 0 0 auto; display: flex; gap: 1rem; align-items: center; }
  .jplan { order: 3; width: 100%; text-align: left; border: none; padding: 0; }
  .jmain { padding-top: 0.6rem; }
  .jgrid2 { grid-template-columns: 1fr; }
}

/* hidden must win over the view's display:grid */
.jview[hidden], .jshell [hidden] { display: none !important; }
