/* Spike & Suzy Games — shared farm look for the quiz and typing games (colours from Do You Speak Dog?). */
:root {
  --sky: #8fd3ff; --sky-2: #dff3ff; --grass: #6dbb5a; --grass-2: #3e8e3a;
  --barn: #c43d2c; --barn-2: #a8321f; --straw: #ffcf4a; --straw-2: #fff3c7;
  --ink: #1d2733; --ink-2: #4a5663; --paper: #fffdf7; --line: #e4dccb;
  --spike: #2b2622; --spike-tan: #c98a45; --suzy: #7a4a1e; --suzy-amber: #f2b705;
  --green: #2e8b3e; --red: #b3261e; --focus: #0b5fff;
  --radius: 20px;
  --shadow: 0 6px 0 rgba(29, 39, 51, .12), 0 10px 24px rgba(29, 39, 51, .10);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font-family: ui-rounded, "Nunito", "Quicksand", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; line-height: 1.45;
  background:
    radial-gradient(120% 40% at 20% 104%, var(--grass) 0 60%, transparent 61%),
    radial-gradient(120% 36% at 90% 106%, var(--grass-2) 0 60%, transparent 61%),
    linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 45%, #eaf8e3 100%);
  background-attachment: fixed;
}
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.ssg-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
.ssg-shell { max-width: 760px; margin: 0 auto; padding: 0 14px 56px; }
.ssg-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0 12px; background: linear-gradient(180deg, rgba(143, 211, 255, .97) 72%, rgba(143, 211, 255, 0));
}
.ssg-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 999px;
  background: var(--paper); border: 3px solid #fff; box-shadow: 0 3px 0 rgba(29, 39, 51, .15);
  color: var(--ink); font-weight: 900; font-size: 17px; text-decoration: none;
}
.ssg-back:hover { background: #fff; }
.ssg-brand { text-align: right; line-height: 1.05; font-weight: 900; color: var(--barn); font-size: 19px; letter-spacing: .03em; text-shadow: 0 2px 0 #fff; }
.ssg-brand small { display: block; font-size: 12px; color: var(--ink); letter-spacing: .1em; text-shadow: none; text-transform: uppercase; }
.ssg-main { display: flex; flex-direction: column; gap: 16px; outline: none; }

/* headings */
.ssg-eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #7a4a12;
  background: var(--straw); border-radius: 999px; padding: 6px 14px; border: 2px solid #fff;
}
.ssg-h1 { font-size: clamp(34px, 9vw, 52px); font-weight: 900; line-height: 1.05; color: var(--ink); text-shadow: 0 3px 0 #fff; }
.ssg-lead { font-size: 19px; font-weight: 600; color: var(--ink); }

/* cards */
.ssg-card { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.ssg-card--win { background: #fff8dc; border: 4px solid var(--straw); text-align: center; align-items: center; }
.ssg-kicker { font-size: 14px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--barn); }
.ssg-h2 { font-size: clamp(24px, 6.4vw, 32px); font-weight: 900; line-height: 1.15; outline: none; }
.ssg-text { font-size: 17px; color: var(--ink-2); }
.ssg-label { font-size: 17px; font-weight: 900; }

/* pictures (emoji placeholders — no herd images are loaded) */
.ssg-stills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.ssg-still { margin: 0; border-radius: var(--radius); background: linear-gradient(180deg, #fff3c7, #eaf7e6); border: 3px solid #fff; box-shadow: var(--shadow); padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; min-height: 110px; }
.ssg-still__art { font-size: clamp(34px, 9vw, 56px); line-height: 1.1; }
.ssg-still figcaption { font-size: 14px; line-height: 1.25; font-weight: 700; color: var(--ink-2); }
.ssg-intro { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
.ssg-tile { width: 60px; height: 60px; border-radius: 16px; background: var(--straw-2); display: flex; align-items: center; justify-content: center; font-size: 34px; flex: none; }
.ssg-intro p { flex: 1; min-width: 9em; font-size: 16px; color: var(--ink-2); }

/* farm visit points */
.ssg-points__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.ssg-points__title { font-weight: 900; font-size: 18px; }
.ssg-points__note { font-size: 15px; color: var(--ink-2); }
.ssg-bar { height: 16px; border-radius: 999px; background: #e7e1d3; overflow: hidden; border: 2px solid #fff; }
.ssg-bar__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--grass), var(--grass-2)); transition: width .4s ease; }
.ssg-bar--thin { height: 12px; }
.ssg-bar--gold .ssg-bar__fill { background: linear-gradient(90deg, #ffd84d, #f4b400); transition: width 1s linear; }

/* option buttons */
.ssg-choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ssg-choices--2 { grid-template-columns: 1fr 1fr; }
.ssg-choices--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .ssg-choices--cols4 { grid-template-columns: repeat(4, 1fr); } }
.ssg-opt {
  width: 100%; min-height: 56px; border-radius: 18px; border: 3px solid #d8cfbd; background: #fff; color: var(--ink);
  font: inherit; font-size: 18px; font-weight: 800; padding: 10px 14px; cursor: pointer; box-shadow: 0 3px 0 rgba(29, 39, 51, .12);
  display: flex; align-items: center; justify-content: center; text-align: center; gap: 8px;
}
@media (hover: hover) { .ssg-opt:hover:not([disabled]) { border-color: var(--barn); } }
.ssg-opt[aria-pressed="true"] { background: var(--straw-2); border-color: #e0a800; box-shadow: 0 0 0 3px rgba(242, 183, 5, .35); }
.ssg-opt--band { flex-direction: column; gap: 0; line-height: 1.15; }
.ssg-opt--band small { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ssg-answer {
  width: 100%; min-height: 64px; border-radius: 18px; border: 3px solid #d8cfbd; background: #fff; color: var(--ink);
  font: inherit; font-size: 20px; font-weight: 800; padding: 12px 16px; cursor: pointer; box-shadow: var(--shadow);
  display: flex; align-items: center; text-align: left; gap: 10px;
}
.ssg-choices--2 .ssg-answer { justify-content: center; text-align: center; font-size: 22px; }
@media (hover: hover) { .ssg-answer:hover:not([disabled]) { border-color: var(--barn); } }
.ssg-answer[disabled] { cursor: default; }
.ssg-answer.is-correct { background: #eaf7e6; border-color: var(--green); color: #1d5c28; }
.ssg-answer.is-wrong { background: #f4f1ea; border-color: #b9b4a8; border-style: dashed; color: #6a6a6a; box-shadow: none; }
.ssg-answer.is-faded { opacity: .7; box-shadow: none; }
.ssg-answer__mark { margin-left: auto; font-size: 22px; flex: none; }
.ssg-choices--2 .ssg-answer__mark { margin-left: 0; }

/* buttons */
.ssg-btn {
  min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center;
  border-radius: 999px; border: 3px solid rgba(0, 0, 0, .06); padding: 10px 22px; cursor: pointer;
  font: inherit; font-weight: 900; font-size: 19px; letter-spacing: .02em; color: var(--ink); background: #fff; box-shadow: var(--shadow);
}
.ssg-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(29, 39, 51, .15); }
.ssg-btn--primary { background: var(--barn); color: #fff; }
.ssg-btn--primary:hover { background: var(--barn-2); }
.ssg-btn--cta { background: linear-gradient(180deg, #ffd84d, #f4b400); color: #3b2500; border-color: #fff; }
.ssg-btn--ghost { background: rgba(255, 255, 255, .94); }
.ssg-btn--small { min-height: 48px; font-size: 16px; padding: 6px 16px; }
.ssg-btn--wide { width: 100%; }
.ssg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* play HUD */
.ssg-hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ssg-hud__count { font-size: 18px; font-weight: 900; background: #fff; border-radius: 999px; padding: 8px 14px; }
.ssg-hud__right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ssg-timer { min-height: 48px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border-radius: 999px; background: #fff8dc; border: 3px solid var(--straw); font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.ssg-timer.is-low { background: #fdecea; border-color: #e7a19b; color: var(--red); }
.ssg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ssg-chip { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; font-weight: 900; font-size: 18px; border: 3px solid transparent; }
.ssg-chip--spike { background: var(--spike); color: #ffe6b8; }
.ssg-chip--suzy { background: var(--suzy); color: #fff3d6; }
.ssg-chip.is-active { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--suzy-amber); }
.ssg-chip.is-idle { opacity: .8; }
.ssg-chip__streak { font-size: 15px; }
.ssg-turn { border-radius: var(--radius); padding: 12px 16px; text-align: center; font-size: 20px; font-weight: 900; box-shadow: var(--shadow); }
.ssg-turn--spike { background: var(--spike); color: #ffe6b8; }
.ssg-turn--suzy { background: var(--suzy); color: #fff3d6; }
.ssg-prompt { font-size: clamp(22px, 5.8vw, 28px); font-weight: 900; line-height: 1.25; outline: none; }
.ssg-fact { background: #fff8dc; border: 3px solid var(--straw); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ssg-fact__head { font-weight: 900; font-size: 17px; color: #7a4a12; }
.ssg-fact__body { font-size: 18px; }
.ssg-fact__answer { font-size: 17px; color: var(--ink-2); }
.ssg-fact__answer strong { color: var(--ink); }
.ssg-result-line { font-size: 20px; font-weight: 900; }
.ssg-big { font-size: clamp(28px, 7.5vw, 40px); font-weight: 900; color: var(--barn); line-height: 1.1; outline: none; }

/* typing */
.ssg-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.ssg-toggle .ssg-opt { width: auto; flex: 1 1 180px; }
.ssg-check { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 900; cursor: pointer; }
.ssg-check input { width: 26px; height: 26px; accent-color: var(--barn); }
.ssg-host { border-radius: 18px; padding: 12px 16px; border: 3px solid; }
.ssg-host--spike { background: #f1eee9; border-color: #cfc6b8; }
.ssg-host--suzy { background: #fff3dc; border-color: #ecc98a; }
.ssg-host__who { font-weight: 900; letter-spacing: .1em; text-transform: uppercase; font-size: 15px; }
.ssg-target-label { text-align: center; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--barn); font-size: 15px; }
.ssg-target { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: clamp(40px, 12vw, 56px); letter-spacing: .04em; background: #fff; border-radius: 18px; padding: 14px 10px; border: 3px dashed var(--line); overflow-wrap: anywhere; }
.ssg-target--sentence { font-size: clamp(24px, 6.4vw, 32px); line-height: 1.3; }
.ssg-input {
  width: 100%; min-height: 64px; border-radius: 18px; border: 3px solid #d8cfbd; background: #fffef9; color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 26px; padding: 10px 16px; text-align: center;
}
.ssg-input--sentence { text-align: left; font-size: 22px; }
.ssg-input:focus { outline: none; border-color: var(--barn); box-shadow: 0 0 0 4px rgba(196, 61, 44, .2); }
.ssg-input[aria-invalid="true"] { border-color: #d98b2b; }
.ssg-feedback { min-height: 26px; text-align: center; font-weight: 800; font-size: 17px; color: var(--ink-2); }
.ssg-feedback.is-correct { color: var(--green); }
.ssg-feedback.is-incorrect { color: #8a4b0f; }
.ssg-small { font-size: 15px; color: var(--ink-2); }
.ssg-row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* toast (like the original site's pop-up notes) */
.ssg-toasts { position: fixed; left: 0; right: 0; top: 10px; z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.ssg-toast { pointer-events: auto; max-width: 420px; width: 100%; background: #fff; border: 3px solid var(--straw); border-radius: 18px; padding: 12px 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); animation: ssg-drop .22s ease-out; }
.ssg-toast__title { font-weight: 900; font-size: 18px; }
.ssg-toast__desc { font-size: 16px; color: var(--ink-2); }
@keyframes ssg-drop { from { transform: translateY(-12px); opacity: 0; } }
@media (min-width: 700px) { .ssg-toasts { top: auto; bottom: 18px; justify-content: flex-end; } }

.ssg-footer { margin-top: 24px; text-align: center; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.ssg-screen { display: flex; flex-direction: column; gap: 16px; animation: ssg-in .25s ease-out; }
@keyframes ssg-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
