@font-face { font-family: "Cinzel"; font-weight: 400 900; font-display: swap; src: url("../fonts/Cinzel-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cinzel"; font-weight: 400 900; font-display: swap; src: url("../fonts/Cinzel-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-weight: 400 800; font-display: swap; src: url("../fonts/EBGaramond-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-weight: 400 800; font-display: swap; src: url("../fonts/EBGaramond-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; font-display: swap; src: url("../fonts/EBGaramond-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400 800; font-display: swap; src: url("../fonts/EBGaramond-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #faf6ec;
  --card: #fffdf7;
  --cream: #f3ead3;
  --ink: #1f1b16;
  --muted: #6b5d4c;
  --line: #e2d6bb;
  --red: #8e2b22;
  --red-ink: #ffffff;
  --gold: #a9822f;
  --blue: #1f4f9a;
  --focus: #1f4f9a;
  --ok: #2f6b3f;
  --shadow: 0 1px 2px rgba(60, 40, 10, .08), 0 6px 20px rgba(60, 40, 10, .07);
  --radius: 14px;
  --display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f; --card: #201c17; --cream: #2a241c; --ink: #f1e9d8; --muted: #b9aa92; --line: #3b3328;
    --red: #e06656; --red-ink: #16130f; --gold: #d2aa52; --blue: #7aa7ec; --focus: #9cc0ff; --ok: #6fbf84;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--card); padding: 8px 12px; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; }
.brand svg { width: 30px; height: 34px; flex: none; }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-left: auto; font-size: .95rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red); text-decoration: underline; }
.site-foot { margin-top: 64px; border-top: 1px solid var(--line); background: var(--card); font-size: .92rem; color: var(--muted); }
.site-foot .wrap { padding-top: 24px; padding-bottom: 32px; display: grid; gap: 14px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { color: var(--muted); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--red); background: var(--red); color: var(--red-ink); font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: transform .08s ease, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--red); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .92rem; }
.btn.big { min-height: 56px; padding: 14px 28px; font-size: 1.1rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 4px; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
label { font-weight: 600; display: block; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .92rem; }
input[type="text"], input[type="number"], select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 1rem/1.4 var(--sans); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field { margin-bottom: 18px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Landing */
.hero { padding: 36px 0 12px; }
.hero .wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero p.lead { font-size: 1.18rem; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0 10px; }
.hero-art { display: grid; place-items: center; }
.hero-art svg { width: min(100%, 400px); height: auto; filter: drop-shadow(0 10px 22px rgba(60, 40, 10, .18)); }
.steps { display: grid; gap: 16px; counter-reset: s; padding: 0; list-style: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: var(--red-ink); font: 700 1rem var(--display); margin-bottom: 8px; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.example-card { text-decoration: none; color: var(--ink); display: block; }
.example-card svg { width: 100%; height: auto; display: block; }
.example-card h3 { font-size: 1rem; margin: 10px 0 4px; }
.faq dt { font-weight: 700; margin-top: 1em; }
.faq dd { margin: .3em 0 0; }

/* Content pages */
.article { padding-top: 28px; }
.article .crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.article .crumbs a { color: var(--muted); }
.mottos { columns: 2 240px; padding-left: 1.1em; }
.mottos li { break-inside: avoid; margin-bottom: 6px; }
.latin dt { font-family: var(--display); font-weight: 700; }
.latin dd { margin: 0 0 10px; color: var(--muted); font-style: italic; }
.creed-sample { font-family: var(--serif); font-size: 1.2rem; background: var(--cream); border-radius: var(--radius); padding: 18px 22px; }
.creed-sample p { margin: 0 0 .4em; }
.split { display: grid; gap: 24px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 300px; align-items: start; } .split aside { position: sticky; top: 16px; } }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tag-list a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); font-size: .95rem; }
.tag-list a:hover { border-color: var(--red); color: var(--red); }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sym-grid figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; font-size: .92rem; }
.sym-grid figure svg { width: 84px; height: 84px; }
.sym-grid figcaption b { display: block; }
.swatch { display: inline-block; width: 1em; height: 1em; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .3); vertical-align: -2px; margin-right: 6px; }
table.plain { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.plain th, table.plain td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* App */
.app { padding-top: 22px; }
.progress { display: flex; gap: 6px; margin: 4px 0 18px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--red); }
.q-title { font-family: var(--display); font-size: clamp(1.35rem, 4vw, 1.9rem); margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; user-select: none; }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: var(--red-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.group-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tile span { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); text-align: center; font-weight: 600; font-size: .92rem; cursor: pointer; height: 100%; }
.tile svg { width: 64px; height: 64px; }
.tile input:checked + span { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 8%, var(--card)); }
.tile input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile .sw { width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .25); }
.list-opts { display: grid; gap: 8px; }
@media (min-width: 640px) { .list-opts { grid-template-columns: 1fr 1fr; } }
.list-opts .chip span { width: 100%; border-radius: 12px; }
.nav-row { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.pass { text-align: center; padding: 40px 10px; }
.pass .who { font-family: var(--display); font-size: clamp(2rem, 9vw, 3.4rem); margin: 8px 0 18px; color: var(--red); word-break: break-word; }
.members { display: grid; gap: 8px; }
.members .row input { flex: 1; }
.members .row button { flex: none; }
.tone-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.tone-cards .tile span { text-align: left; justify-items: start; padding: 12px 14px; }
.tone-cards .tile small { font-weight: 400; color: var(--muted); }
.notice { background: var(--cream); border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.notice.warn { border-left: 4px solid var(--gold); }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 9em 1fr 2em; gap: 8px; align-items: center; font-size: .95rem; }
.bar i { display: block; height: 12px; border-radius: 6px; background: var(--red); }
.options { display: grid; gap: 16px; }
@media (min-width: 900px) { .options { grid-template-columns: repeat(3, 1fr); } }
.option { display: grid; gap: 10px; align-content: start; }
.option svg { width: 100%; height: auto; }
.option .motto { font-family: var(--display); font-weight: 700; text-align: center; }
.option .votes { display: flex; align-items: center; justify-content: center; gap: 10px; }
.option .votes b { font-size: 1.4rem; min-width: 2ch; text-align: center; }
.editor { display: grid; gap: 22px; }
@media (min-width: 980px) { .editor { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; } .editor .preview { position: sticky; top: 12px; } }
.preview-box { background: var(--cream); border-radius: var(--radius); padding: 12px; }
.preview-box svg { width: 100%; height: auto; display: block; box-shadow: 0 4px 20px rgba(40, 25, 5, .18); }
details.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 12px; }
details.panel > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-family: var(--display); list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.panel > summary::after { content: "+"; font-size: 1.3rem; }
details.panel[open] > summary::after { content: "−"; }
details.panel > div { padding: 0 16px 16px; }
.line-ed { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: start; margin-bottom: 8px; }
.line-ed textarea { min-height: 44px; font-family: var(--serif); font-size: 1.05rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--red); color: var(--red); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches label { margin: 0; position: relative; }
.swatches input { position: absolute; opacity: 0; inset: 0; }
.swatches span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .25); cursor: pointer; }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--red); }
.swatches input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.mini-grid label { margin: 0; position: relative; }
.mini-grid input { position: absolute; opacity: 0; inset: 0; }
.mini-grid span { display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px; background: var(--card); cursor: pointer; }
.mini-grid svg { width: 44px; height: 44px; }
.mini-grid input:checked + span { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.mini-grid input:focus-visible + span { outline: 3px solid var(--focus); }
.export-grid { display: grid; gap: 10px; }
.export-grid .btn { width: 100%; }
.blazon { font-family: var(--serif); font-style: italic; font-size: 1.08rem; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; z-index: 50; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.shop-slot { border: 2px dashed var(--gold); border-radius: 12px; padding: 12px 14px; }
.share-view { display: grid; gap: 22px; padding-top: 22px; }
@media (min-width: 900px) { .share-view { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.meaning-list { padding-left: 1.1em; }
.meaning-list li { margin-bottom: 6px; }

@media print {
  .site-head, .site-foot, .no-print { display: none !important; }
  body { background: #fff; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* Headings get focus after each step for screen readers; no ring needed for that. */
[tabindex="-1"]:focus { outline: none; }
@media (max-width: 520px) {
  .brand { font-size: .92rem; }
  .brand svg { width: 24px; height: 28px; }
  .site-nav { gap: 2px 12px; font-size: .9rem; margin-left: 0; width: 100%; }
  .site-head .wrap { gap: 4px 10px; }
}
.sym-grid figure.shield-demo svg { width: 100%; height: auto; max-height: 180px; }
