/* Short story site - MODERN LOOK (preview, Dec 2 2026).
   Kept from Phillip's rules: no boxes around stories, small buttons that sink
   + turn light gray on mouse-over, check marks on picked choices, small text. */

:root {
  --ink: #111827;        /* headings */
  --text: #374151;       /* regular text */
  --muted: #6b7280;      /* small print */
  --line: #e5e7eb;       /* thin dividers */
  --accent: #2b59c3;     /* one deep blue */
  --soft: #f3f4f6;       /* light gray for mouse-over */
}

* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

.practice-banner {
  background: var(--soft); color: var(--muted); text-align: center;
  font-size: .75rem; padding: .35rem .8rem; letter-spacing: .2px;
}

/* Header: white, sticks to the top, thin line under it */
header.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .75rem 1.2rem;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-name {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -.4px;
  text-decoration: none; color: var(--ink);
}
.site-name::before {
  content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--accent); margin-right: .45rem; vertical-align: .12rem;
}
nav.top-links { display: flex; gap: .5rem; }

/* Home page tagline becomes a big, clean headline */
.tagline {
  order: 3; width: 100%; margin: 1.6rem 0 .2rem;
  font-size: 1.75rem; line-height: 1.2; font-weight: 800; letter-spacing: -.6px; color: var(--ink);
}
.tagline .sub {
  display: block; margin-top: .45rem; font-size: .95rem; font-weight: 400;
  letter-spacing: 0; line-height: 1.5; color: var(--muted);
}
header.top:has(.tagline) { position: static; border-bottom: none; padding-bottom: 0; }

main { padding: 1rem 1.2rem 3rem; max-width: 1200px; margin: 0 auto; }

