/* Teachers Give Teachers (TGT) — shared styles for the hub dashboard and the
   collection galleries (e.g. Student Refusal Forms). Restrained typography so the
   colorful classroom printables stay the visual focus. */

:root {
  --ink: #1f2a2e;
  --ink-soft: #4b5b60;
  --paper: #f6faf8;
  --card: #ffffff;
  --line: #d9e6e0;
  --brand: #0f766e;       /* generous teal */
  --brand-dark: #0a4f4a;
  --accent: #e14b5a;      /* warm coral (fills/borders) */
  --accent-ink: #b0323f;  /* darker coral for TEXT — meets WCAG AA on light bg */
  --accent-soft: #fde7e9;
  --gold: #f2a516;
  --focus: #ffb020;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(12, 45, 43, 0.12);
  --shadow-sm: 0 3px 10px rgba(12, 45, 43, 0.09);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Hero --- */
.hero {
  background:
    radial-gradient(1100px 320px at 88% -20%, rgba(225, 75, 90, 0.10), transparent 60%),
    radial-gradient(900px 300px at 5% -10%, rgba(15, 118, 110, 0.10), transparent 55%),
    linear-gradient(180deg, #e7f4f0 0%, var(--paper) 100%);
  padding: clamp(1.6rem, 4vw, 3rem) 1.25rem clamp(1.2rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero-banner {
  width: 100%; max-width: 1120px; margin: 0 auto; height: auto; display: block;
  border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.brandmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 900; letter-spacing: .01em; color: var(--brand-dark);
  font-size: clamp(1.7rem, 4.4vw, 2.9rem); line-height: 1.05; margin: 0;
}
.brandmark .give { color: var(--accent-ink); }
.brandmark-badge {
  display: inline-grid; place-items: center; width: 1.5em; height: 1.5em;
  border-radius: 12px; background: var(--brand); color: #fff;
  font-size: .62em; font-weight: 900; box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
}
.tagline {
  margin: .6rem auto 0; max-width: 60ch; color: var(--ink-soft);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}
.hero-nav { margin: 1.3rem auto 0; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.hero-nav a {
  color: var(--brand-dark); text-decoration: none; font-weight: 800;
  padding: .55rem 1.15rem; border-radius: 999px;
  border: 1.5px solid var(--brand); background: #fff; transition: transform .12s ease;
}
.hero-nav a.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.hero-nav a.primary:hover { background: var(--brand-dark); }
.hero-nav a:hover { transform: translateY(-1px); }
.hero-nav a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Generic content width --- */
main { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.4rem, 3vw, 2.4rem) 1.25rem 3rem; }
.section-title {
  color: var(--brand-dark); font-size: clamp(1.3rem, 3vw, 1.9rem);
  margin: 0 0 .3rem; letter-spacing: -0.01em;
}
.section-sub { color: var(--ink-soft); margin: 0 0 1.4rem; max-width: 70ch; }
.section-sub.wide { max-width: none; }
.use-list {
  color: var(--ink-soft); margin: 0 0 1rem; padding-left: 1.5rem;
  display: grid; gap: .55rem;
}
.use-list li { padding-left: .25rem; }
.use-list strong { color: var(--ink); }

/* --- Dashboard collection cards --- */
.group-title {
  color: var(--brand-dark); font-size: 1.2rem; font-weight: 800; letter-spacing: .01em;
  margin: 2rem 0 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--line);
}
.group-title:first-of-type { margin-top: .4rem; }
.collections + .group-title { margin-top: 2.4rem; }
.collections {
  display: grid; gap: clamp(1rem, 2.5vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.collection {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.collection:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.collection:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.collection.disabled { opacity: .72; pointer-events: none; }
.collection-thumb {
  position: relative; aspect-ratio: 16 / 10; background: #eef5f2; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.collection-thumb img { width: 100%; height: 100%; object-fit: cover; }
.collection-tag {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  font-size: .72rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--accent); padding: .28rem .6rem; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.collection-tag.soon { background: var(--ink-soft); }
.collection-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.collection-body h3 { margin: 0; color: var(--brand-dark); font-size: 1.25rem; }
.collection-body p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.collection-meta {
  margin-top: auto; padding-top: .7rem; display: flex; align-items: center; gap: .5rem;
  font-weight: 800; color: var(--brand);
}
.collection-count {
  font-size: .78rem; font-weight: 800; color: var(--brand-dark);
  background: #e2f1ec; border-radius: 999px; padding: .2rem .6rem;
}
.collection-cta::after { content: " →"; }

/* --- Sub-page header (gallery / research) --- */
.subhero {
  background:
    radial-gradient(1100px 300px at 85% -20%, rgba(225, 75, 90, 0.10), transparent 60%),
    linear-gradient(180deg, #e7f4f0 0%, var(--paper) 100%);
  padding: clamp(1.4rem, 4vw, 2.4rem) 1.25rem clamp(1rem, 3vw, 1.4rem);
  border-bottom: 1px solid var(--line);
}
.subhero-inner { max-width: var(--maxw); margin: 0 auto; }
.back-link {
  display: inline-block; margin-bottom: .8rem; font-weight: 800; text-decoration: none;
  color: var(--brand-dark); padding: .4rem .9rem; border-radius: 999px;
  border: 1.5px solid var(--brand); background: #fff;
}
.back-link:hover { transform: translateY(-1px); }
.back-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.subhero h1 {
  margin: 0; color: var(--brand-dark); letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 3.8vw, 2.5rem); line-height: 1.08; max-width: 26ch;
}
.subhero .tagline { margin-left: 0; margin-right: 0; text-align: left; }

/* --- Notice / disclaimer --- */
.notice {
  background: var(--accent-soft); border: 1px solid #f3bcc2; border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: 1.6rem;
}
.notice p { margin: .3rem 0; }
.notice .notice-sub { font-size: .88rem; color: var(--ink-soft); }

/* --- Gallery filters --- */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem;
  margin: 0 0 1.2rem; padding: 1rem 1.1rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.filters .field { display: flex; flex-direction: column; gap: .25rem; }
.filters label { font-weight: 800; font-size: .8rem; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .03em; }
.filters select {
  border: 1.5px solid var(--line); border-radius: 10px; padding: .5rem .7rem;
  font-size: .95rem; background: #fff; color: var(--ink); min-width: 12rem;
}
.filters select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.filters button {
  border: 1.5px solid var(--brand); background: #fff; color: var(--brand-dark);
  font-weight: 800; border-radius: 10px; padding: .5rem .9rem; cursor: pointer;
}
.filters button:hover { background: #e2f1ec; }
.filters .spacer { flex: 1; }
.filters .count { font-weight: 800; color: var(--ink-soft); }

/* --- Collection dashboard (group cards that jump to each section) --- */
.sa-dashboard {
  display: grid; gap: clamp(.7rem, 1.8vw, 1rem);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin: .2rem 0 1.8rem;
}
.sa-dash-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.sa-dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); }
.sa-dash-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sa-dash-thumb { display: block; aspect-ratio: 16 / 9; background: #eef5f2; overflow: hidden; border-bottom: 1px solid var(--line); }
.sa-dash-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sa-dash-body { padding: .6rem .8rem .7rem; display: flex; flex-direction: column; gap: .3rem; }
.sa-dash-title { font-weight: 800; color: var(--brand-dark); font-size: .98rem; line-height: 1.2; }
.sa-dash-count {
  align-self: flex-start; font-size: .74rem; font-weight: 800; color: var(--brand-dark);
  background: #e2f1ec; border-radius: 999px; padding: .16rem .55rem;
}

/* --- Gallery grid --- */
.group-head {
  margin: 1.6rem 0 .2rem; color: var(--brand-dark); font-size: 1.1rem;
  display: flex; align-items: center; gap: .55rem; scroll-margin-top: 1rem;
}
.group-head::before {
  content: ""; width: .7rem; height: .7rem; border-radius: 3px;
  background: var(--accent); transform: rotate(45deg);
}
.row {
  display: grid; gap: clamp(.9rem, 2vw, 1.3rem);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin: .3rem 0 .4rem;
}
.card {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .thumb {
  border: 0; padding: 0; margin: 0; background: #eef5f2; cursor: zoom-in;
  display: block; width: 100%;
}
.card .thumb img { width: 100%; height: auto; display: block; }
.card .thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.card figcaption { padding: .7rem .85rem .85rem; display: flex; flex-direction: column; gap: .5rem; }
.card-title { font-weight: 800; color: var(--ink); font-size: .98rem; line-height: 1.25; }
.card-tag {
  align-self: flex-start; font-weight: 800; font-size: .74rem; letter-spacing: .01em;
  color: var(--brand-dark); background: #e2f1ec; border-radius: 999px; padding: .18rem .55rem;
}
.card-focus { color: var(--ink-soft); font-size: .86rem; line-height: 1.35; }
.card-dls { display: flex; gap: .45rem; }
.card-dl {
  text-decoration: none; font-weight: 800; font-size: .82rem;
  color: var(--brand-dark); background: #e2f1ec; border-radius: 8px; padding: .3rem .6rem;
}
.card-dl:hover { background: #cfe8e0; }
.card-dl:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.empty { color: var(--ink-soft); padding: 1.5rem 0; }

/* --- Research prose --- */
.research h3 { color: var(--brand-dark); margin: 1.8rem 0 .4rem; font-size: 1.25rem; }
.research p, .research li { max-width: 72ch; }
.research blockquote {
  margin: .6rem 0; padding: .5rem 0 .5rem 1rem; border-left: 4px solid var(--brand);
  color: var(--ink-soft); font-style: italic;
}
.research table {
  border-collapse: collapse; width: 100%; max-width: 820px; margin: 1rem 0 1.4rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  font-size: .95rem;
}
.research th, .research td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.research thead th { background: #e2f1ec; color: var(--brand-dark); }
.research tbody tr:last-child td { border-bottom: 0; }
.stat {
  display: inline-block; font-weight: 900; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 8px; padding: 0 .35em;
}
.research .sources { font-size: .92rem; color: var(--ink-soft); }
.research .sources li { margin-bottom: .5rem; }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--line); background: #eef5f2;
  padding: 1.6rem 1.25rem; text-align: center; color: var(--ink-soft);
}
footer .built { font-weight: 800; color: var(--brand-dark); margin: 0 0 .3rem; }
footer p { margin: .2rem 0; font-size: .9rem; }
footer a { font-weight: 700; }

/* --- Lightbox --- */
#lightbox {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(10, 30, 28, 0.86); padding: 2.5rem 1rem 1rem;
  overflow: auto;
}
#lightbox.open { display: block; }
.lightbox-bar {
  position: sticky; top: 0; display: flex; gap: .6rem; justify-content: center;
  margin-bottom: 1rem;
}
.lightbox-bar a, .lightbox-bar button {
  font-weight: 800; text-decoration: none; border-radius: 999px; cursor: pointer;
  padding: .5rem 1rem; border: 0; font-size: .95rem;
}
.lightbox-bar a { background: #fff; color: var(--brand-dark); }
.lightbox-bar button { background: var(--accent); color: #fff; }
.lightbox-bar a:focus-visible, .lightbox-bar button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#lightbox img { max-width: 1000px; width: 100%; margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow); }

@media (max-width: 560px) {
  .filters select { min-width: 100%; }
  .filters .field { width: 100%; }
}
