/* ==========================================================================
   Tiger Coloring Pages - stylesheet
   Kid-friendly palette, but built for adults too: generous type, high
   contrast, and a print stylesheet that strips the site chrome away.
   ========================================================================== */

:root {
  --ink: #2a211b;
  --ink-soft: #6d5f54;
  --ink-faint: #9b8d81;
  --paper: #fffdf9;
  --cream: #fff4e6;
  --cream-deep: #fde9d2;
  --card: #ffffff;
  --orange: #e8833a;
  --orange-deep: #c4631a;
  --orange-soft: #fdeee0;
  --green: #2f7a4d;
  --teal: #17787a;
  --plum: #8a4b6b;
  --line: #ecdfd0;
  --line-soft: #f5ece2;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 4px rgba(42, 33, 27, .04), 0 12px 28px -12px rgba(42, 33, 27, .16);
  --shadow-sm: 0 1px 2px rgba(42, 33, 27, .05), 0 6px 16px -8px rgba(42, 33, 27, .18);
  --font-display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.05em; }
a { color: var(--orange-deep); text-decoration-color: rgba(196, 99, 26, .35); text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: currentColor; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

/* ------------------------------------------------------------------ header */
.topbar {
  background: var(--ink);
  color: #fff;
  font-size: .82rem;
  letter-spacing: .02em;
}
.topbar .wrap { padding-block: 7px; text-align: center; }
.topbar span { opacity: .92; }

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 72px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.brand-mark { color: var(--orange); display: grid; place-items: center; }
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; letter-spacing: -.01em;
}
.brand-text b { font-weight: 800; color: var(--orange-deep); }

.site-nav { position: relative; }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav-list > li { position: relative; }
.nav-list a, .nav-sub-label {
  display: inline-block; padding: 9px 13px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .96rem;
  cursor: pointer; white-space: nowrap;
}
.nav-list a:hover, .nav-sub-label:hover { background: var(--orange-soft); color: var(--orange-deep); }
.nav-sub {
  list-style: none; margin: 0; padding: 6px; position: absolute; right: 0; top: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); min-width: 220px; display: none; z-index: 30;
}
.nav-sub a { display: block; padding: 8px 12px; }
.nav-sub-label span { font-size: .8em; }
.has-sub:hover .nav-sub, .has-sub:focus-within .nav-sub { display: block; }
.has-sub > input:focus-visible + .nav-sub-label { outline: 2px solid var(--orange); }

.nav-burger { display: none; }

@media (max-width: 900px) {
  .nav-burger {
    display: grid; gap: 5px; padding: 10px 8px; cursor: pointer;
    border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  }
  .nav-burger span { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; }
  .site-nav {
    order: 3; width: 100%; display: none;
    border-top: 1px solid var(--line); padding-bottom: 12px;
  }
  #nav-toggle:checked ~ .site-nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; padding-top: 10px; }
  .nav-list a, .nav-sub-label { display: block; padding: 11px 12px; }
  .nav-sub { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .has-sub > input { position: absolute; opacity: 0; pointer-events: none; }
  .nav-sub-label { display: none; }
}

/* -------------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(1100px 420px at 50% -10%, var(--cream) 0%, rgba(255, 244, 230, 0) 70%),
    var(--paper);
  border-bottom: 1px solid var(--line);
  padding: clamp(34px, 5vw, 64px) 0 clamp(30px, 4vw, 52px);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { margin-bottom: .38em; }
.hero h1 .hl { color: var(--orange-deep); }
.lede { font-size: clamp(1.02rem, .96rem + .35vw, 1.16rem); color: var(--ink-soft); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; font-size: .93rem; color: var(--ink-soft); }
.hero-facts li { display: flex; align-items: center; gap: 7px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--green); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; font-weight: 800; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-family: var(--font-body); line-height: 1.2;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -6px rgba(196, 99, 26, .7); }
.btn-primary:hover { background: var(--orange-deep); color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-deep); background: var(--orange-soft); }

.hero-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-collage figure { margin: 0; }
.hero-collage .tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow-sm); display: block;
}
.hero-collage .tile:nth-child(3) { grid-column: 1 / -1; width: 62%; justify-self: center; }
.hero-collage img { display: block; width: 100%; border-radius: 10px; background: #fff; }
.hero-collage figcaption { font-size: .8rem; color: var(--ink-faint); text-align: center; padding-top: 7px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-collage { order: -1; max-width: 460px; }
}

/* ------------------------------------------------------------------ badges */
.chip {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: .74rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: var(--cream); color: var(--ink-soft); white-space: nowrap;
}
.chip-easy { background: #e4f3e9; color: #1f6b3f; }
.chip-medium { background: #fdf0d8; color: #9a6512; }
.chip-detailed { background: #f3e6ef; color: #7a3f5c; }
.chip-age { background: #e7eef3; color: #3c5b70; }

/* ------------------------------------------------------------------- cards */
.section { padding: clamp(34px, 4.5vw, 60px) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head p { margin: .2em 0 0; color: var(--ink-soft); max-width: 62ch; }
.section-head h2 { margin: 0; }

.card-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--orange); color: inherit; }
.card-img { display: block; background: #fff; border-bottom: 1px solid var(--line-soft); }
.card-img img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.01rem; line-height: 1.3;
}
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

.cat-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cat-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.cat-card::after {
  content: ""; position: absolute; right: -46px; top: -46px; width: 108px; height: 108px;
  border-radius: 50%; background: var(--orange-soft); pointer-events: none;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--orange); color: inherit; }
.cat-card h3 { margin: 0 0 .35em; position: relative; padding-right: 44px; }
.cat-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: .94rem; position: relative; padding-right: 26px; }
.cat-card .count { font-size: .8rem; font-weight: 800; color: var(--orange-deep); position: relative; }

/* ----------------------------------------------------------------- filters */
.filter-bar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 26px; box-shadow: var(--shadow-sm);
}
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-row + .filter-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.filter-label { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-right: 2px; }
.fchip {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 700;
  background: var(--cream); color: var(--ink-soft); border: 1px solid transparent; cursor: pointer;
  user-select: none; transition: background .12s, color .12s;
}
.fchip:hover { background: var(--cream-deep); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.fchip .n { opacity: .6; font-weight: 700; margin-left: 3px; }
.search-field { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-field input {
  font: inherit; font-size: .92rem; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); min-width: 220px; color: var(--ink);
}
.search-field input:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.result-count { font-size: .88rem; color: var(--ink-faint); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-soft); }

/* ------------------------------------------------------------ colouring page */
.crumbs { font-size: .84rem; margin-bottom: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-faint); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--orange-deep); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-faint); }

