/* Shared styles for the static site. No dependencies. Light and dark follow the system setting. */
:root {
  --bg: #fbf7f2;
  --surface: #ffffff;
  --surface-2: #f3ece4;
  --text: #2b2623;
  --muted: #6a615a;
  --border: #e4d9cd;
  --accent: #8a3b4d;
  --accent-text: #ffffff;
  --note-bg: #fff4d6;
  --note-border: #e0c36a;
  --note-text: #4a3a05;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1715;
    --surface: #26201d;
    --surface-2: #2f2824;
    --text: #f1e9e2;
    --muted: #b9aea5;
    --border: #3d332e;
    --accent: #e8a6b3;
    --accent-text: #2b1a1e;
    --note-bg: #3a3011;
    --note-border: #7a6420;
    --note-text: #f3e3a8;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; margin: 1.6rem 0 0.6rem; }
h2 { font-size: 1.4rem; margin: 2.2rem 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }

p, ul, ol { margin: 0.7rem 0; }
li { margin: 0.35rem 0; }

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

.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--text); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

main { padding-bottom: 2.5rem; }

.meta { color: var(--muted); font-size: 0.95rem; margin-top: 0; }

.lede { font-size: 1.2rem; color: var(--muted); }

.hero { padding: 1.5rem 0 0.5rem; }
.hero h1 { font-size: 2.2rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin: 1rem 0; }
.card h2, .card h3 { margin-top: 0; }

.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grid.two { grid-template-columns: 1fr 1fr; } }

.pill { display: inline-block; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

.button, button {
  display: inline-block;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

form label { display: block; font-weight: 600; margin-top: 0.9rem; }
form .hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input[type="email"], input[type="text"], textarea {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
form button { margin-top: 1rem; }

.draft-note { background: var(--note-bg); color: var(--note-text); border: 1px solid var(--note-border); border-radius: 10px; padding: 4px 14px; margin: 1rem 0; font-size: 0.95rem; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; margin: 0.6rem 0; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 44px; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 8px; }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 24px 0 32px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0.5rem 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
