/* ==================================================================
   Zen Through Parables
   Design system: sumi ink on aged paper. One signature element — the
   ensō — which is also the timer. Everything else stays quiet.
   ================================================================== */

/* ---------- tokens ---------- */
:root {
  --paper:      #EDE7DC;
  --paper-2:    #E4DCCD;
  --paper-3:    #DCD3C1;
  --ink:        #1A1815;
  --ink-2:      #4C463C;
  --ink-3:      #8A8377;
  --seal:       #A63A2C;
  --seal-soft:  rgba(166, 58, 44, 0.12);
  --rule:       rgba(26, 24, 21, 0.14);
  --rule-soft:  rgba(26, 24, 21, 0.07);
  --shadow:     0 1px 2px rgba(26,24,21,.05), 0 12px 40px -24px rgba(26,24,21,.35);

  --f-display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --f-body:    "Spectral", Georgia, "Times New Roman", serif;
  --f-ui:      "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 34rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="night"] {
  --paper:      #131211;
  --paper-2:    #1B1917;
  --paper-3:    #24211D;
  --ink:        #E8E1D3;
  --ink-2:      #B0A796;
  --ink-3:      #7A7365;
  --seal:       #C85B4A;
  --seal-soft:  rgba(200, 91, 74, 0.14);
  --rule:       rgba(232, 225, 211, 0.16);
  --rule-soft:  rgba(232, 225, 211, 0.08);
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 16px 50px -30px rgba(0,0,0,.8);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; font-family: var(--f-ui); font-size: .8rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- paper grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  opacity: .34; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.30'/%3E%3C/svg%3E");
}
[data-theme="night"] .grain { mix-blend-mode: screen; opacity: .12; }

/* ---------- header ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .9rem var(--pad);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--rule-soft);
}
.wordmark {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--f-display); font-size: .95rem; font-weight: 500;
  letter-spacing: .04em; white-space: nowrap;
}
.wordmark .mark { color: var(--seal); display: grid; place-items: center; }
.wordmark .mark svg { transition: transform 1.2s var(--ease); }
.wordmark:hover .mark svg { transform: rotate(-18deg); }

.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a {
  font-family: var(--f-ui); font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); padding: .3rem 0; position: relative;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--seal); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

.bar__tools { display: flex; align-items: center; gap: .35rem; margin-left: .5rem; }
.nav:last-of-type { margin-left: auto; }
.bar__tools { margin-left: 0; }
.bar > .wordmark + .nav { margin-left: auto; }

.icon-btn {
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  color: var(--ink-2);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.icon-btn:hover { background: var(--rule-soft); color: var(--ink); }
.nav-toggle { display: none; }

/* ---------- main ---------- */
main { position: relative; z-index: 1; display: block; outline: none; }

/* ---------- home ---------- */
.home {
  min-height: calc(100svh - 3.6rem);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: clamp(2rem, 6vh, 4.5rem) var(--pad) clamp(2.5rem, 8vh, 5rem);
  text-align: center;
}

.hero__kicker {
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .34em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.enso-wrap {
  position: relative;
  width: min(74vw, 26rem); aspect-ratio: 1;
  display: grid; place-items: center;
}
.enso-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.enso__stroke {
  fill: none; stroke: var(--ink); stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: draw 1.9s var(--ease) .1s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.enso__dialog {
  position: relative; z-index: 1;
  width: 72%; margin: 0 auto;
  font-family: var(--f-display);
  font-size: clamp(.95rem, 2.6vw, 1.15rem);
  line-height: 1.75; font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
.enso__dialog em { font-style: normal; color: var(--seal); }
.enso__source {
  display: block; margin-top: .9rem;
  font-family: var(--f-ui); font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
}

.hero__path {
  display: flex; align-items: center; gap: clamp(.9rem, 3vw, 1.8rem);
  margin-top: clamp(2rem, 6vh, 3.4rem);
  font-family: var(--f-ui); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase;
}
.hero__path a { color: var(--ink-2); position: relative; padding-bottom: .25rem; transition: color .25s var(--ease); }
.hero__path a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; opacity: .22; transition: opacity .25s var(--ease), transform .35s var(--ease);
  transform-origin: left;
}
.hero__path a:hover { color: var(--ink); }
.hero__path a:hover::after { opacity: 1; }
.hero__path .sep { color: var(--ink-3); opacity: .5; font-size: .6rem; }

.hero__guide {
  margin-top: 1.9rem;
  font-family: var(--f-body); font-style: italic; font-size: .92rem;
  color: var(--seal);
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: border-color .3s var(--ease);
}
.hero__guide:hover { border-color: currentColor; }

.home__date {
  position: absolute; bottom: 1.6rem; left: 0; right: 0;
  font-family: var(--f-ui); font-size: .62rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--ink-3); opacity: .8;
}

/* ---------- library ---------- */
.sheet {
  max-width: 62rem; margin: 0 auto;
  padding: clamp(2.2rem, 6vh, 4rem) var(--pad) 6rem;
}
.sheet__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.sheet__eyebrow {
  font-family: var(--f-ui); font-size: .66rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--seal); margin-bottom: .8rem;
}
.sheet__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.15;
  letter-spacing: .01em;
}
.sheet__lede {
  margin-top: .9rem; max-width: 32rem;
  font-size: 1.02rem; color: var(--ink-2); line-height: 1.75;
}
.sheet__count {
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap; padding-bottom: .4rem;
}