.page-head { margin-bottom: 26px; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lede { margin-bottom: 14px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; }

.page-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
@media (max-width: 900px) { .page-layout { grid-template-columns: 1fr; } }

.art-frame {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); position: relative;
}
.art-frame .art { display: block; background: #fff; border-radius: 10px; }
.art-frame .art svg { display: block; width: 100%; height: auto; }
.art-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.art-actions .btn { flex: 1 1 auto; min-width: 150px; }
.file-note { font-size: .82rem; color: var(--ink-faint); margin: 10px 0 0; }

.side-panel { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 18px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 1.08rem; margin-bottom: .6em; }
.panel h3 { font-size: 1rem; margin-bottom: .5em; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.tips { margin: 0; padding-left: 20px; }
.tips li { margin-bottom: .5em; }
.howto { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.howto li { counter-increment: step; position: relative; padding-left: 34px; margin-bottom: .75em; font-size: .95rem; }
.howto li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px;
  border-radius: 50%; background: var(--orange-soft); color: var(--orange-deep);
  font-weight: 800; font-size: .82rem; display: grid; place-items: center;
}

details.faq { border-top: 1px solid var(--line-soft); }
details.faq summary {
  cursor: pointer; font-weight: 700; padding: 14px 26px 14px 0; position: relative; list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--orange-deep); line-height: 1;
}
details.faq[open] summary::after { content: "\2212"; }
details.faq p { padding-bottom: 14px; margin: 0; color: var(--ink-soft); font-size: .96rem; }
.faq-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; box-shadow: var(--shadow-sm); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--cream); font-family: var(--font-display); }

.callout {
  background: var(--cream); border-left: 4px solid var(--orange); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { font-family: var(--font-display); }

/* ------------------------------------------------------------- ad slots */
.ad-slot { margin: 30px auto; text-align: center; }
.ad-label {
  display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px;
}
/* Placeholder box. Remove the border/background once a real ad unit is live. */
.ad-frame {
  min-height: 100px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--cream) 0%, rgba(255, 253, 249, 0) 100%);
}

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #e8ddd3; margin-top: 60px; }
.site-footer h2 { color: #fff; font-size: 1.02rem; margin-bottom: .8em; }
.site-footer a { color: #f0c9a8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; padding: 46px 0 30px; }
.footer-col p { font-size: .93rem; color: #c8b9ac; }
.footer-note { font-size: .86rem !important; color: #9d8e81 !important; }
.footer-links { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.footer-links li { margin-bottom: 7px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0 30px;
  font-size: .84rem; color: #9d8e81;
}
.footer-bottom p { margin: 0 0 4px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ------------------------------------------------------------- print all */
.print-item { page-break-after: always; break-after: page; text-align: center; }
.print-item:last-child { page-break-after: auto; break-after: auto; }
.print-item img { width: 100%; max-width: 190mm; height: auto; }
.print-item h2 { font-size: 13pt; margin: 0 0 6mm; }
.print-tools { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

/* ------------------------------------------------------------------ lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(26, 19, 14, .88); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; background: #fff; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: #fff; color: var(--ink);
  border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
  font-family: var(--font-body);
}
.lightbox-cap { color: #fff; text-align: center; margin-top: 14px; font-weight: 700; }

/* --------------------------------------------------------------------- 404 */
.notfound { text-align: center; padding: 80px 20px; }
.notfound h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--orange); margin-bottom: 0; }

/* ------------------------------------------------------------------ print */
@media print {
  @page { size: auto; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .topbar, .ad-slot, .no-print,
  .art-actions, .side-panel, .crumbs, .breadcrumb-extra,
  .filter-bar, .hero-cta, .related, .faq-list, .back-to-top,
  .prose, .section-head, .meta-row, .lede { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .section { padding: 0; border: 0; }
  .page-layout { display: block; }
  .page-head { margin-bottom: 4mm; }
  .page-head h1 { font-size: 15pt; margin: 0; text-align: center; }
  .art-frame { border: 0; padding: 0; box-shadow: none; }
  .art-frame .art { break-inside: avoid; page-break-inside: avoid; }
  .art-frame .art svg { width: 100%; height: auto; max-width: 190mm; margin: 0 auto; display: block; }
  .print-only { display: block !important; }
  a[href]::after { content: ""; }
  .print-caption { text-align: center; font-size: 9pt; margin-top: 3mm; color: #555; }
  .print-only.caption { text-align: center; font-size: 9pt; color: #666; margin-top: 3mm; }
}
.print-only { display: none; }

/* ------------------------------------------------------------- utilities */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; text-decoration: none;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
