/* Explicit Good Dog surfaces, never image filters or universal colour inversion.
   Load last. Integrate ONLY after each page's literal-colour audit is resolved. */
html[data-gd-theme] {
  --gd-bg:#f7f1e3; --gd-surface:#fffdf7; --gd-raised:#e6eee5;
  --gd-text:#173e32; --gd-muted:#465e51; --gd-line:#758b7d;
  --gd-action:#173e32; --gd-action-text:#fffdf7;
  --gd-accent:#913d27; --gd-focus:#913d27; --gd-error:#913d27;
  --gd-halo:rgba(115,144,98,.19); --gd-shadow:rgba(23,62,50,.09);
  color-scheme:light;
  background:var(--gd-bg);
}
html[data-gd-theme="dark"] {
  --gd-bg:#12251f; --gd-surface:#1b342b; --gd-raised:#284437;
  --gd-text:#f7f1e3; --gd-muted:#c2d0c3; --gd-line:#859f8c;
  --gd-action:#d5e8c9; --gd-action-text:#173e32;
  --gd-accent:#f2bca1; --gd-focus:#f2ce87; --gd-error:#ffc7ad;
  --gd-halo:rgba(176,209,143,.15); --gd-shadow:rgba(0,0,0,.16);
  color-scheme:dark;
}
html[data-gd-theme] body.gd-theme-ready {
  background:var(--gd-bg); color:var(--gd-text);
  --cream:var(--gd-bg); --ink:var(--gd-text); --accent:var(--gd-accent);
  --pale:var(--gd-raised); --light:var(--gd-surface); --paper:var(--gd-surface);
  --sage:var(--gd-raised); --muted:var(--gd-muted); --line:var(--gd-line);
  --gd-paper:var(--gd-surface); --gd-ink:var(--gd-text);
  --rust:var(--gd-error); --blue:var(--gd-accent); --disabled:var(--gd-muted);
}
/* Attribute contracts work for new templates without stale whole-file patches. */
html[data-gd-theme] .gd-theme-ready [data-gd-surface="base"] { background:var(--gd-bg); color:var(--gd-text); border-color:var(--gd-line); }
html[data-gd-theme] .gd-theme-ready [data-gd-surface="card"] { background:var(--gd-surface); color:var(--gd-text); border-color:var(--gd-line); }
html[data-gd-theme] .gd-theme-ready [data-gd-surface="raised"] { background:var(--gd-raised); color:var(--gd-text); border-color:var(--gd-line); }
html[data-gd-theme] .gd-theme-ready [data-gd-surface="action"] { background:var(--gd-action); color:var(--gd-action-text); border-color:var(--gd-action); }
html[data-gd-theme] .gd-theme-ready [data-gd-text="muted"] { color:var(--gd-muted); }
html[data-gd-theme] .gd-theme-ready [data-gd-text="error"] { color:var(--gd-error); }
html[data-gd-theme] .gd-theme-ready [data-gd-backlit] { box-shadow:0 2px 12px var(--gd-shadow),0 0 25px var(--gd-halo); }
html[data-gd-theme] .gd-theme-ready :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline:3px solid var(--gd-focus); outline-offset:4px;
}
/* This is intentionally in normal document flow, not a floating overlay. */
html[data-gd-theme] .gd-appearance {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start;
  gap:8px 12px; margin:0; padding:8px 0;
  max-width:100%; font:14px/1.5 Arial,Helvetica,sans-serif;
  color:var(--gd-text); background:var(--gd-bg);
}
html[data-gd-theme] .gd-appearance[hidden] { display:none; }
html[data-gd-theme] .gd-appearance select {
  box-sizing:border-box; min-height:44px; min-width:130px; width:auto; max-width:100%;
  margin:0; padding:10px 12px; border:1px solid var(--gd-line); border-radius:8px;
  font:inherit; color:var(--gd-text); background:var(--gd-surface);
}
html[data-gd-theme] .gd-appearance a { color:var(--gd-text); min-height:44px; display:inline-flex; align-items:center; text-underline-offset:3px; }
html[data-gd-theme] .gd-appearance [role="status"] { flex-basis:100%; margin:0; font-size:13px; color:var(--gd-muted); }
html[data-gd-theme] .gd-appearance [role="status"]:empty { display:none; }
html[data-gd-theme] .gd-appearance-note { max-width:70ch; font-size:14px; line-height:1.6; color:var(--gd-muted); }
/* A single 240ms light-edge shimmer, not a moving link or button. No timer. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  html[data-gd-theme] .gd-theme-ready [data-gd-hover-light]:hover:not(:focus-within) { animation:gd-halo-nudge 240ms ease-out 1; }
}
@keyframes gd-halo-nudge {
  0%,100% { box-shadow:0 2px 12px var(--gd-shadow),0 0 25px var(--gd-halo); }
  35% { box-shadow:0 2px 12px var(--gd-shadow),2px 0 25px var(--gd-halo); }
  70% { box-shadow:0 2px 12px var(--gd-shadow),-1px 0 25px var(--gd-halo); }
}
html[data-gd-theme] .gd-theme-ready [data-gd-backlit]:focus-within { box-shadow:0 0 0 2px var(--gd-line),0 0 25px var(--gd-halo); }
html[data-gd-page-hidden="true"] .gd-theme-ready [data-gd-hover-light],
html[data-gd-theme] .gd-theme-ready [hidden] [data-gd-hover-light],
html[data-gd-theme] .gd-theme-ready [data-gd-hover-light][hidden] { animation:none; }
@media (prefers-reduced-motion:reduce) {
  html[data-gd-theme] { scroll-behavior:auto; }
  html[data-gd-theme] .gd-theme-ready [data-gd-hover-light] { animation:none; transition:none; }
}
@media (forced-colors:active) {
  html[data-gd-theme] .gd-theme-ready [data-gd-backlit] { box-shadow:none; border:1px solid CanvasText; }
  html[data-gd-theme] .gd-theme-ready :focus-visible { outline:3px solid Highlight; }
}

/* Food desktop already exposes the link row: avoid widening its header. */
@media (min-width:761px) { html[data-gd-theme] .gd-shop-menu .gd-appearance { display:none; } }
html[data-gd-theme] .gd-utility-links .gd-appearance { background:var(--gd-surface); padding:8px 12px; }
html[data-gd-theme] .gd-appearance-note { scroll-margin-top:110px; }
