/* AUS Quaker (draft), v0.3. Calm, large and readable. System fonts only (a system serif for headings); no webfonts, no motion. */
:root {
  --forest: #1E4D38;
  --paper: #F3EFE4;
  --ink: #1C2416;
  --brass: #8A5A22;
  --white: #FFFDF8;
  --line: #CFC6AF;
  --muted: #4B5243;
  --leaf: #D9DCCF; /* forest at 12% over paper */
  --forest-deep: #163A2A;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", Charter, "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --radius: 12px;
  --touch: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 125%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

h1, h2, h3 { color: var(--forest); font-family: var(--serif); font-weight: 700; line-height: 1.22; margin: 1.6em 0 0.5em; }
h1 { font-size: 1.9rem; margin-top: 0.6em; letter-spacing: -0.005em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p, ul, ol, dl, blockquote { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: 0.3em 0; }
a { color: var(--forest); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.95em; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.35em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 0.85rem; }
.hint { color: var(--muted); font-size: 0.9rem; }
.lead { font-size: 1.1rem; }
.gentle { font-style: italic; }

/* ---------- Front page: very simple ---------- */
.front { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.working-title { margin: 0; display: flex; align-items: center; gap: 0.55rem; color: var(--forest); font-weight: 700; font-size: 1rem; }
.working-title img { width: 36px; height: 36px; }
.hero-art { margin: 1rem -0.25rem 0; }
.hero-art img { display: block; width: 100%; height: auto; }
.front h1 { font-size: 2.3rem; line-height: 1.12; margin: 0.5rem 0 1.1rem; max-width: 17ch; }

/* The one bold element: "Choose a giving bucket" */
.chooser { background: var(--forest); color: var(--white); border-radius: 22px; padding: 1.2rem 1.25rem 0.9rem; margin: 0 0 2.6rem; }
.chooser :focus-visible { outline-color: var(--white); }
.chooser-h { color: var(--white); font-size: 1.4rem; margin: 0 0 0.7rem; }
.chooser-h label { display: inline; font-weight: inherit; margin: 0; cursor: pointer; }
.chooser-select { max-width: none; min-height: 60px; font-size: 1.05rem; font-weight: 600; color: var(--forest); border: 2px solid var(--white); }
.chooser-preview { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 1rem; align-items: start; margin: 1.1rem 0 1rem; }
.chooser-preview img { width: 72px; height: 72px; border-radius: 16px; }
.chooser-blurb { margin: 0 0 0.35rem; font-size: 1.05rem; line-height: 1.5; }
.chooser-goes { margin: 0; font-size: 0.9rem; color: var(--paper); }
.chooser-go { margin: 0 0 0.6rem; }
.btn.btn-light { width: 100%; min-height: 60px; background: var(--paper); border-color: var(--paper); color: var(--forest); font-size: 1.05rem; }
.btn.btn-light:hover { background: var(--white); border-color: var(--white); }
.chooser-all { margin: 0; font-size: 0.95rem; }
.chooser-all a, .chooser-list a { color: var(--white); }
.chooser-all a { display: inline-flex; align-items: center; min-height: 48px; }
.chooser-group { margin: 0.6rem 0 0.2rem; font-size: 0.9rem; font-weight: 600; color: var(--paper); }
.chooser-list { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.chooser-list li { margin: 0; }
.chooser-list a { display: flex; align-items: center; gap: 0.8rem; min-height: 64px; padding: 0.3rem 0; font-weight: 600; }
.chooser-list img { width: 48px; height: 48px; border-radius: 12px; flex: none; }

.other-h { font-size: 1.35rem; margin: 0 0 0.8rem; }
.path-links { list-style: none; padding: 0; margin: 0 0 2.2rem; display: grid; gap: 0.75rem; }
.path-links li { margin: 0; }
.path-links a { display: flex; align-items: center; gap: 1rem; min-height: 92px; padding: 0.75rem 1rem; background: var(--white); border: 2px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); }
.path-links a::after { content: "\203A"; margin-left: auto; padding-left: 0.5rem; font-size: 1.8rem; line-height: 1; color: var(--forest); }
.path-links a:hover { border-color: var(--forest); }
.path-links img { width: 64px; height: 64px; flex: none; }
.pl-text { display: flex; flex-direction: column; gap: 0.15rem; }
.pl-title { font-weight: 700; color: var(--forest); font-size: 1.05rem; text-decoration: underline; text-underline-offset: 0.18em; }
.pl-sub { font-size: 0.9rem; color: var(--muted); }
@media (min-width: 900px) {
  .front { max-width: 46rem; padding-top: 2rem; }
  .front h1 { font-size: 2.6rem; }
  .path-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .path-links a { flex-direction: column; align-items: flex-start; min-height: 44px; padding: 1rem 1.1rem 1.15rem; }
  .path-links a::after { display: none; }
}
@media (min-width: 1000px) {
  .front { max-width: 64rem; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 3rem;
    grid-template-areas: "title title" "art chooser" "h1 chooser" "other other" "paths paths" "quiet quiet"; align-items: start; }
  .working-title { grid-area: title; }
  .hero-art { grid-area: art; margin-top: 1.5rem; }
  .front h1 { grid-area: h1; }
  .chooser { grid-area: chooser; align-self: center; margin: 1.5rem 0 2.6rem; }
  .other-h { grid-area: other; margin-top: 1.4rem; }
  .path-links { grid-area: paths; }
  .quiet-links { grid-area: quiet; }
}
.quiet-links { font-size: 0.85rem; color: var(--muted); }
.quiet-links a { color: var(--forest); display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0; }

/* ---------- Inner pages ---------- */
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--white); color: var(--forest); padding: 0.6rem 1rem; border: 2px solid var(--forest); border-radius: 8px; z-index: 5; }
.skip:focus { left: 1rem; }
header.slim { max-width: 44rem; margin: 0 auto; padding: 0.9rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); }
header.slim a { display: inline-flex; align-items: center; min-height: var(--touch); }
header.slim .home { gap: 0.55rem; font-weight: 700; text-decoration: none; font-size: 1.05rem; }
header.slim .home img { width: 36px; height: 36px; }
.inner { max-width: 44rem; margin: 0 auto; padding: 0.5rem 1.25rem 2.5rem; }
.inner.wide { max-width: 60rem; }
footer.slim { max-width: 44rem; margin: 0 auto; padding: 1rem 1.25rem 2rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
footer.slim a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 0.1rem; }
.gi-line { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.85rem; }
.lookup-code { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; margin: 0 0.15rem; padding: 0 0.35em; border: 1px solid var(--forest); border-radius: 6px; color: var(--forest); background: var(--white); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; font-weight: 600; text-decoration: none; vertical-align: middle; white-space: nowrap; }
.lookup-code abbr { text-decoration: none; font-style: normal; }
.lookup-code:hover { background: var(--paper); }
.ref-entry { scroll-margin-top: 1.25rem; padding: 0.4rem 0 0.2rem; border-bottom: 1px solid var(--line); }
.ref-entry:target { outline: 3px solid var(--brass); outline-offset: 6px; background: var(--white); border-radius: 8px; padding: 0.6rem 0.8rem; }
.crumbs { margin: 1rem 0 0; font-size: 0.9rem; }
.crumbs a, .toc a, .ref-entry .hint a { display: inline-flex; align-items: center; min-height: 44px; }
.page-head { display: flex; align-items: center; gap: 1rem; margin: 1.1rem 0 0.9rem; }
.page-head h1 { margin: 0; }
.page-icon { width: 96px; height: 96px; flex: none; }

