/* Crosscourt Notebook — hand-authored stylesheet.
   Palette: court green ink on warm paper, clay terracotta accent.
   No CSS framework is used: layout is CSS grid/flex authored here, so the
   page can never depend on a third-party bundle loading. */

:root{
  --green-900:#0a3323;
  --green-700:#0f4d33;
  --green-500:#1c6a49;
  --clay-600:#a8481a;
  --clay-500:#c05621;
  --clay-200:#e8c4ab;
  --paper:#faf7f0;
  --paper-2:#f2ece0;
  --ink:#1f2418;
  --ink-2:#4e5647;
  --line:#ddd5c6;
  --wrap:74rem;
  --measure:40rem;
  --serif:"Fraunces",Georgia,"Times New Roman",serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--sans);font-size:1.0625rem;line-height:1.68;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--green-700);text-underline-offset:.16em;text-decoration-thickness:.06em;}
a:hover{color:var(--clay-600);}

.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:1.5rem;}

.skip{position:absolute;left:-9999px;top:0;background:var(--green-700);color:#fff;padding:.6rem 1rem;z-index:50;}
.skip:focus{left:0;}

/* ---------- header ---------- */
.site-head{background:var(--paper);position:relative;}
.head-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:1rem;min-width:0;padding-block:1.15rem;flex-wrap:wrap;
}
.wordmark{
  font-family:var(--serif);font-weight:700;font-size:1.3rem;letter-spacing:-.01em;
  text-decoration:none;color:var(--green-900);white-space:nowrap;
}
.wordmark-b{color:var(--clay-600);font-weight:400;font-style:italic;}

/* Nav must be able to shrink and wrap — never flex-shrink:0, which pushes
   links past the viewport edge where they are silently clipped. */
.site-nav{min-width:0;flex:1 1 auto;}
.site-nav ul{
  list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;
  justify-content:flex-end;gap:.15rem .35rem;min-width:0;
}
.site-nav a{
  display:inline-block;padding:.4rem .6rem;border-radius:5px;
  font-size:.9rem;font-weight:500;letter-spacing:.01em;
  color:var(--ink-2);text-decoration:none;white-space:nowrap;
}
.site-nav a:hover{background:var(--paper-2);color:var(--green-700);}
.site-nav a.is-current{color:var(--green-700);box-shadow:inset 0 -2px 0 var(--clay-500);border-radius:0;}

.nav-toggle{display:none;}

/* the "court line" motif — a service line under the header */
.court-rule{height:3px;background:var(--green-700);position:relative;}
.court-rule::after{
  content:"";position:absolute;left:50%;top:0;width:64px;height:3px;
  background:var(--clay-500);transform:translateX(-50%);
}

/* ---------- hero (home) ---------- */
.hero{padding-top:3.5rem;}
.hero-inner{max-width:56rem;}
.eyebrow{
  font-size:.74rem;text-transform:uppercase;letter-spacing:.16em;
  font-weight:600;color:var(--clay-600);margin:0 0 .85rem;
}
.hero h1{
  font-family:var(--serif);font-weight:600;font-size:clamp(2.4rem,6vw,4rem);
  line-height:1.04;letter-spacing:-.02em;margin:0 0 1rem;color:var(--green-900);
}
.lede{font-size:1.2rem;line-height:1.6;color:var(--ink-2);max-width:42rem;margin:0 0 2.5rem;}

/* ---------- article head ---------- */
.page-head{padding:3.25rem 0 1.75rem;}
.page-head h1{
  font-family:var(--serif);font-weight:600;font-size:clamp(2rem,4.6vw,3.1rem);
  line-height:1.08;letter-spacing:-.02em;margin:0;color:var(--green-900);max-width:24ch;
}

/* ---------- figures ---------- */
.fig{margin:0 0 2.5rem;}
.fig img{border-radius:6px;border:1px solid var(--line);}
.fig-hero{margin-bottom:3rem;}
.fig-hero img{border-radius:0;border:0;border-block:1px solid var(--line);width:100%;}
.is-home .fig-hero img{max-height:30rem;object-fit:cover;}

