/* Shared theme tokens. Light is the default; explicit preferences persist. */
:root{
 color-scheme:light;
 --bg:#fcfcfa;
 --ink:#171b17;
 --muted:#6e746c;
 --line:#e2e5dd;
 --surface:#f5f4ef;
 --dark:#111510;
 --on-dark:#f5f4ef;
 --dark-muted:#aab3a5;
 --dark-line:#32392f;
 --availability-green:#16a34a;
 --nav-bg:var(--bg);
 --contact-bg:var(--accent);
 --contact-ink:var(--ink);
 --contact-muted:var(--on-accent);
 --contact-line:var(--ink);
 --contact-heading:var(--ink);
 --cta-bg:var(--ink);
 --cta-ink:var(--accent);

 --on-accent:#19330b;
}
:root[data-theme="dark"]{
 color-scheme:dark;
 --bg:#101410;
 --ink:#f3f5ef;
 --muted:#b1baac;
 --line:#364132;
 --surface:#192018;
 --dark:#151c14;
 --on-dark:#f3f5ef;
 --dark-muted:#b1baac;
 --dark-line:#364132;
 --availability-green:#50cf75;
 --nav-bg:var(--dark);
 --contact-bg:#192b16;
 --contact-ink:#edf5e8;
 --contact-muted:#b8cbb0;
 --contact-line:#3a5132;
 --contact-heading:var(--accent);
 --cta-bg:var(--accent);
 --cta-ink:var(--on-accent);
}
.masthead{background:var(--nav-bg)}
.masthead .navlinks{background:var(--nav-bg)}
::selection{background:var(--accent);color:var(--on-accent)}
.skip{color:var(--on-accent)}
.contact,.footer{
 background:var(--contact-bg);
 color:var(--contact-ink);
 --accent-ink:var(--contact-muted);
 --line:var(--contact-line);
}
.home-contact .page-intro h2{color:var(--contact-heading)}
.contact-brief{border-color:var(--contact-line)}
.cta{background:var(--cta-bg);color:var(--cta-ink)}
.theme-toggle{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 width:var(--target);
 min-height:var(--target);
 flex:0 0 var(--target);
 padding:var(--space-2);
 border:var(--stroke) solid var(--line);
 border-radius:var(--radius-pill);
 background:var(--surface);
 color:var(--ink);
 transition:opacity var(--duration-fast) var(--ease-standard);
}
.theme-toggle .icon{width:var(--icon-size-cta);height:var(--icon-size-cta)}
.theme-sun{display:none}
:root[data-theme="dark"] .theme-sun{display:block}
:root[data-theme="dark"] .theme-moon{display:none}
@media(hover:hover){.theme-toggle:hover{opacity:.7}}
@media(max-width:800px){.masthead .navigation{gap:var(--space-2)}}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}}
/* Keep the menu compact when the full row would crowd the theme control. */
@media(max-width:800px){
 .masthead .header-inner{display:flex;justify-content:space-between;position:relative}
 .masthead .navlinks{
  position:absolute;
  inset:calc(100% + var(--space-2)) 0 auto;
  padding:var(--space-4);
  border:var(--stroke) solid var(--line);
  border-radius:var(--radius-card);
  flex-direction:column;
  align-items:stretch;
  gap:0;
  max-height:calc(100dvh - var(--nav-frame-clearance) - var(--space-2));
  overflow-y:auto;
  overscroll-behavior:contain;
 }
 .masthead .navlinks a{font-size:var(--text-sm);padding-inline:var(--space-3)}
}

/* Balance the desktop menu around the frame's true midpoint. */
.masthead .header-inner{gap:var(--space-2)}
@media(min-width:801px){
 .masthead .header-inner{
  display:grid;
  grid-template-columns:minmax(var(--target),1fr) auto minmax(var(--target),1fr);
  gap:var(--space-4);
 }
 .masthead .brand{justify-self:start}
 .masthead .navigation{justify-self:center;justify-content:center}
 .masthead .navlinks{justify-content:center}
 .masthead .theme-toggle{justify-self:end}
}
@media(max-width:800px){
 .masthead .navigation{margin-left:auto}
}
