/* Self-hosted fonts (from @fontsource, copied into /fonts). Works fully offline. */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/cormorant-garamond-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url('/fonts/cormorant-garamond-latin-600-italic.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  /* palette: olive & beige. Text pairs checked for WCAG AA (see README). */
  --cream: #F3EBDD;
  --cream-2: #F8F3E8;
  --sand: #E8DCC4;
  --sand-2: #DDCFB3;
  --olive: #6B7A3E;
  --olive-2: #5A6834;
  --olive-deep: #3C4A27;
  --olive-ink: #2A3419;
  --gold: #C2A25A;
  --gold-2: #A8883F;
  --gold-soft: #E6D5A8;
  --terra: #B8734A;
  --terra-text: #8A4F2C;
  --ink: #272B1C;
  --muted: #6A6757;
  --line: rgba(60, 74, 39, 0.16);
  --ok: #5B7F3B;
  --bad: #A4553A;

  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 10px 30px -14px rgba(42, 52, 25, 0.35);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Cormorant defaults to old-style figures ("1" looks like a small I); scores need lining figures. */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -0.005em; margin: 0; color: var(--olive-ink); font-variant-numeric: lining-nums; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--olive-deep); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive-2); /* 5.3:1 on cream; plain --olive is only 3.96:1 */
  font-weight: 600;
}
.muted { color: var(--muted); }
.serif-i { font-family: var(--serif); font-style: italic; font-weight: 400; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  background: var(--olive-deep);
  color: var(--cream-2);
  transition: transform .15s var(--ease), background .2s, opacity .2s, box-shadow .2s;
  box-shadow: 0 6px 18px -10px rgba(42, 52, 25, 0.6);
}
.btn:hover { background: var(--olive-ink); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: transparent; color: var(--olive-deep); border-color: var(--olive-deep); box-shadow: none; }
.btn.secondary:hover { background: rgba(60, 74, 39, 0.07); }
.btn.ghost { background: transparent; color: var(--olive-deep); box-shadow: none; }
.btn.ghost:hover { background: rgba(60, 74, 39, 0.07); }
.btn.gold { background: #8F7230; color: #fff; } /* 4.7:1; --gold-2 is only 3.4:1 with white text */
.btn.danger { background: var(--terra-text); color: #fff; }
.btn.sm { padding: 0.5rem 0.9rem; font-size: 0.875rem; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tile:focus-visible, .pill:focus-visible {
  outline: 3px solid rgba(194, 162, 90, 0.75); outline-offset: 2px;
}

.card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field { display: grid; gap: .4rem; }
.field label { font-size: .8rem; font-weight: 600; color: var(--olive-deep); letter-spacing: .04em; }
.input, input[type=text], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%;
  border: 1px solid var(--sand-2);
  background: #fff;
  border-radius: var(--radius-s);
  padding: .75rem .9rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--olive); box-shadow: 0 0 0 4px rgba(107, 122, 62, 0.12); outline: none; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--olive-deep); }

/* Option shapes: letters + shapes, not garish colours. */
.shape { display: inline-grid; place-items: center; width: 1em; height: 1em; }
.shape svg { width: 100%; height: 100%; display: block; }

.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; background: var(--olive); vertical-align: middle; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.rise { animation: rise .45s var(--ease) both; }
.fade { animation: fade .35s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  background: var(--olive-ink); color: var(--cream-2);
  padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow);
  z-index: 50; animation: rise .3s var(--ease) both; max-width: min(92vw, 36rem);
}
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* Admin shortcut (the page itself is password-protected) */
.admin-link { font: inherit; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--olive, #6b7046); border: 1px solid currentColor; border-radius: 999px; padding: .15rem .5rem; opacity: .8; white-space: nowrap; }
.admin-link:hover, .admin-link:focus-visible { opacity: 1; }
.tv .admin-link { font-size: 1.1rem; padding: .45rem 1.1rem; }
