:root {
  color-scheme: light;
  --ink: #172b34;
  --muted: #475f69;
  --paper: #fcfdfb;
  --soft: #edf3ed;
  --accent: #155c49;
  --border: #b8c9c1;
  --field: #fff;
  --action-ink: #fff;
  --focus: #a04908;
  --serif: "Baskervville", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Avenir Next", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e6f1eb;
    --muted: #b5c9c1;
    --paper: #132127;
    --soft: #20332f;
    --accent: #94dcc0;
    --border: #4d655e;
    --field: #16292b;
    --action-ink: #122d25;
    --focus: #ffcca4;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.top { border-bottom: 1px solid var(--border); }
.bar, .foot, .admin-top, .toolbar, .actions, .search-form, .sample-foot { display: flex; align-items: center; gap: 1rem; }
.bar, .foot, .admin-top, .sample-foot { justify-content: space-between; }
.bar { min-height: 5rem; }
.brand { display: inline-flex; align-items: center; gap: .3rem; font: 700 1.45rem/1.2 var(--serif); text-decoration: none; color: var(--ink); letter-spacing: -.035em; }
.brand img { object-fit: contain; }
nav { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; }
nav a { padding-block: .55rem; color: var(--ink); font-size: .94rem; text-decoration: none; }
nav a[aria-current], nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .4rem; }
a { color: var(--accent); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, .skip:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: -200vw; z-index: 3; background: var(--field); padding: .5rem 1rem; }
.skip:focus { left: .5rem; }
main { flex: 1; padding-bottom: clamp(3rem, 7vw, 6rem); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.65rem, 6vw, 5.5rem); line-height: .99; letter-spacing: -.058em; text-wrap: balance; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.65rem); line-height: 1.12; letter-spacing: -.04em; }
p { max-width: 72ch; overflow-wrap: anywhere; }
input, textarea, button { font: inherit; }
button, input, textarea { border-radius: .35rem; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
.button, .secondary, .text-button, .list-button { min-height: 2.8rem; font-weight: 650; }
.button, .secondary { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--accent); padding: .55rem 1.1rem; width: fit-content; text-decoration: none; }
.button { background: var(--accent); color: var(--action-ink); }
.secondary { color: var(--accent); background: var(--field); }
.button:hover, .secondary:hover { filter: brightness(.93); }
.text-button, .list-button { border: 0; background: transparent; padding: .25rem 0; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3.5rem, 8vw, 7rem); }
.hero-copy p, .lead { font-size: clamp(1.1rem, 2vw, 1.37rem); line-height: 1.53; color: var(--muted); }
.hero-copy p { margin-block: 1.5rem; max-width: 41ch; }
.specimen { color: #ecf5e6; background: #254e46; border-radius: .4rem 2.8rem .4rem .4rem; padding: clamp(1.5rem, 3vw, 2.6rem); box-shadow: -.38rem .38rem 0 #b7caac, -.7rem .7rem 0 #d9e4d7; }
.spec-label { font-size: .85rem; font-weight: 650; letter-spacing: .025em; }
.sample-text { min-height: 12rem; padding-block: 1.2rem; }
.sample-text h2 { font-size: clamp(2.8rem, 5vw, 4.5rem); }
.sample-text p { margin-top: .5rem; max-width: 32ch; }
.sample-foot { border-top: 1px solid #80a399; font-size: .87rem; }
.sample-foot button { color: inherit; }
.page-head { padding-top: clamp(2.8rem, 6vw, 5rem); }
.page-head h1 { font-size: clamp(2.5rem, 5.5vw, 4.4rem); }
.lead { margin-top: 1rem; max-width: 58ch; }
.section, .searchbox, .workspace, .preview, .login-form, .editor-form { margin-top: 2.2rem; }
.section { max-width: 54rem; }
.section > * + *, .stack > * + *, .editor-form > * + * { margin-top: .85rem; }
.section > h2 { margin-bottom: 1rem; }
.stack { display: flex; align-items: start; flex-direction: column; }
.searchbox { background: var(--soft); border-radius: 1rem; padding: clamp(1.15rem, 4vw, 2.6rem); margin-top: 0; }
.search-form, .toolbar { align-items: end; flex-wrap: wrap; }
.search-form { margin-top: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; width: 100%; font-weight: 650; }
.field span { font-size: .95rem; }
.field input, .field textarea { padding: .65rem .8rem; width: 100%; min-width: 0; background: var(--field); color: var(--ink); border: 1px solid var(--border); font-weight: 400; }
.field textarea { resize: vertical; }
.search-form .field, .toolbar .field { flex: 1 1 15rem; }
.search-form .button, .toolbar .button { min-height: 3rem; }
.status { color: var(--muted); margin-top: .7rem; }
.status:empty { margin: 0; }
.results details, .section details { border-bottom: 1px solid var(--border); }
details { padding: .5rem 0; }
details summary { padding: .5rem .2rem; cursor: pointer; font-weight: 650; }
details p { padding: 0 .2rem .6rem; }
.results, .results + button { margin-top: 1rem; }
.results:empty { margin: 0; }
.badge { display: inline-block; margin-top: 1rem; color: var(--accent); background: var(--soft); border-radius: .35rem; padding: .25rem .65rem; font-size: .88rem; font-weight: 650; }
.admin-top { align-items: end; }
.login-form, .editor-form { max-width: 44rem; }
.login-form { max-width: 28rem; }
.login-form > * + * { margin-top: .9rem; }
.actions { flex-wrap: wrap; margin-top: 1.5rem; }
.quality { margin-bottom: 1.8rem; padding: 1.2rem 1.4rem; background: var(--soft); border-radius: .6rem; }
.quality h2 { font-size: 1.7rem; }
.quality-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .8rem 1.6rem; margin: 1rem 0 0; }
.quality-figures dt { color: var(--muted); font-size: .9rem; }
.quality-figures dd { margin: .15rem 0 0; font: 500 1.85rem/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.word-list { padding: 0; list-style: none; }
.word-list li { border-bottom: 1px solid var(--border); }
.list-button { width: 100%; text-align: start; text-decoration: none; }
.list-button:hover { text-decoration: underline; }
.account-note { margin-top: 2.5rem; }
.preview { max-width: 44rem; padding: 1.4rem; background: var(--soft); border-left: .3rem solid var(--accent); }
.preview p { white-space: pre-line; }
.preview > * + * { margin-top: .65rem; }
.source { color: var(--muted); font-size: .92rem; }
footer { border-top: 1px solid var(--border); }
.foot { padding-block: 1.3rem; flex-wrap: wrap; }
.foot .brand { font-size: 1.15rem; }
@media (max-width: 43rem) {
  .wrap { width: min(100% - 2rem, 70rem); }
  .bar { flex-wrap: wrap; gap: .1rem 1rem; padding-block: .55rem; }
  nav { column-gap: .85rem; }
  .hero { grid-template-columns: 1fr; gap: 2.1rem; padding-block: 2.8rem; }
  .specimen { margin-left: .7rem; }
  .sample-text { min-height: 8.8rem; }
  .admin-top { flex-wrap: wrap; }
  .search-form, .toolbar { gap: .65rem; }
}
@media (forced-colors: active) {
  .specimen, .preview, .searchbox { border: 1px solid CanvasText; }
}