/* ---------- prose ---------- */
.prose{max-width:var(--measure);padding-bottom:4rem;}
.is-home .prose{max-width:44rem;}
.prose h2{
  font-family:var(--serif);font-weight:600;font-size:1.65rem;line-height:1.22;
  letter-spacing:-.012em;color:var(--green-900);
  margin:3rem 0 .9rem;padding-top:1.4rem;border-top:1px solid var(--line);
}
.prose h3{
  font-family:var(--sans);font-weight:600;font-size:1.06rem;letter-spacing:.005em;
  color:var(--clay-600);margin:2rem 0 .55rem;
}
.prose p{margin:0 0 1.15rem;}
.prose ul,.prose ol{margin:0 0 1.4rem;padding-left:1.35rem;}
.prose li{margin-bottom:.55rem;}
.prose li::marker{color:var(--clay-500);}
.prose strong{color:var(--green-900);font-weight:600;}
.prose em{color:var(--ink-2);}
.prose a{font-weight:500;}
.prose > p:first-of-type{font-size:1.13rem;color:var(--ink-2);}

/* ---------- related ---------- */
.related{
  max-width:var(--measure);margin:0 0 4rem;padding:1.4rem 1.5rem;
  background:var(--paper-2);border-left:3px solid var(--clay-500);border-radius:0 6px 6px 0;
}
.related h2{
  font-family:var(--sans);font-size:.74rem;text-transform:uppercase;letter-spacing:.14em;
  color:var(--ink-2);margin:0 0 .7rem;font-weight:600;
}
.related ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.4rem 1.4rem;}
.related a{font-weight:500;font-size:.98rem;}

/* ---------- footer ---------- */
.site-foot{background:var(--green-900);color:#cfd8cd;margin-top:2rem;padding:3.5rem 0 2.5rem;}
.site-foot .wordmark{color:#fff;font-size:1.2rem;}
.site-foot .wordmark-b{color:var(--clay-200);}
.foot-top{display:grid;grid-template-columns:minmax(0,1fr);gap:2.5rem;}
.foot-brand p{font-size:.93rem;line-height:1.6;color:#a9b6a9;max-width:34rem;margin:.9rem 0 0;}
.foot-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:1.75rem;}
.foot-col h2{
  font-family:var(--sans);font-size:.72rem;text-transform:uppercase;letter-spacing:.14em;
  color:var(--clay-200);margin:0 0 .7rem;font-weight:600;
}
.foot-col ul{list-style:none;margin:0;padding:0;}
.foot-col li{margin-bottom:.42rem;}
.site-foot a{color:#dfe6dd;text-decoration:none;font-size:.92rem;}
.site-foot a:hover{color:#fff;text-decoration:underline;}
.foot-legal{
  margin:2.75rem 0 0;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.13);
  font-size:.82rem;color:#8d9b8d;line-height:1.6;
}

/* ---------- responsive ---------- */
@media (min-width:56rem){
  .foot-top{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:3.5rem;}
}
@media (max-width:46rem){
  .head-inner{padding-block:.9rem;}
  .nav-toggle{
    display:flex;flex-direction:column;justify-content:center;gap:4px;
    width:42px;height:38px;padding:0 9px;background:transparent;
    border:1px solid var(--line);border-radius:5px;cursor:pointer;
  }
  .nav-toggle span{display:block;height:2px;background:var(--green-700);border-radius:2px;}
  .site-nav{flex-basis:100%;}
  .site-nav ul{justify-content:flex-start;padding-top:.5rem;}
  /* Nav is OPEN by default and only collapsed once JS confirms it can
     reopen it — content must never be hidden waiting on JavaScript. */
  .site-nav[data-collapsible="1"]{display:none;}
  .site-nav[data-collapsible="1"].is-open{display:block;}
  .hero{padding-top:2.25rem;}
  .page-head{padding:2.25rem 0 1.25rem;}
  .prose h2{margin-top:2.4rem;}
}

@media print{
  .site-head,.site-foot,.related,.skip{display:none;}
  body{background:#fff;}
  .prose{max-width:none;}
}
