/* showandtell.click — mobile-first, no external assets */
:root {
  --brand: #E85D3A;
  --brand-dark: #A63A1C;   /* text/links on white: ~6:1 contrast */
  --brand-tint: #FDEEE9;
  --ink: #1F2328;
  --muted: #565C64;        /* ~6.9:1 on white */
  --line: #E4E1DC;
  --bg: #FFFCF9;
  --card: #FFFFFF;
  --focus: #1D4ED8;
  --accent: var(--brand);  /* per-letter color, set by app.js */
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand-dark); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: .5rem 1rem;
  background: var(--ink);
  color: #fff;
  z-index: 10;
}
.skip:focus { left: .5rem; top: .5rem; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1rem .25rem;
}
.brand { margin: 0; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-link { color: var(--ink); text-decoration: none; }
.brand-link::before {
  content: "S";
  display: inline-grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  margin-right: .45em;
  border-radius: .4em;
  background: var(--brand);
  color: #fff;
  font-size: .85em;
  vertical-align: middle;
}
.home-link { font-size: .95rem; }

main { max-width: 56rem; margin: 0 auto; padding: 0 1rem; }

/* Intro */
.intro h1 {
  margin: 1rem 0 .5rem;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.lede { margin: 0 0 1.25rem; color: var(--muted); max-width: 40rem; }

/* Letter grid */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
}
.grid button {
  min-height: 3.25rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .12s, background-color .12s, transform .08s;
}
.grid button:hover { border-color: var(--brand); }
.grid button:active { transform: scale(.96); }
.grid button[aria-pressed="true"] {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}
.noscript {
  margin: 1rem 0 0;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--brand-tint);
}

/* Results */
.results { margin: 2rem 0 2.5rem; outline: none; }
.results-title {
  margin: 0 0 .25rem;
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  line-height: 1.25;
}
.notice { margin: 0 0 .75rem; min-height: 1.5em; color: var(--brand-dark); font-weight: 600; }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}
.card {
  position: relative;
  padding: 1rem 1rem 1rem 3.75rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
}
.card-num {
  position: absolute;
  left: .9rem;
  top: 1rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-weight: 800;
}
.card-name { margin: 0; font-size: 1.4rem; line-height: 1.25; }
.card-loc { margin: .3rem 0 0; color: var(--muted); font-weight: 600; }
.card-tip { margin: .5rem 0 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.25rem 0 0;
}
.btn {
  flex: 1 1 100%;
  min-height: 3rem;
  padding: .6rem 1.1rem;
  border: 2px solid var(--brand-dark);
  border-radius: 999px;
  background: var(--card);
  color: var(--brand-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--brand-tint); }
.btn-primary { background: var(--brand-dark); color: #fff; }
.btn-primary:hover { background: #8C2F15; }

.guide-link {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--brand-tint);
  overflow-wrap: anywhere;
}

[hidden] { display: none !important; }

/* Footer */
.site-footer {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
}
.site-footer p { margin: .25rem 0; }

@media (min-width: 34rem) {
  .grid { grid-template-columns: repeat(7, 1fr); }
  .btn { flex: 0 1 auto; }
}
@media (min-width: 52rem) {
  .grid { grid-template-columns: repeat(13, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Print: results only — letter title, 5 cards, guide link */
@media print {
  @page { margin: 1.5cm; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .skip, .site-header, .intro, .picker, .actions, .notice, .site-footer { display: none !important; }
  main { max-width: none; padding: 0; }
  .results { margin: 0; }
  .print-header[hidden] { display: block !important; }
  .print-header {
    margin: 0 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid #999;
    font-size: 10pt;
    color: #333;
  }
  .results-title { font-size: 18pt; margin-bottom: .75rem; }
  .cards { grid-template-columns: 1fr; gap: .5rem; }
  .card { break-inside: avoid; border: 1px solid #999; border-left: 4px solid #000; padding: .6rem .8rem .6rem 3rem; }
  .card-num { background: none; border: 1px solid #000; color: #000; left: .6rem; top: .6rem; width: 1.7rem; height: 1.7rem; }
  .card-name { font-size: 15pt; }
  .card-loc { color: #333; }
  .guide-link { background: none; padding: .75rem 0 0; border-top: 1px solid #999; border-radius: 0; }
  .guide-link a { color: #000; text-decoration: none; }
}
