/* petalspellingdictionary.website
   Restrained and typographic: one serif for reading, one sans for labels, one
   accent colour used only where the correct spelling appears. */

:root {
  --paper:      #fbf9f5;
  --paper-tint: #f2eee4;
  --ink:        #191714;
  --ink-soft:   #57514a;
  --ink-faint:  #8a8377;
  --rule:       #e2dbcd;
  --accent:     #7c2f3e;
  --accent-tint:#f3e7e6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
          sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas,
          "Liberation Mono", monospace;
  --measure: 34rem;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14130f;
    --paper-tint: #1d1b16;
    --ink:        #ece7dd;
    --ink-soft:   #a9a094;
    --ink-faint:  #7d7568;
    --rule:       #322e27;
    --accent:     #e5959f;
    --accent-tint:#26191c;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 var(--pad); }

/* ---- chrome ------------------------------------------------------------ */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.6rem 0 1.15rem;
  margin-bottom: 2.4rem;
}
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1rem; }
.brand {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
a.brand:hover { color: var(--accent); }
.brand-note {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.crumbs {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin: -1.2rem 0 1.8rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.crumbs li + li::before { content: "/"; margin-right: 0.45rem; color: var(--rule); }
.crumbs a { color: var(--ink-soft); }

.site-foot {
  margin-top: 4.5rem;
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0 3.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-faint);
}
.site-foot ul { list-style: none; margin: 0 0 0.7rem; padding: 0; display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-foot p { margin: 0; max-width: 30rem; }
.site-foot [aria-current] { color: var(--ink-soft); }

/* ---- links ------------------------------------------------------------- */

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---- headings ---------------------------------------------------------- */

h1, h2, h3 { font-weight: 600; line-height: 1.18; letter-spacing: -0.006em; }
h1 { font-size: clamp(1.85rem, 1.25rem + 2.4vw, 2.75rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.32rem; margin: 2.6rem 0 0.75rem; }
h3 { font-size: 1.06rem; margin: 1.9rem 0 0.4rem; }
p { max-width: var(--measure); }
.lead { font-size: 1.16rem; color: var(--ink-soft); max-width: 36rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.7rem;
}

/* ---- the leaf page ----------------------------------------------------- */

.heard {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-decoration: underline wavy var(--rule);
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
  word-break: break-word;
}
.verdict {
  font-size: 1.28rem;
  margin: 1.7rem 0 0;
  padding: 0.9rem 0 0.95rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}
.verdict strong { color: var(--accent); font-weight: 600; }
.answer { font-size: 1.09rem; }

.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.facts { margin: 2.6rem 0 0; border-top: 1px solid var(--rule); }
.facts .fact {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0 1.2rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  font-family: var(--sans);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.28rem;
}
.facts dd { margin: 0; }
.facts .letters { font-family: var(--mono); letter-spacing: 0.06em; font-size: 0.92rem; }

@media (max-width: 30rem) {
  .facts .fact { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* ---- listings ---------------------------------------------------------- */

.stack { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.stack > li { border-top: 1px solid var(--rule); padding: 1.05rem 0 1.15rem; }
.stack > li:last-child { border-bottom: 1px solid var(--rule); }
.stack .title { font-size: 1.18rem; display: block; margin-bottom: 0.15rem; }
.stack .under { font-family: var(--sans); font-size: 0.83rem; color: var(--ink-soft); margin: 0; max-width: 34rem; }
.stack .count { font-family: var(--sans); font-size: 0.73rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); }

.spellings { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
@media (min-width: 40rem) { .spellings { grid-template-columns: 1fr 1fr; } }
.spellings li { background: var(--paper); padding: 0.7rem 0.85rem 0.8rem; }
.spellings a { font-family: var(--mono); font-size: 0.98rem; text-decoration: none; border-bottom: 1px solid transparent; }
.spellings a:hover { border-bottom-color: var(--accent); }
.spellings .tag { display: block; margin-top: 0.1rem; }

.also { margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
.also h2 { margin-top: 0; font-size: 0.78rem; font-family: var(--sans); letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.also ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

.plain { list-style: none; margin: 0.8rem 0 2rem; padding: 0; }
.plain li { padding: 0.28rem 0; border-bottom: 1px solid var(--rule); }
.plain .mono { font-family: var(--mono); font-size: 0.95rem; }
.plain .depth1 { padding-left: 1.2rem; }
.plain .depth2 { padding-left: 2.4rem; }

.pager { font-family: var(--sans); font-size: 0.85rem; margin-top: 1.8rem; }

.note {
  background: var(--accent-tint);
  border-left: 2px solid var(--accent);
  padding: 0.85rem 1.1rem;
  margin: 2rem 0 0;
  max-width: 36rem;
  font-size: 0.97rem;
}
.note p { margin: 0; max-width: none; }
