/* Authentically Me Journal: sea and sand, liquid-glass panels over the shader gradient (fx.js). System fonts only (CSP).
   The palette lives here (tokens) and in journal.js DESIGN.colors (the moving background): retune both to the cover. */
:root {
  --primary: #2f6f7a; --primary-ink: #fff; --sea: #8fb8bd; --sand: #e8d9bf; --primary-soft: rgba(47, 111, 122, .12);
  --text: #2a2522; --muted: #5d5650; --line: rgba(42, 37, 34, .18); --surface: #fffaf2; --bg: #efe6d6;
  --label: #2f6f7a; --focus: #2f6f7a; --ok: #2f6f7a; --radius: 18px;
  --glass: rgba(255, 250, 242, .72); --edge: rgba(255, 255, 255, .7);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --text: #f2ece3; --muted: #c4bcb2; --line: rgba(255, 255, 255, .18); --surface: #152427; --bg: #0e1a1c;
    --primary-soft: rgba(143, 184, 189, .16); --label: #a9d0d4; --focus: #e8d9bf; --ok: #a9d0d4;
    --glass: rgba(14, 30, 33, .66); --edge: rgba(255, 255, 255, .16); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 17px/1.6 var(--font); color: var(--text); background: var(--bg);
  overflow-x: hidden; overflow-wrap: break-word; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; padding: 8px 14px; border-radius: 10px;
  background: var(--primary); color: var(--primary-ink); }
.skip:focus { top: 8px; }

/* ---------- top bar and navigation */
.topbar { z-index: 5; border-bottom: 1px solid var(--line); background: var(--surface); }
@media (min-width: 721px) { .topbar { position: sticky; top: 0; } }
.top-in { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 8px 12px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 600; font-family: var(--serif);
  font-size: 1.12rem; }
nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav a { text-decoration: none; padding: 6px 11px; border-radius: 999px; font-size: .95rem; min-height: 36px;
  display: inline-flex; align-items: center; }
nav a:hover { background: var(--primary-soft); }
nav a[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
main { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; outline: none; }
#banner { max-width: 980px; margin: 0 auto; padding: 0 16px; }
#banner:empty { display: none; }
footer.site { max-width: 980px; margin: 0 auto; padding: 0 16px 28px; font-size: .88rem; color: var(--muted); }

/* ---------- cards, choices, buttons */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; }
.hero { text-align: center; padding: 26px 20px 20px; }
.hero p { max-width: 580px; margin-left: auto; margin-right: auto; font-size: 1.06rem; }
.hero .eyebrow { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--label); font-weight: 700; margin-bottom: .3em; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.choice { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: transparent; min-height: 52px; }
.choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.choice b { font-family: var(--serif); font-weight: 600; display: block; font-size: 1.08rem; }
.choice small { display: block; color: var(--muted); }
.choice .kicker { display: block; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--label); font-weight: 700; }
.choice.soon { border-style: dashed; }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink); min-height: 44px; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; text-align: center; }
.btn.secondary { background: transparent; color: inherit; border: 1px solid var(--line); }
.btn.quiet { background: transparent; color: inherit; border: 0; text-decoration: underline; padding: 10px 8px; font-weight: 500; }
.btn.danger { background: #8a3b2e; color: #fff; }
.btn[aria-pressed="true"] { background: var(--primary-soft); color: inherit; box-shadow: 0 0 0 2px var(--primary) inset; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.spread { justify-content: space-between; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--primary-soft); font-size: .85rem; }
.label { font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; margin: 14px 0 4px; }
.done-box { padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); }
.note { font-size: .95rem; }
.sample { border: 2px dashed var(--sea); padding: 10px 16px; margin: 14px 0 0; font-size: .95rem; text-align: center; }
.empty { color: var(--muted); font-style: italic; }