/* Buttons and controls: at least 56px tall */
.btn, .copy-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch); padding: 0.5rem 1.2rem; border-radius: 10px; border: 2px solid var(--forest); background: var(--forest); color: var(--white); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover, .copy-btn:hover { background: var(--forest-deep); }
.btn-secondary, .copy-btn { background: var(--white); color: var(--forest); }
.btn-secondary:hover, .copy-btn:hover { background: var(--paper); }
.copy-btn { min-height: 48px; padding: 0.3rem 1rem; font-size: 0.95rem; }
.btn.is-disabled { opacity: 0.55; cursor: not-allowed; }
label, .big-label { display: block; font-weight: 600; margin: 0 0 0.3rem; }
select, input[type="text"], input[type="number"], textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 2px solid var(--muted); border-radius: 10px; padding: 0.6rem 0.75rem; width: 100%; max-width: 32rem; }
select, input[type="text"], input[type="number"] { min-height: var(--touch); }
.big-select { min-height: var(--touch); font-size: 20px; }
input[type="file"] { font: inherit; font-size: 0.95rem; min-height: var(--touch); max-width: 100%; }
textarea { min-height: 8rem; }
[aria-invalid="true"] { border-color: #8E2A1C; }
.error { color: #8E2A1C; font-weight: 600; }
.check { display: inline-flex; gap: 0.6rem; align-items: center; font-weight: 400; min-height: var(--touch); }
input[type="checkbox"], input[type="radio"] { width: 1.5rem; height: 1.5rem; accent-color: var(--forest); }
.radio { display: flex; align-items: center; gap: 0.6rem; min-height: var(--touch); margin: 0; }
.radio label { margin: 0; font-weight: 400; }
fieldset { border: 2px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 1rem; }
legend { font-weight: 600; padding: 0 0.3rem; }

/* Cards and panels */
.cards { display: grid; gap: 1rem; }
.card { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.card h3 { margin-top: 0.2em; }
.group-h { font-size: 1.15rem; margin: 1.4em 0 0.6em; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.bucket-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.6rem; }
.bucket-head h3 { margin: 0; }
.bucket-icon { width: 64px; height: 64px; flex: none; }
.card > :last-child { margin-bottom: 0; }
details.panel > summary, details.drill > summary { cursor: pointer; font-weight: 700; color: var(--forest); min-height: var(--touch); display: flex; align-items: center; gap: 0.6rem; list-style: none; padding: 0.3rem 0; }
details.panel > summary::-webkit-details-marker, details.drill > summary::-webkit-details-marker { display: none; }
details.panel > summary::before, details.drill > summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 2px solid var(--forest); border-radius: 50%; font-weight: 700; flex: none; line-height: 1; }
details[open].panel > summary::before, details[open].drill > summary::before { content: "−"; }
details.panel { margin: 0 0 1rem; }
details.panel:not(.card) { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0.2rem 0; }
.drill { margin: 0.4rem 0; }
.drill-body { padding: 0.3rem 0 0.4rem 0.2rem; }
.facts { margin: 0.5rem 0 1rem; }
.facts div { display: flex; flex-wrap: wrap; gap: 0 0.5rem; padding: 0.25rem 0; border-bottom: 1px dashed var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.funding-goal { font-weight: 600; }

/* Tags, placeholders and notices */
.tags { margin: 0 0 0.8rem; }
.tag, .tag-nc, .proposed { display: inline-block; font-size: 0.8rem; font-weight: 600; line-height: 1.4; border-radius: 999px; padding: 0.1rem 0.6rem; vertical-align: middle; }
.tag { border: 1px solid var(--forest); color: var(--forest); background: var(--white); }
.tag-nc { border: 1px solid var(--brass); color: var(--brass); background: var(--white); }
.proposed { border: 1px dashed var(--brass); color: var(--brass); background: var(--white); }
.placeholder { background: var(--white); border: 1px dashed var(--brass); border-radius: 6px; padding: 0 0.35em; color: var(--ink); font-style: italic; }
.notice { margin: 2rem 0 0; padding: 0.9rem 1.1rem; background: var(--white); border-left: 5px solid var(--forest); border-radius: 8px; font-size: 0.9rem; }
.notice p { margin: 0; }
.banner { background: var(--white); border: 2px solid var(--forest); border-radius: var(--radius); padding: 0.8rem 1rem; margin: 1rem 0; font-weight: 600; }
.note { color: var(--muted); font-style: italic; }
.status { font-weight: 600; color: var(--forest); }

/* Giving */
.giving { background: var(--white); border: 2px solid var(--line); border-radius: 18px; padding: 1.1rem 1.15rem 0.6rem; margin: 0 0 1rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.step { counter-increment: step; position: relative; padding-left: 3rem; margin: 0 0 1.1rem; }
.step::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--forest); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; line-height: 1; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 1.05rem; top: 2.5rem; bottom: -0.9rem; border-left: 2px dotted var(--line); }
.step > :last-child { margin-bottom: 0; }
.step .hint { margin-top: 0.4rem; }
.reference p { margin: 0 0 0.5rem; }
.instruction { font-size: 1.05rem; }
.reference code { font-size: 1.05rem; white-space: nowrap; }
.bank { background: var(--white); border-radius: 8px; padding: 0.5rem 0.75rem; border: 1px solid var(--line); }
.variation { border-left: 5px solid var(--brass); padding-left: 1rem; }
.clause { background: var(--white); border-left: 5px solid var(--forest); border-radius: 8px; padding: 0.9rem 1.1rem; margin: 0 0 0.6rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; }
.template { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1.1rem; }
.quote { border-left: 4px solid var(--line); padding-left: 1rem; }
.quote .cite { color: var(--muted); font-size: 0.9rem; }
.external-note .btn { margin-right: 0.4rem; }

/* Other buckets, at the foot of each bucket page */
.mini-buckets { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; }
.mini-buckets li { margin: 0; }
.mini-buckets a { display: flex; align-items: center; gap: 0.75rem; min-height: 64px; padding: 0.45rem 0.8rem 0.45rem 0.5rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; font-weight: 600; }
.mini-buckets a:hover { border-color: var(--forest); }
.mini-buckets img { width: 48px; height: 48px; flex: none; }

/* Proposals */
.proposal-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.proposal-list li { margin: 0; }
.responses { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.response { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 1rem; margin: 0; }
.response p { margin: 0 0 0.3rem; }
.response .rtype { font-weight: 700; color: var(--forest); }
.response .by { color: var(--muted); font-size: 0.85rem; margin: 0; }
.heard { background: var(--white); border-radius: var(--radius); border: 2px dashed var(--line); padding: 0.5rem 1rem; }
.minute { font-weight: 600; }

/* More detail */
.toc ol { padding-left: 1.4em; }
.toc li { padding: 0.15rem 0; }
.more-section { border-top: 2px solid var(--line); padding-top: 0.4rem; margin-top: 1.6rem; }
.more-section .summary { font-size: 1.05rem; }
.sources li { margin-bottom: 0.7rem; }
.sources .what { color: var(--muted); font-size: 0.9rem; }
.nc-group { font-size: 1rem; margin-top: 1.2em; }
.nc-line { font-size: 0.9rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
caption { text-align: left; padding: 0.5rem 0.75rem; font-weight: 600; color: var(--forest); }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); }
thead th { background: var(--paper); }
tr.group th { background: var(--paper); color: var(--forest); }
td input[type="number"] { min-width: 8rem; }

/* Feedback */
.message { white-space: pre-wrap; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; font-family: var(--font); font-size: 1rem; }
.result { margin-top: 1.5rem; }
.result p .btn { margin: 0 0.4rem 0.4rem 0; }

/* Treasurer */
.checks li, .checklist li { margin-bottom: 0.5rem; }
.report table { font-size: 0.9rem; }
.blanks { margin-top: 1rem; }

@media (max-width: 30rem) {
  html { font-size: 118.75%; }
  .front h1 { font-size: 1.95rem; }
  .page-icon { width: 72px; height: 72px; }
  .page-head h1 { font-size: 1.6rem; }
  header.slim { padding: 0.6rem 1rem; }
}
@media (max-width: 360px) {
  .front { padding-left: 0.9rem; padding-right: 0.9rem; }
  .chooser { padding: 1rem 0.9rem 0.8rem; border-radius: 18px; }
  .chooser-select { font-size: 0.95rem; padding-left: 0.6rem; padding-right: 0.4rem; }
  .chooser-preview { grid-template-columns: 56px minmax(0, 1fr); gap: 0.8rem; }
  .chooser-preview img { width: 56px; height: 56px; border-radius: 12px; }
  .path-links a { gap: 0.75rem; padding: 0.7rem 0.8rem; }
  .path-links img { width: 52px; height: 52px; }
  header.slim { padding-left: 0.8rem; padding-right: 0.8rem; gap: 0.5rem; }
  header.slim a { white-space: nowrap; }
  header.slim .home { font-size: 0.95rem; }
  header.slim .home img { width: 30px; height: 30px; }
  .inner { padding-left: 1rem; padding-right: 1rem; }
  .page-icon { width: 60px; height: 60px; }
}
@media (forced-colors: active) {
  .tag, .tag-nc, .proposed, .placeholder, .btn, .copy-btn { border: 2px solid CanvasText; }
}
