/* ========== sayit · design tokens ========== */
:root {
  --bg: #14100c;
  --bg-2: #1c1812;
  --bg-3: #221d16;
  --ink: #f4ecde;
  --ink-2: #c9bfa9;
  --ink-3: #8a8270;
  --line: rgba(244, 236, 222, 0.10);
  --line-2: rgba(244, 236, 222, 0.18);
  --accent: #8fd694;
  --accent-2: #b8e7bb;
  --accent-soft: rgba(143, 214, 148, 0.14);
  --good: #8fd694;
  --warn: #f0c87a;
  --bad: #ef8a82;
  --serif: 'Fraunces', 'Times New Roman', serif;
  --mono: 'JetBrains Mono', 'Menlo', monospace;
  --maxw: 1240px;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--serif);
  font-feature-settings: "ss01", "ss02", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(143,214,148,0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(143,214,148,0.05), transparent 60%);
  background-attachment: fixed;
}
::selection { background: var(--accent); color: var(--bg); }

.mono { font-family: var(--mono); font-feature-settings: "ss01"; }
.serif { font-family: var(--serif); }

/* film grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ========== layout ========== */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; position: relative; }

/* ========== top bar ========== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(20,16,12,.78); backdrop-filter: blur(14px);
  z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.01em;
  cursor: pointer; user-select: none;
}
.brand .dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); position: relative;
  box-shadow: 0 0 0 4px rgba(143,214,148,0.12), 0 0 24px rgba(143,214,148,.35);
  transition: transform .3s cubic-bezier(.2,.7,.2,1.4);
}
.brand:hover .dot { transform: scale(1.12); }
.brand .dot::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%;
  background: var(--bg);
}
.brand .dot::before {
  content: ""; position: absolute; inset: 11px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.5); opacity: .6; }
}
.brand .name { font-style: italic; }
.brand .name em { color: var(--accent); font-style: normal; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-family: var(--mono);
  font-size: 13px; padding: 8px 14px; border-radius: var(--r-sm);
  transition: all .2s; letter-spacing: .02em;
}
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a.cta {
  color: var(--bg); background: var(--accent); font-weight: 500;
}
.nav a.cta:hover { background: var(--accent-2); }
.nav .kbd {
  display: inline-flex; gap: 4px; align-items: center;
  padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  margin-left: 8px; cursor: pointer;
  transition: all .2s;
}
.nav .kbd:hover { border-color: var(--accent); color: var(--accent); }
.nav .kbd kbd {
  font-family: var(--mono); font-size: 10px;
  padding: 1px 5px; background: var(--bg-3); border-radius: 3px;
  border: 1px solid var(--line);
}

/* ========== a11y focus rings (keyboard-only) ========== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button.word-card:focus-visible {
  outline-offset: 4px;
}
/* WordCard is now a button — strip default button chrome so styling stays */
button.word-card {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.moment[role="button"] { cursor: pointer; }
