/* Patorana website — one stylesheet, system fonts only, no external requests (ADR-0008).
   Colours follow the app's asset catalog (accent, ochre, surfaceWarm). */

:root {
  color-scheme: light dark;
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --text: #1f1d1a;
  --muted: #5c5750;
  --accent: #2f6b4f;
  --ochre: #8a5a12;
  --border: #ddd4c4;
  --draft-bg: #fff3d6;
  --draft-border: #e0b65a;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b19;
    --surface: #262420;
    --text: #f2ede4;
    --muted: #b9b2a6;
    --accent: #7cc4a0;
    --ochre: #e7b75f;
    --border: #3d3a34;
    --draft-bg: #3a2f17;
    --draft-border: #a3802f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 1; }

header.site, footer.site, main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }

nav.site ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0; padding: 0; }
nav.site a { text-decoration: none; }
nav.site a[aria-current="page"] { text-decoration: underline; font-weight: 600; }

main { padding-top: 1.5rem; padding-bottom: 3rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0 0.75rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.25rem; }

.lead { font-size: 1.2rem; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.95rem; }

.draft {
  background: var(--draft-bg);
  border: 1px solid var(--draft-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
}

.todo { background: var(--draft-bg); border-bottom: 2px dotted var(--draft-border); padding: 0 0.2em; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 1.5rem 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; }
.card h2, .card h3 { margin-top: 0; font-size: 1.1rem; }
.card p { margin: 0.25rem 0 0; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
.table-wrap { overflow-x: auto; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 1rem; margin: 0.6rem 0; }
summary { cursor: pointer; font-weight: 600; }

footer.site {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
footer.site ul { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

@media print {
  header.site nav, footer.site ul, .skip { display: none; }
  body { background: #fff; color: #000; }
}

caption { text-align: left; }