/* Buttons: rounded, small, thin dark edge underneath.
   Mouse over = sinks down + turns light gray (Phillip's rule, kept). */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  background: #fff; color: var(--ink); font: inherit; font-size: .88rem; font-weight: 650;
  border: 1.5px solid var(--ink); border-bottom-width: 3.5px; border-radius: 999px;
  padding: .38rem .95rem; transition: transform .08s, background .08s;
}
.btn:hover, .btn:focus-visible {
  background: #e5e7eb; transform: translateY(2px); border-bottom-width: 1.5px; outline: none;
}
.btn.big {
  font-size: 1rem; padding: .7rem 1.2rem; width: 100%; max-width: 22rem;
  background: var(--ink); color: #fff;
}
.btn.big:hover, .btn.big:focus-visible { background: #e5e7eb; color: var(--ink); }
.btn.small { font-size: .8rem; padding: .28rem .75rem; }

/* Choices (story kind, reading time). Picked = dark with a check mark. */
.filters { margin: .2rem 0 1.2rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .9rem; }
.filter-label {
  margin: 0; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--muted);
}
.chip {
  cursor: pointer; font: inherit; font-size: .82rem; font-weight: 550;
  background: #fff; color: var(--ink); border: 1px solid #d1d5db; border-radius: 999px;
  padding: .28rem .8rem; transition: background .1s;
}
.chip:hover, .chip:focus-visible { background: var(--soft); border-color: var(--ink); outline: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.chip[aria-pressed="true"]::before { content: "\2713  "; }

.count-line { font-size: .8rem; color: var(--muted); margin: 0 0 .2rem; }

/* Story list: no boxes. Thin lines, roomy, 2-line previews. */
.cards { display: grid; column-gap: 2.5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  display: block; text-decoration: none; color: var(--text);
  border-top: 1px solid var(--line); padding: 1.1rem .5rem 1.2rem; border-radius: 6px;
  transition: background .1s;
}
.card:hover, .card:focus-visible { background: var(--soft); outline: none; }
.card h2 {
  margin: .3rem 0 .15rem; font-size: 1.2rem; line-height: 1.25; font-weight: 750;
  letter-spacing: -.3px; color: var(--ink);
}
.card:hover h2, .card:focus-visible h2 { text-decoration: underline; text-underline-offset: 3px; }
.tag { white-space: nowrap; }
.meta { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--accent); }
.by { font-size: .85rem; margin: 0 0 .45rem; color: var(--muted); }
.teaser {
  font-size: .92rem; margin: 0; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.read-link { display: inline-block; margin-top: .5rem; font-size: .82rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.card:hover .read-link { text-decoration: underline; }
.tag {
  display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .6px;
  background: var(--soft); color: var(--muted); border-radius: 999px; padding: .05rem .5rem;
  margin-left: .4rem; vertical-align: .05rem;
}

/* Reading page: clean book-style text, comfortable width */
.story { max-width: 42rem; margin: 0 auto; padding-top: .8rem; }
.story h1 {
  font-size: 2rem; line-height: 1.15; margin: .5rem 0 .4rem; font-weight: 800;
  letter-spacing: -.8px; color: var(--ink);
}
.story .by { font-size: .9rem; margin-bottom: 1.6rem; }
.story-text {
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  font-size: 1.15rem; line-height: 1.75; color: #1f2937;
}
.story-text p { margin: 0 0 1.15rem; }
.the-end {
  text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: 4px; color: var(--muted);
  margin: 2.4rem 0 1.4rem;
}
.the-end::before, .the-end::after { content: "\2014\2014"; letter-spacing: 0; margin: 0 .7rem; color: #d1d5db; }
.after-story { text-align: center; display: grid; gap: .8rem; justify-items: center; padding-bottom: 1rem; }

/* Forms */
.form-wrap { max-width: 42rem; margin: 0 auto; }
main.form-wrap h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -.8px; color: var(--ink); margin: 1rem 0 .4rem; }
h2, h3 { color: var(--ink); letter-spacing: -.3px; }
label { display: block; font-weight: 650; font-size: .92rem; color: var(--ink); margin: 1.2rem 0 .35rem; }
.hint { font-weight: 400; font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; padding: .65rem .8rem;
  border: 1.5px solid #9ca3af; border-radius: 10px; background: #fff; color: var(--ink);
  transition: border-color .1s, box-shadow .1s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43, 89, 195, .18);
}
textarea { min-height: 16rem; font-family: Charter, "Sitka Text", Cambria, Georgia, serif; line-height: 1.6; }
::placeholder { color: #9ca3af; font-style: italic; font-weight: 300; }
.word-count { font-size: .82rem; margin-top: .35rem; font-weight: 600; color: var(--muted); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; color: var(--text); }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; flex: none; accent-color: var(--ink); }
.error { font-weight: 700; font-size: .85rem; color: var(--ink); margin: .35rem 0 0; }
.error::before { content: "\26A0  "; }

/* Plain sections (no boxes) */
.box { margin: 1.6rem 0; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.box ul { padding-left: 0; list-style: none; }
.box li { padding-left: 1.5rem; position: relative; margin: .35rem 0; }
.box li::before { content: "\2713"; position: absolute; left: 0; font-weight: 700; color: var(--accent); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Practice waiting list */
.wait-item .text-box {
  max-height: 16rem; overflow: auto; border-left: 3px solid var(--line);
  padding: .2rem 1rem; font-family: Charter, "Sitka Text", Cambria, Georgia, serif; margin: .8rem 0;
}
.button-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.email-preview {
  white-space: pre-wrap; font-family: Consolas, monospace; font-size: .82rem;
  background: var(--soft); padding: .8rem 1rem; border-radius: 10px; margin-top: .5rem;
}

footer {
  border-top: 1px solid var(--line); padding: 1.4rem 1.2rem 2rem;
  font-size: .8rem; color: var(--muted); text-align: center; line-height: 1.8;
}

@media (min-width: 900px) {
  html { font-size: 16px; }
  main { padding: 1.4rem 2.4rem 3rem; }
  header.top { padding: .85rem 2.4rem; }
  .tagline { font-size: 2.3rem; }
  .tagline .sub { font-size: 1rem; }
}

/* ==========================================================
   COLOR VERSION (preview, Dec 2 2026)
   Warm main color + one color per kind of story.
   The words always stay, so color is extra help only.
   ========================================================== */
:root { --accent: #b9471c; --warm: #fff3ea; }
.g-campfire { --g: #d97706; --g-soft: #fef3c7; }
.g-town     { --g: #15803d; --g-soft: #dcfce7; }
.g-mystery  { --g: #7c3aed; --g-soft: #ede9fe; }
.g-scifi    { --g: #0d9488; --g-soft: #ccfbf1; }
.g-true     { --g: #1d4ed8; --g-soft: #dbeafe; }
.g-fable    { --g: #be185d; --g-soft: #fce7f3; }

/* Soft warm band behind the home page headline */
header.top:has(.tagline) {
  background: linear-gradient(180deg, #ffe8d6 0%, #fff6ef 55%, #ffffff 100%);
  padding-bottom: 1.4rem;
}
.site-name::before { background: var(--accent); }

/* Story list: colored stripe on the left + colored label */
.card[class*="g-"] { border-left: 4px solid var(--g); padding-left: .9rem; border-radius: 0 6px 6px 0; }
.card[class*="g-"]:hover, .card[class*="g-"]:focus-visible { background: var(--g-soft); }
.card[class*="g-"] .meta, .card[class*="g-"] .read-link { color: var(--g); }

/* Story-kind choices get a little colored dot */
.chip[class*="g-"]::after {
  content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--g); margin-left: .45rem; vertical-align: .05rem;
}

/* Reading page: colored label + short colored bar under the title */
.story[class*="g-"] .meta { color: var(--g); }
.story[class*="g-"] h1::after {
  content: ""; display: block; width: 3.5rem; height: 4px; border-radius: 4px;
  background: var(--g); margin-top: .8rem;
}

/* Warm main button (Read Another Story). Mouse over still sinks + light gray. */
.btn.big { background: var(--accent); border-color: #7c2d12; color: #fff; }
.btn.big:hover, .btn.big:focus-visible { background: #e5e7eb; color: var(--ink); border-color: var(--ink); }

/* Typing boxes glow warm instead of blue */
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185, 71, 28, .18); }
.box li::before { color: var(--accent); }
.check input { accent-color: var(--accent); }