.tools {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin: 2.2rem 0 0; padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.search {
  position: relative; flex: 1 1 16rem; min-width: 12rem;
}
.search input {
  width: 100%; padding: .55rem 0 .55rem 1.7rem;
  background: none; border: 0; border-bottom: 1px solid transparent;
  font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  transition: border-color .3s var(--ease);
}
.search input::placeholder { color: var(--ink-3); font-style: italic; }
.search input:focus { outline: none; border-bottom-color: var(--seal); }
.search svg {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}
.chips { display: flex; gap: .5rem; }
.chip {
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2);
  padding: .4rem .8rem; border: 1px solid var(--rule); border-radius: 999px;
  transition: all .25s var(--ease);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.list { display: grid; gap: 0; margin-top: .5rem; }
.entry {
  display: grid; grid-template-columns: 3.2rem 1fr auto;
  align-items: start; gap: 1.4rem;
  padding: 1.55rem .4rem 1.5rem;
  border-bottom: 1px solid var(--rule-soft);
  transition: background-color .3s var(--ease), padding-left .3s var(--ease);
}
.entry:hover { background: var(--rule-soft); padding-left: .9rem; }
.entry__num {
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .12em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
  padding-top: .45rem;
}
.entry__title {
  display: block;
  font-family: var(--f-display); font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  font-weight: 500; line-height: 1.35; letter-spacing: .005em;
}
.entry__opening {
  display: block; margin-top: .4rem; color: var(--ink-2); font-size: .95rem;
  line-height: 1.6; max-width: 40rem;
}
.entry__source {
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
  padding-top: .5rem; text-align: right;
}
.entry:hover .entry__title { color: var(--seal); }
.entry__title, .entry__opening, .entry__source { transition: color .25s var(--ease); }

.empty {
  padding: 4rem 0; text-align: center;
  font-family: var(--f-body); font-style: italic; color: var(--ink-3);
}

/* ---------- reader ---------- */
.reader {
  position: relative;
  max-width: 46rem; margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.4rem) var(--pad) 7rem;
}
.reader__back {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 2.4rem;
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.reader__back:hover { color: var(--seal); gap: .75rem; }

.reader__verso {
  position: absolute; left: calc(50% - 25.5rem); top: 13rem;
  writing-mode: vertical-rl; text-orientation: upright;
  font-family: var(--f-display); font-size: 1rem; letter-spacing: .3em;
  color: var(--ink-3); opacity: .38; user-select: none;
  line-height: 2.2;
}

.reader__head { border-bottom: 1px solid var(--rule); padding-bottom: 1.6rem; }
.reader__type {
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 1rem;
}
.reader__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.85rem, 5vw, 2.7rem); line-height: 1.18;
  letter-spacing: .005em; text-wrap: balance;
}
.reader__source {
  margin-top: .9rem; font-size: .9rem; font-style: italic; color: var(--ink-3);
}

.reader__body { margin-top: 2.2rem; max-width: var(--measure); }
.reader__body p {
  font-size: clamp(1.02rem, 1.5vw, 1.09rem);
  line-height: 1.88; color: var(--ink);
  margin-bottom: 1.35em; hanging-punctuation: first;
}
.reader__body p:first-of-type::first-letter {
  font-family: var(--f-display); float: left;
  font-size: 3em; line-height: .8; font-weight: 500;
  padding: .06em .1em 0 0; color: var(--seal);
}
.reader__body p:first-of-type { text-indent: 0; }

