/* Palo Alto AYSO. One left-aligned reading column on white; the only loud thing is the yellow card. */
:root {
  --bg: #ffffff;
  --ink: #14231b;
  --muted: #56645c;
  --line: #d3dcd6;
  --wash: #eff4f0;
  --pitch: #17603a;
  --pitch-deep: #0e4428;
  --btn: #17603a;
  --btn-ink: #ffffff;
  --yellow: #ffd83d;
  --yellow-ink: #1b1a10;
  --display: "Besley", "Rockwell", "Georgia", serif;
  --body: "Alegreya Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --max: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1713; --ink: #e9f0ea; --muted: #a2b1a7; --line: #2b3a31; --wash: #18231d;
    --pitch: #84d6a5; --pitch-deep: #abe6c2; --btn: #84d6a5; --btn-ink: #0f1713;
    --yellow: #ffd83d; --yellow-ink: #1b1a10; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1713; --ink: #e9f0ea; --muted: #a2b1a7; --line: #2b3a31; --wash: #18231d;
  --pitch: #84d6a5; --pitch-deep: #abe6c2; --btn: #84d6a5; --btn-ink: #0f1713;
  --yellow: #ffd83d; --yellow-ink: #1b1a10; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.25rem; line-height: 1.5;
}
a { color: var(--pitch); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--pitch-deep); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 1.8rem); margin-top: 2.6rem; margin-bottom: .6rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .35rem; }
strong, b { font-weight: 700; }

.wrap, .top, main, .foot {
  max-width: var(--max); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--bg); padding: 8px; z-index: 10; }

/* header */
.top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; padding-block: 18px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; margin-right: auto; }
.ball { width: 26px; height: 26px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; padding: 4px 0; border-bottom: 3px solid transparent; }
.top nav a:hover { border-color: var(--line); }
.top nav a[aria-current] { border-color: var(--yellow); }

/* buttons */
.btn { display: inline-block; background: var(--btn); color: var(--btn-ink); text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 4px; line-height: 1.2; border: 2px solid var(--btn); }
.btn:hover { background: var(--pitch-deep); border-color: var(--pitch-deep); color: var(--btn-ink); }
.btn-small { padding: 7px 14px; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--pitch); }
.btn-ghost:hover { background: var(--wash); color: var(--pitch-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2rem 0 0; }

/* page heads */
.page-head { padding-top: 34px; }
.lead { font-size: 1.45rem; line-height: 1.35; color: var(--muted); margin-top: .9rem; }

/* home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; gap: 34px; align-items: start; padding-block: 40px 34px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 3.3rem); text-wrap: pretty; }
.yellow { background: var(--yellow); color: var(--yellow-ink); padding: 20px 22px 16px; border-radius: 6px; transform: rotate(1.5deg); }
.yellow h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
.yellow p { margin-bottom: .6rem; font-size: 1.15rem; line-height: 1.4; }
.yellow a { color: var(--yellow-ink); font-weight: 700; }
.index { display: grid; border-top: 2px solid var(--ink); margin-bottom: 1.6rem; }
.index a { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 4px 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.index a b { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--pitch); }
.index a span { color: var(--muted); }
.index a:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* dates and places: label on the left, detail on the right */
.dates, .places { list-style: none; padding: 0; margin: 0 0 1.2rem; border-top: 1px solid var(--line); }
.dates li, .places li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 2px 16px; padding: 11px 0; margin: 0; border-bottom: 1px solid var(--line); }
.dates b, .places b { font-weight: 700; }

/* tables */
.scroll { overflow-x: auto; margin: 0 0 1.1rem; }
table { border-collapse: collapse; width: 100%; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 1rem; border-bottom: 2px solid var(--ink); }
td:first-child { font-weight: 700; white-space: nowrap; }

/* fold-away detail */
details { border: 1px solid var(--line); border-radius: 4px; padding: 0 16px; margin: 0 0 1rem; background: var(--wash); }
summary { cursor: pointer; font-weight: 700; color: var(--pitch); padding: 12px 0; }
details[open] summary { margin-bottom: .4rem; }

/* footer */
.foot { margin-top: 64px; padding-block: 22px 44px; border-top: 2px solid var(--ink); display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 1.05rem; }
.foot span { margin-right: auto; }

@media (max-width: 640px) {
  body { font-size: 1.18rem; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 24px 28px; }
  .yellow { transform: none; }
  .index a, .dates li, .places li { grid-template-columns: minmax(0, 1fr); }
  .top nav { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