/* ---------- practice steps */
.steps { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: s; }
.steps li { counter-increment: s; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; border-bottom: 1px solid var(--line); }
.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; accent-color: var(--primary); }
.steps .check span::before { content: counter(s) ". "; font-weight: 700; }
.check input:checked + span { color: var(--muted); }
.steps .check input:checked + span { text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- forms */
.field-wrap { display: grid; gap: 4px; margin: 10px 0; }
label.field, .legend { font-weight: 600; font-size: .95rem; }
input[type=text], input[type=date], textarea, select { font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: 44px; width: 100%; max-width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.fields { display: grid; gap: 4px 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
fieldset { border: 0; padding: 0; margin: 10px 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); font-size: .95rem; }
.seg input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.q-item { padding: 10px 0 6px; border-top: 1px solid var(--line); }
.q-item:first-of-type { border-top: 0; }
.q-item label { font-family: var(--serif); font-size: 1.08rem; font-weight: 400; display: block; margin-bottom: 6px; }
.add { display: grid; gap: 4px 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; }
.add .btn { width: 100%; }

/* ---------- lists (tolerate, release, receiving, roles) */
.items { list-style: none; padding: 0; margin: 8px 0 0; }
.items li { padding: 12px 0; border-top: 1px solid var(--line); }
.items li p { margin: 0 0 4px; }
.items .meta { font-size: .88rem; color: var(--muted); }
.items .row { margin-top: 6px; }
.status { min-height: 1.4em; margin: 8px 0 0; }

/* ---------- progress without streaks */
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 12px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--sea)); }
.days { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; max-width: 420px; }
.days b { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  font-size: .72rem; font-weight: 600; color: var(--muted); }
.days b.on { background: var(--sea); border-color: var(--primary); color: #12343a; }
.plan-list .check { border-bottom: 1px solid var(--line); }
.plan-list .check b { font-family: var(--serif); }
.result { font-family: var(--serif); font-size: 1.25rem; }

/* ---------- dialog */
dialog { border: 1px solid var(--line); border-radius: 20px; padding: 22px; max-width: min(92vw, 460px); color: var(--text);
  background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(14, 26, 28, .5); }
dialog h2 { font-size: 1.3rem; }

/* ---------- shader gradient, liquid glass, liquid logo (fx.js) */
.fx-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; pointer-events: none; }
.fx-bg.hidden { display: none; }
body.fx-on { background: transparent; }
body.fx-on.fx-nogl { background: radial-gradient(120% 80% at 10% 0%, var(--primary) 0%, transparent 60%),
  radial-gradient(90% 70% at 100% 30%, var(--sea) 0%, transparent 55%), var(--sand); }
body.fx-on .card, body.fx-on .topbar {
  position: relative; background: var(--glass); border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(255, 255, 255, .18), 0 10px 34px rgba(20, 45, 50, .16);
}
body.fx-on .card { border-radius: 22px; overflow: hidden; }
body.fx-on.fx-refract .card.glass-hero { backdrop-filter: url(#fx-liquid) blur(16px) saturate(160%); }
body.fx-on .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .18) 100%); }
body.fx-on .card > * { position: relative; }
body.fx-on .topbar { border-width: 0 0 1px; }
body.fx-on footer.site { color: var(--text); }
body.fx-on footer.site p { background: var(--glass); border-radius: 16px; padding: 12px 16px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.liquid-logo { display: block; width: 104px; height: 104px; margin: 0 auto 10px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .25)); }
img.liquid-logo { border-radius: 26px; }
@media (max-width: 720px) {
  h1 { font-size: 1.75rem; } .liquid-logo { width: 84px; height: 84px; }
  nav a { padding: 5px 9px; font-size: .9rem; }
  .card { padding: 16px; }
  .brand span { font-size: 1.02rem; }
}
@media (prefers-color-scheme: dark) {
  body.fx-on .card, body.fx-on .topbar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 34px rgba(0, 0, 0, .35); }
  body.fx-on .card::before { background: linear-gradient(125deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 40%); }
  .days b.on { color: #0e2a2e; }
  .btn.danger { background: #b5503f; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