.reader__coda {
  margin-top: 2.8rem; padding: 1.6rem 0 0;
  border-top: 1px solid var(--rule);
  font-family: var(--f-display); font-size: 1.06rem; line-height: 1.75;
  color: var(--ink-2); max-width: var(--measure);
}
.reader__coda::before {
  content: "°"; display: block; color: var(--seal);
  font-size: 1.4rem; line-height: 1; margin-bottom: .7rem;
}
.reader__ask {
  margin-top: 2rem; max-width: var(--measure);
  padding: 1.3rem 1.4rem;
  background: var(--paper-2); border-left: 2px solid var(--seal);
}
.reader__ask-label {
  font-family: var(--f-ui); font-size: .62rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .55rem;
}
.reader__ask p { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.65; }

.reader__foot {
  margin-top: 3.4rem; padding-top: 1.6rem; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--f-ui); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
}
.reader__foot a { color: var(--ink-2); max-width: 45%; transition: color .25s var(--ease); }
.reader__foot a:hover { color: var(--seal); }
.reader__foot .dir { color: var(--ink-3); display: block; margin-bottom: .3rem; font-size: .6rem; }

/* ---------- sit / timer ---------- */
.sit {
  min-height: calc(100svh - 3.6rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(2rem, 5vh, 3.5rem) var(--pad) clamp(3rem, 7vh, 5rem);
  text-align: center;
}
.sit__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: .5rem;
}
.sit__sub {
  font-size: .95rem; color: var(--ink-3); font-style: italic; margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}

.dial { position: relative; width: min(74vw, 21.5rem); aspect-ratio: 1; display: grid; place-items: center; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial__track { fill: none; stroke: var(--rule); stroke-width: 1; }
.dial__prog {
  fill: none; stroke: var(--seal); stroke-width: 1.5; stroke-linecap: round;
  opacity: .45;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .35s linear, opacity .4s var(--ease);
}
.dial__enso { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; opacity: .92; }
.dial__time {
  position: relative; z-index: 1;
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 3.9rem); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  color: var(--ink);
}
.dial__label {
  position: absolute; bottom: 26%; z-index: 1;
  font-family: var(--f-ui); font-size: .6rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--ink-3);
}

.sit__presets { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: 2.2rem; }
.preset {
  font-family: var(--f-ui); font-size: .74rem; letter-spacing: .1em;
  padding: .42rem .85rem; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: all .22s var(--ease);
}
.preset:hover { border-color: var(--ink-3); color: var(--ink); }
.preset.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.preset:disabled { opacity: .35; cursor: not-allowed; }

.sit__controls { display: flex; align-items: center; gap: .6rem; margin-top: 1.8rem; }
.btn {
  font-family: var(--f-ui); font-size: .76rem; letter-spacing: .16em;
  text-transform: uppercase; padding: .8rem 1.7rem;
  border: 1px solid var(--ink); color: var(--paper); background: var(--ink);
  transition: all .28s var(--ease);
}
.btn:hover { background: var(--seal); border-color: var(--seal); }
.btn--ghost { background: none; color: var(--ink-2); border-color: var(--rule); }
.btn--ghost:hover { background: none; color: var(--seal); border-color: var(--seal); }
.btn:disabled { opacity: .3; pointer-events: none; }

.sit__opts {
  display: flex; align-items: center; justify-content: center; gap: 1.4rem;
  margin-top: 1.8rem; flex-wrap: wrap;
  font-family: var(--f-ui); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
.switch { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  width: 2rem; height: 1.05rem; border-radius: 999px; background: var(--rule);
  position: relative; transition: background-color .25s var(--ease);
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: calc(1.05rem - 4px); height: calc(1.05rem - 4px); border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .25s var(--ease);
}
.switch input:checked + .switch__track { background: var(--seal); }
.switch input:checked + .switch__track::after { transform: translateX(.95rem); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--seal); outline-offset: 3px; }

.sit__log {
  margin-top: 2.2rem; font-family: var(--f-ui); font-size: .66rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  min-height: 1em;
}
.sit__log b { color: var(--seal); font-weight: 500; }

