:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5b6673;
  --paper: #f7f4eb;
  --white: #fffef9;
  --blue: #1648b4;
  --blue-dark: #10347f;
  --gold: #f6cc3e;
  --line: #dcdedb;
  --shadow: 0 16px 36px rgba(17, 34, 62, .13);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #d16320; outline-offset: 3px; }
.wrap { width: min(1170px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 82px; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; white-space: nowrap; line-height: 1; }
.brand-sonic { position: relative; z-index: 1; padding: 9px 13px 10px 10px; border-radius: 4px; background: var(--blue); box-shadow: 4px 4px 0 var(--gold); color: white; font-size: 1.45rem; font-style: italic; font-weight: 950; letter-spacing: -.085em; text-transform: uppercase; transform: skew(-8deg) rotate(-2deg); }
.brand-tail { display: flex; flex-direction: column; align-items: flex-start; margin-left: 12px; transform: rotate(-2deg); }
.brand-the { margin-bottom: 1px; color: var(--blue); font-size: .68rem; font-style: italic; font-weight: 850; letter-spacing: .08em; }
.brand-comic { color: var(--ink); font-size: 1.35rem; font-style: italic; font-weight: 950; letter-spacing: -.075em; text-transform: uppercase; }
.brand:hover .brand-sonic { background: var(--blue-dark); }
.brand:hover .brand-comic { color: var(--blue); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.site-header nav a { display: inline-block; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .91rem; font-weight: 700; }
.site-header nav a:hover, .site-header nav a[aria-current] { background: #e9eefb; color: var(--blue); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.045em; }
h1 { font-size: clamp(2.7rem, 6.5vw, 5.4rem); margin: .18em 0 .3em; max-width: 12ch; }
h2 { font-size: clamp(1.7rem, 3vw, 2.55rem); margin: .3em 0 .65em; }
h3 { font-size: 1.2rem; margin: .35em 0 .45em; }
p { margin-top: 0; }
.eyebrow { color: var(--blue); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 12px; }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.25rem); line-height: 1.65; color: #334051; max-width: 65ch; }

.hero { background: radial-gradient(circle at 75% 18%, #ffe47a 0, transparent 30%), linear-gradient(115deg, #f9e7a8, #f6ca39 60%, #efad25); border-bottom: 1px solid #e0b32d; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .8fr); align-items: center; gap: clamp(40px, 7vw, 110px); min-height: 500px; padding-block: 65px; }
.hero .eyebrow { color: var(--blue-dark); }
.hero .lead { color: #3f3d31; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; gap: 16px; padding: 14px 20px; border-radius: 10px; background: var(--blue); color: white; font-weight: 800; text-decoration: none; box-shadow: 4px 4px 0 var(--blue-dark); }
.button:hover { background: var(--blue-dark); color: white; }
.text-link { color: var(--blue-dark); font-weight: 800; }
.hero-cover { position: relative; justify-self: center; width: min(100%, 290px); transform: rotate(5deg); }
.hero-cover::before { content: ""; position: absolute; inset: 15px -17px -15px 17px; z-index: 0; background: var(--blue); border-radius: 8px; }
.hero-cover a, .hero-cover span { position: relative; z-index: 1; }
.hero-cover img { display: block; width: 100%; box-shadow: var(--shadow); border: 5px solid white; border-radius: 5px; }
.hero-cover span { display: block; margin-top: 25px; text-align: center; font-size: .85rem; font-weight: 800; color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-block: 37px; border-bottom: 1px solid var(--line); }
.stat-grid > div { display: flex; align-items: baseline; gap: 13px; }
.stat-grid strong { color: var(--blue); font-size: 2rem; letter-spacing: -.06em; }
.stat-grid span { font-size: .88rem; color: var(--muted); font-weight: 650; }
.section-grid { display: grid; grid-template-columns: 1fr .8fr; gap: clamp(30px, 7vw, 100px); align-items: center; padding-block: 95px; }
.section-grid > div:first-child p:not(.eyebrow) { color: var(--muted); max-width: 58ch; }
.inline-arrow { font-weight: 800; text-decoration: none; }
.info-card { background: white; border: 1px solid var(--line); border-left: 6px solid var(--blue); border-radius: 12px; padding: 30px; box-shadow: var(--shadow); }
.info-card p { color: var(--muted); }
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 95px; }
.feature-strip > div { border-top: 3px solid var(--ink); padding-top: 17px; }
.feature-strip p { color: var(--muted); }
.feature-number { color: var(--blue); font-size: .78rem; font-weight: 900; letter-spacing: .1em; }

.page-intro { padding-block: 67px 53px; background: #eaf0fa; border-bottom: 1px solid #d5e0f1; }
.page-intro h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); max-width: none; }
.page-intro .lead { margin-bottom: 0; }
.catalogue, .story-search { padding-block: 48px 85px; }
.controls { max-width: 780px; margin-bottom: 28px; }
label { display: block; font-size: .85rem; font-weight: 800; margin-bottom: 8px; }
input[type="search"] { width: 100%; min-height: 51px; padding: 12px 16px; border: 1px solid #aebbcf; border-radius: 9px; background: white; color: var(--ink); font: inherit; }
.year-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.filter-chip { border: 1px solid #b5c4dd; border-radius: 999px; background: white; color: var(--blue-dark); padding: 7px 12px; font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; }
.filter-chip span { color: #64748b; font-size: .75rem; margin-left: 3px; }
.filter-chip.selected, .filter-chip:hover { background: var(--blue); border-color: var(--blue); color: white; }
.filter-chip.selected span, .filter-chip:hover span { color: #dce9ff; }
.result-count { margin: 15px 0 0; font-size: .83rem; color: var(--muted); }
.issue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.issue-card { display: grid; grid-template-columns: 78px 1fr; gap: 15px; min-height: 150px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.issue-card[hidden], .story-results li[hidden], .empty-results[hidden] { display: none; }
.card-cover img { display: block; width: 78px; height: auto; box-shadow: 3px 4px 0 #dae2ed; }
.card-kicker { color: var(--blue); text-transform: uppercase; letter-spacing: .11em; font-size: .7rem; font-weight: 900; }
.issue-card h2 { font-size: 1rem; letter-spacing: -.02em; margin: 7px 0 5px; }
.issue-card h2 a { color: var(--ink); text-decoration: none; }
.issue-card h2 a:hover { color: var(--blue); text-decoration: underline; }
.issue-card p { font-size: .81rem; margin-bottom: 8px; color: var(--muted); }
.empty-results { padding: 40px; background: white; border-radius: 12px; text-align: center; }

.issue-intro { padding-bottom: 35px; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 25px; }
.detail-grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: clamp(30px, 6vw, 85px); padding-block: 50px 85px; }
.detail-cover img { display: block; width: 100%; border: 5px solid white; box-shadow: var(--shadow); }
.detail-cover .cover-placeholder { width: 100%; min-height: 390px; font-size: 2rem; font-weight: 900; color: var(--blue); }
.editorial { padding-bottom: 25px; }
.editorial .lead { color: var(--ink); }
.editorial p:last-child { color: var(--muted); }
.detail-section { border-top: 1px solid var(--line); padding-block: 28px; }
.detail-section h2 { font-size: 1.6rem; }
.story-lines { padding-left: 23px; }
.story-lines li { padding: 6px 0; }
.story-details { list-style: none; padding: 0; margin: 0; }
.story-entry { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.story-entry:target, .reading-item:target, .gift-card:target, .character-card:target, .directory-card:target { background: #fff3be; outline: 3px solid #f0c53c; outline-offset: 4px; }
.story-entry, .reading-item, .gift-card, .character-card, .directory-card { scroll-margin-top: 30px; }
.story-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.story-entry h3 { margin: 0 0 7px; font-size: 1.13rem; line-height: 1.3; }
.story-entry h3 span { color: var(--blue); font-size: .85rem; letter-spacing: .01em; }
.entry-anchor { font-size: .72rem; font-weight: 700; text-decoration: none; opacity: .55; margin-left: 6px; }
.entry-anchor:hover, .entry-anchor:focus-visible { opacity: 1; }
.story-note { margin: 0 0 7px; max-width: 68ch; }
.story-credit { color: var(--muted); font-size: .87rem; margin: 0; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.feature-list li { background: #e7edf7; border-radius: 99px; padding: 5px 11px; font-size: .83rem; font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.issue-neighbours { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 25px; font-weight: 800; }
.cover-placeholder { display: grid; place-items: center; width: 78px; height: 106px; background: #e8ecf1; color: var(--muted); text-align: center; font-size: .7rem; }

.story-results { padding: 0; margin: 22px 0 0; list-style: none; border-top: 1px solid var(--line); }
.story-results li { display: grid; grid-template-columns: 75px 1fr; gap: 14px; padding: 11px 8px; border-bottom: 1px solid var(--line); background: var(--white); }
.story-results li:nth-child(even) { background: #f1f3f4; }
.story-results li a { font-weight: 850; }
.arc-grid { display: grid; gap: 18px; max-width: 920px; padding-block: 50px 90px; }
.arc-card { scroll-margin-top: 24px; padding: 30px 34px; background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 12px; }
.arc-card h2 { margin-top: 0; }
.arc-card p:not(.eyebrow) { max-width: 75ch; }
.arc-issues { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.arc-issues a { padding: 5px 10px; border-radius: 7px; background: #e7edf7; font-size: .85rem; font-weight: 800; text-decoration: none; }
.arc-issues a:hover { background: var(--blue); color: white; }
.arc-related { margin: 0; padding-left: 20px; font-weight: 750; }
.character-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.character-links a { display: inline-block; padding: 6px 10px; border-radius: 8px; background: #e7edf7; font-size: .85rem; font-weight: 750; text-decoration: none; }
.reading-guide, .directory, .gift-guide { padding-block: 48px 85px; }
.reading-list { list-style: none; padding: 0; margin: 25px 0 45px; display: grid; gap: 15px; }
.reading-item { display: grid; grid-template-columns: 82px 1fr; gap: 19px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.reading-cover img { display: block; width: 78px; box-shadow: 3px 4px 0 #dae2ed; }
.reading-item h2 { font-size: 1.25rem; margin: 4px 0 8px; }
.reading-item h2 a { color: var(--ink); text-decoration: none; }
.reading-item ul { padding-left: 20px; margin: 0; }
.reading-item li { padding: 2px 0; }
.reading-note { margin: 11px 0 0; max-width: 78ch; color: #42516a; }
.reading-item li span, .credit-list li span { color: var(--muted); font-size: .8rem; }
.directory > label { max-width: 800px; }
.directory > input { max-width: 800px; }
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 25px; }
.directory-card, .character-card { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.directory-card h2, .character-card h2 { font-size: 1.42rem; margin: 0 0 9px; }
.directory-card p, .character-card p { color: var(--muted); }
details summary { cursor: pointer; color: var(--blue); font-weight: 800; }
.credit-list { max-height: 360px; overflow: auto; padding-left: 20px; }
.credit-list li { padding: 5px 0; }
.character-card .arc-issues { max-height: 240px; overflow: auto; padding-bottom: 4px; }
.gift-jump { display: grid; grid-template-columns: 1fr minmax(220px, 340px); gap: 15px 26px; align-items: end; padding: 24px; margin-bottom: 48px; background: #e7edf7; border: 1px solid #ccd9ed; border-radius: 14px; }
.gift-jump h2 { margin: 0 0 4px; font-size: 1.35rem; }
.gift-jump p { margin: 0; color: var(--muted); font-size: .9rem; }
.gift-jump-control label { margin-bottom: 5px; }
.gift-jump select { width: 100%; min-height: 45px; padding: 9px 12px; border: 1px solid #aebbcf; border-radius: 8px; background: white; color: var(--ink); font: inherit; }
.gift-year-links { display: flex; flex-wrap: wrap; gap: 7px; grid-column: 1 / -1; margin-top: 8px; }
.gift-year-links a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; background: white; border: 1px solid #cad4e4; border-radius: 7px; font-size: .85rem; font-weight: 800; text-decoration: none; }
.gift-year-links a:hover { background: var(--blue); color: white; }
.gift-year-links span { color: var(--muted); font-size: .75rem; }
.gift-year-links a:hover span { color: white; }
.gift-year { margin-bottom: 58px; scroll-margin-top: 25px; }
.gift-year-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; border-bottom: 2px solid var(--ink); margin-bottom: 20px; }
.gift-year-heading h2 { margin: 0 0 10px; }
.gift-year-heading span { color: var(--muted); font-size: .82rem; font-weight: 800; }
.gift-year-note { max-width: 75ch; margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.gift-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 12px; }
.gift-card-media { display: grid; place-items: center; min-height: 190px; padding: 17px; background: radial-gradient(circle at 50% 35%, #fff 0, #e2ecfa 48%, #cad9ee 100%); }
.gift-card-media img { display: block; width: 118px; max-height: 165px; object-fit: contain; box-shadow: 5px 6px 0 #aabbd3; }
.gift-card-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 17px; }
.gift-card h3 { font-size: 1.08rem; line-height: 1.28; margin: 6px 0 9px; }
.gift-card-kind { color: var(--muted); font-size: .84rem; margin: 0 0 16px; }
.gift-card-issue { margin-top: auto; font-size: .83rem; font-weight: 800; }
.extra-group { padding-top: 46px; }
.extra-group + .extra-group { border-top: 1px solid var(--line); }
.extra-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.extra-group-heading h2 { margin: 0; }
.extra-group-heading span { color: var(--muted); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.extras-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; padding-block: 25px 65px; }
.extra-card { display: flex; gap: 16px; align-items: flex-start; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 17px; }
.extra-card img { width: 70px; flex: none; box-shadow: 3px 4px 0 #dae2ed; }
.extra-card h3 { font-size: 1.02rem; letter-spacing: -.02em; margin: 2px 0 8px; }
.extra-card p, .extra-card small { color: var(--muted); font-size: .79rem; }
.extra-card .cover-placeholder { flex: none; width: 70px; height: 96px; }
.site-footer { background: #172842; color: #dbe4f1; padding-block: 31px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; font-size: .78rem; }
.footer-inner p { margin: 0; }
.site-footer a { color: #ffdb60; }
.footer-button { border: 0; padding: 0; background: none; color: #ffdb60; text-decoration: underline; cursor: pointer; font: inherit; }
.footer-button[data-ad-settings]:not([hidden]) { margin-left: 12px; }
.privacy-content { max-width: 800px; padding-block: 50px 85px; }
.privacy-content h2 { margin-top: 1.5em; }
.cookie-choice { position: fixed; z-index: 100; inset: auto 18px 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 900px; margin-inline: auto; padding: 19px 22px; border: 2px solid var(--blue); border-radius: 13px; background: white; box-shadow: 0 12px 45px rgba(8, 25, 56, .28); }
.cookie-choice p { margin: 5px 0 0; font-size: .9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.cookie-actions button { padding: 10px 13px; border: 1px solid var(--blue); border-radius: 8px; background: white; color: var(--blue); font: inherit; font-weight: 750; cursor: pointer; }
.cookie-actions button:last-child { background: var(--blue); color: white; }

@media (max-width: 900px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding-block: 15px; gap: 13px; }
  .site-header nav { margin-left: -11px; }
  .hero-grid { grid-template-columns: 1.4fr .7fr; gap: 30px; }
  .issue-grid, .extras-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .wrap { width: min(100% - 28px, 1170px); }
  .hero-grid, .section-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 48px 60px; }
  .hero-cover { width: min(57%, 230px); margin-top: 10px; }
  .stat-grid { gap: 10px; }
  .stat-grid > div { display: block; }
  .stat-grid span { display: block; line-height: 1.3; }
  .feature-strip, .issue-grid, .extras-grid, .directory-grid { grid-template-columns: 1fr; }
  .gift-jump { grid-template-columns: 1fr; padding: 19px; }
  .gift-year-links { grid-column: auto; }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gift-card-media { min-height: 145px; padding: 12px; }
  .gift-card-media img { width: 88px; max-height: 128px; }
  .gift-card-copy { padding: 13px; }
  .gift-card h3 { font-size: .96rem; }
  .gift-card .card-kicker { font-size: .7rem; line-height: 1.35; letter-spacing: .03em; }
  .section-grid { padding-block: 65px; }
  .feature-strip { padding-bottom: 65px; }
  .page-intro { padding-block: 44px 38px; }
  .detail-grid { padding-block: 35px 65px; }
  .detail-cover { max-width: 260px; }
  .facts { grid-template-columns: 1fr; }
  .arc-card { padding: 24px 20px; }
  .footer-inner { flex-direction: column; }
  .cookie-choice { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.collection { padding-block: 24px 60px; }
.collection > p { max-width: 76ch; }
.collection-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 24px 0; }
.collection-controls[hidden], .collection tr[hidden] { display: none; }
.collection-controls label { display: grid; gap: 6px; font-weight: 700; max-width: 100%; }
.collection-controls input, .collection-controls select, .collection-controls button { font: inherit; max-width: 100%; }
.collection-controls input[type=search], .collection-controls select, .collection-controls button { padding: 10px; min-height: 44px; border: 1px solid #747474; border-radius: 5px; background: #fff; color: #152a42; }
.import-collection input { width: min(260px, 100%); }
.collection-table { overflow-x: auto; }
.collection table { width: 100%; border-collapse: collapse; }
.collection th, .collection td { padding: 14px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #cad4df; }
.collection th small, .collection td a { display: block; }
.collection input[type=checkbox] { width: 20px; height: 20px; vertical-align: middle; }
.collection td label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.collection tr:target { background: #fff3c9; }
@media print {
  .site-header, .site-footer, .collection-controls, .cookie-choice, .adsbygoogle { display: none !important; }
  .collection-table { overflow: visible; }
  .collection { width: 100%; padding: 0; }
  .collection th, .collection td { padding: 5px; }
  .collection tr { break-inside: avoid; }
  .collection td label { min-height: 0; }
  .collection a { color: #000; }
}
