/* The site's look: the CityReady design system (design/design.html) applied
   to Tickmarks. Loaded after app.css on every page, so it restates the tokens
   and the handful of components whose shape changes. Coral (--pencil) is still
   reserved for the student's own marks. */
:root {
  --ink: #1b3a5c;          /* navy */
  --ink-soft: #4a5568;
  --muted: #5f6b7a;
  --bg: #f4f6f9;           /* cloud */
  --paper: #ffffff;
  --band: #f4f6f9;
  --line: #e2e6ee;         /* silver */
  --line-soft: #edf0f5;
  --rule: #e2e6ee;
  --pencil: #c4512f;       /* coral, darkened to 4.5:1 for text; still the student's own marks */
  --pencil-tint: #fdf1ec;
  --pencil-on-ink: #f4a48c;
  --accent: #217a6f;       /* teal, darkened for text contrast */
  --accent-tint: #e8f5f3;
  --amber: #8a6a12;
  --amber-tint: #fdf7e6;
  --radius: 8px;
  --teal: #2a9d8f;
  --teal-bright: #34c4b3;
  --teal-button: #217a6f;  /* white text on it is 5.2:1 (WCAG AA); #2a9d8f was 3.3:1 */
  --teal-button-hover: #1a6158;
  --navy-deep: #0f2440;

  --sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "DM Serif Display", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body { color: #1e2532; line-height: 1.7; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2 { font-weight: 400; color: var(--ink); letter-spacing: -0.01em; }
h1 { font: 400 2.6rem/1.1 var(--display); }
h2 { font: 400 1.75rem/1.2 var(--display); }
h3 { color: var(--ink); }
.eyebrow { font: 500 0.68rem/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--ink-soft); }

/* Header: deep navy bar, serif wordmark. */
.site-header { background: var(--navy-deep); padding: 0.85rem 1.75rem; }
.site-header a { color: rgba(255, 255, 255, 0.72); font-weight: 500; }
.site-header a:hover, .site-header a[aria-current="page"] { color: #fff; }
.site-header a.brand { font: 400 1.5rem var(--display); color: #fff; letter-spacing: -0.01em; text-transform: none; }

/* Buttons: teal primary, rounded, lift on hover. */
.btn { border-radius: 8px; border: 2px solid var(--line); color: var(--ink); font: 600 0.9rem/1 var(--sans); transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.btn:hover { background: var(--bg); border-color: var(--teal); color: var(--ink); }
.btn-primary { background: var(--teal-button); border-color: var(--teal-button); color: #fff; }
.btn-primary:hover { background: var(--teal-button-hover); border-color: var(--teal-button-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(42, 157, 143, 0.8); }
@media (prefers-reduced-motion: reduce) { .btn-primary:hover { transform: none; } }

/* Cards and paper surfaces: softer, rounder. */
.card, .finding, .career, .library-offer, .workpaper { border-color: var(--line); border-radius: 12px; }
.workpaper { box-shadow: 0 20px 45px -28px rgba(15, 36, 64, 0.45); }
.workpaper-head { background: var(--bg); color: var(--muted); }
.finding { border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }
.career-bar { background: var(--line); }
.career-bar span { background: linear-gradient(90deg, var(--teal), var(--teal-bright)); }
.folders { border-top-color: var(--ink); }
input[type="text"], input[type="email"], select, textarea, .finding .amt { border: 1.5px solid var(--line); border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15); }

/* Stamps keep their case-file feel, in the new palette. */
.stamp { border-radius: 4px; }
.stamp-closed { background: var(--accent); border-color: var(--accent); }

/* Landing hero: a full-bleed navy band with a faint grid, like the cover. */
.hero { position: relative; isolation: isolate; color: #fff; padding: 4rem 0 4.5rem; margin: -2.5rem 0 2rem; }
.hero::before {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  background:
    radial-gradient(ellipse at 75% 15%, rgba(42, 157, 143, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(233, 196, 106, 0.12) 0%, transparent 55%),
    linear-gradient(160deg, #0f2440 0%, #1b3a5c 55%, #2a4f7a 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}
.hero h1 { color: #fff; font: 400 clamp(2.6rem, 5.5vw, 3.9rem)/1.08 var(--display); }
.hero .lede { color: rgba(255, 255, 255, 0.7); }
.hero .stamp-open { color: #e9c46a; }
.hero .btn { border-color: rgba(255, 255, 255, 0.35); background: transparent; color: #fff; }
.hero .btn:hover { background: rgba(255, 255, 255, 0.08); }
.hero .btn-primary { background: var(--teal-button); border-color: var(--teal-button); }
.hero .workpaper { color: #1e2532; }

/* Footer: quiet cloud band. */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.site-footer nav a { color: var(--ink); }

/* Weekly challenge: the panel at the top of "Your cases", the case file's
   read-only banner and the debrief's next step. Teal, never coral: nothing
   here is the student's own mark. */
.challenge-panel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem;
  margin: 0.5rem 0 1.5rem; padding: 1.2rem 1.4rem; background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--teal); border-radius: 12px; box-shadow: 0 14px 32px -26px rgba(15, 36, 64, 0.5); }
.challenge-main { flex: 1 1 22rem; min-width: 0; }
.challenge-kicker { margin: 0 0 0.15rem; font: 600 0.9rem/1.3 var(--sans); color: var(--accent); }
.challenge-title { margin: 0 0 0.3rem; font: 400 1.6rem/1.15 var(--display); color: var(--ink); }
.challenge-teaser { margin: 0 0 0.6rem; color: var(--ink-soft); max-width: 60ch; }
.challenge-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.15rem 0; margin: 0; padding: 0; font-size: 0.9rem; color: var(--muted); }
.challenge-facts li + li::before { content: "\00b7"; margin: 0 0.55rem; color: var(--line); font-weight: 700; }
.challenge-actions { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.challenge-actions form { margin: 0; }
.challenge-actions .sm { margin: 0; }
.challenge-filed { margin: 0; font-weight: 600; color: var(--accent); }
.challenge-banner { background: var(--accent-tint); color: var(--accent); border: 1px solid #bfe0da; border-radius: 8px;
  padding: 0.6rem 0.8rem; font-weight: 500; }
.challenge-next { margin: 2rem 0 0; padding: 1.2rem 1.4rem; background: var(--accent-tint); border: 1px solid #bfe0da; border-radius: 12px; }
.challenge-next h2 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.challenge-next p { margin: 0 0 0.8rem; color: var(--ink-soft); max-width: 62ch; }
.challenge-next form { margin: 0; }
.folder-locked h3 { display: flex; align-items: baseline; gap: 0.5rem; color: var(--ink-soft); }
@media (max-width: 560px) {
  .challenge-panel { padding: 1rem; }
  .challenge-facts { flex-direction: column; }
  .challenge-facts li + li::before { content: none; }
  .challenge-title { font-size: 1.35rem; }
}