/* ---------- guide ---------- */
.guide {
  max-width: 44rem; margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.2rem) var(--pad) 1rem;
  display: flex; flex-direction: column;
}
.guide__head { border-bottom: 1px solid var(--rule); padding-bottom: 1.2rem; }
.guide__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.1rem); }
.guide__sub { margin-top: .4rem; font-size: .92rem; color: var(--ink-3); font-style: italic; }

.thread { flex: 1; padding: 1.4rem 0 1.6rem; display: flex; flex-direction: column; gap: 1.3rem; }
.msg { max-width: 90%; }
.msg--guide { align-self: flex-start; }
.msg--you { align-self: flex-end; text-align: right; }
.msg__role {
  font-family: var(--f-ui); font-size: .58rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .4rem;
}
.msg__body {
  font-size: 1.02rem; line-height: 1.78; white-space: pre-wrap;
}
.msg--you .msg__body {
  background: var(--paper-2); padding: .7rem 1rem; display: inline-block; text-align: left;
  border-radius: 2px;
}
.msg--guide .msg__body { color: var(--ink); }
.msg__ref {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem;
  font-family: var(--f-ui); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--seal);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.msg__ref:hover { border-color: currentColor; }

.typing { display: inline-flex; gap: .28rem; padding: .2rem 0; }
.typing i {
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3);
  animation: blink 1.3s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.suggest { display: flex; flex-wrap: wrap; gap: .45rem; padding-bottom: 1rem; }
.suggest button {
  font-family: var(--f-body); font-size: .87rem; font-style: italic;
  color: var(--ink-2); padding: .45rem .8rem;
  border: 1px solid var(--rule); border-radius: 999px;
  transition: all .25s var(--ease);
}
.suggest button:hover { border-color: var(--seal); color: var(--seal); }

.composer {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: flex-end; gap: .6rem;
  padding: .8rem 0 1.1rem;
  background: var(--paper);
}
.composer textarea {
  flex: 1; resize: none;
  padding: .75rem .9rem; max-height: 9rem;
  background: var(--paper-2); border: 1px solid var(--rule);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.55;
  color: var(--ink); border-radius: 2px;
  transition: border-color .25s var(--ease);
}
.composer textarea::placeholder { color: var(--ink-3); font-style: italic; }
.composer textarea:focus { outline: none; border-color: var(--seal); }
.send {
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem;
  background: var(--ink); color: var(--paper); border-radius: 2px;
  transition: background-color .25s var(--ease);
}
.send:hover { background: var(--seal); }
.send:disabled { opacity: .35; }

.mode {
  font-family: var(--f-ui); font-size: .6rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3);
  border: 1px solid var(--rule); padding: .2rem .5rem;
  display: inline-block; margin-top: .6rem;
}

/* ---------- footer ---------- */
.foot {
  position: relative; z-index: 1;
  text-align: center; padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--f-ui); font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
}
.foot__line + .foot__line { margin-top: .4rem; }
.foot__line--quiet { opacity: .6; letter-spacing: .1em; text-transform: none; font-family: var(--f-body); font-style: italic; font-size: .82rem; }

/* ---------- motion ---------- */
.view-enter { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .11s; }
.stagger > *:nth-child(5) { animation-delay: .14s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .enso__stroke { stroke-dashoffset: 0; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav {
    position: fixed; inset: 3.6rem 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: .5rem var(--pad) 1.2rem;
    transform: translateY(-120%); transition: transform .4s var(--ease);
    box-shadow: var(--shadow);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a {
    padding: .95rem 0; border-bottom: 1px solid var(--rule-soft);
    font-size: .8rem;
  }
  .nav a::after { display: none; }
  .nav-toggle { display: grid; }
  .bar__tools { margin-left: auto; }
  .wordmark__text { font-size: .88rem; }
  .entry { grid-template-columns: 2.2rem 1fr; gap: 1rem; }
  .entry__source { grid-column: 2; padding-top: .45rem; text-align: left; }
  .reader__verso { display: none; }
  .reader__foot a { max-width: 100%; }
  .msg { max-width: 96%; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .hero__kicker { letter-spacing: .26em; }
  .enso__dialog { width: 72%; }
  .entry { padding: 1.3rem .2rem; }
}

/* ---------- print ---------- */
@media print {
  .bar, .foot, .grain, .reader__back, .reader__foot, .composer, .suggest { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .reader { padding: 0; max-width: none; }
}
