/* Hallmark · v2.0.0 · genre: playful · theme: the channel's own palette (by request) · redesign: full · scope: page */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, both posts share one card and ticket system; the cover, the verdict colour and the picture vary per post */
/* Hallmark · waive 7b · surface: absolute · the channel's palette fixes the card white at #FFFFFF; the cream page carries the warmth */

:root {
  --bg: #FFF7E2;
  --surface: #FFFFFF;
  --ink: #23304A;
  --go: #14A06C;
  --maybe: #E5620E;
  --no: #E0336A;
  --muted: color-mix(in srgb, var(--ink) 80%, transparent);
  --font-display: Mitr, Sarabun, sans-serif;
  --font-body: Sarabun, system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, monospace;
  --wrap: 1040px;
  --measure: 720px;
  --radius: 18px;
  --radius-sm: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.75 var(--font-body); }
a { color: var(--ink); text-decoration-color: var(--go); text-decoration-thickness: 3px; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--no); outline-offset: 3px; }

.top, footer { max-width: var(--wrap); margin: 0 auto; padding: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 600 26px/1 var(--font-display); min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: var(--surface); }
.brand b { color: var(--no); }
.yt { font: 600 16px/1 var(--font-display); color: var(--ink); background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius-sm); padding: 8px 16px; text-decoration: none; white-space: nowrap; box-shadow: 4px 4px 0 var(--ink); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Index */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); gap: 32px; align-items: center; padding: 40px 0 24px; }
.hero h1, article h1 { font: 600 clamp(38px, 7vw, 68px)/1.15 var(--font-display); margin: 0 0 16px; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.hl { background: color-mix(in srgb, var(--go) 55%, var(--surface)); padding: 0 0.12em; border-radius: 10px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero p { margin: 0 0 20px; max-width: 46ch; }
.mascot { width: 100%; max-width: 200px; justify-self: end; animation: chomp 0.7s ease-in-out 3; }
@keyframes chomp { 50% { transform: rotate(-8deg) scale(1.04); } }

.btn { display: inline-block; font: 600 19px/1.2 var(--font-display); color: var(--surface); background: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 24px; text-decoration: none; box-shadow: 5px 5px 0 var(--no); transition: transform 0.15s ease; }
.btn:hover { transform: translate(-2px, -2px); }
.btn:active { transform: translate(3px, 3px); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pill { display: inline-block; font: 600 16px/1.4 var(--font-display); color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; padding: 0 12px; }
.pill-go { background: color-mix(in srgb, var(--go) 35%, var(--surface)); }
.pill-maybe { background: color-mix(in srgb, var(--maybe) 35%, var(--surface)); }
.pill-no { background: color-mix(in srgb, var(--no) 30%, var(--surface)); }

.list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; padding: 8px 0 48px; }
.card { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 20px; align-items: start; padding: 16px; background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink); color: var(--ink); text-decoration: none; transition: transform 0.15s ease; min-width: 0; }
.card:hover { transform: translate(-3px, -3px); }
.card h2 { font: 600 24px/1.35 var(--font-display); margin: 0 0 8px; overflow-wrap: break-word; text-wrap: balance; }
.card p { margin: 0; }
.card > div > p:not(.meta) { color: var(--muted); }

.cover { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border: 3px solid var(--ink); border-radius: 12px; background: var(--surface); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px !important; font-size: 15px; color: var(--muted); }
.chip { font: 700 15px/1.4 var(--font-body); color: var(--surface); background: var(--ink); border-radius: 8px; padding: 0 8px; }

/* Post */
article { max-width: var(--measure); margin: 0 auto; }
.post-head { display: grid; grid-template-columns: minmax(0, 132px) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 8px; }
.post-head .cover { box-shadow: 6px 6px 0 var(--ink); border-radius: 16px; }
.post-head h1 { font-size: clamp(30px, 6vw, 44px); }
.post-head .meta { margin-top: 4px !important; }
@media (min-width: 720px) { .post-head { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 32px; } }
article h2 { font: 600 26px/1.35 var(--font-display); margin: 40px 0 8px; overflow-wrap: break-word; text-wrap: balance; }
article p, article li { overflow-wrap: break-word; }
article code { font: 500 15px var(--font-code); background: var(--surface); border: 2px solid var(--ink); padding: 0 4px; border-radius: 6px; }
article table { width: 100%; border-collapse: collapse; background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius-sm); }
article th, article td { border: 2px solid var(--ink); padding: 8px 12px; text-align: left; }
article th { font-family: var(--font-display); font-weight: 600; }
.watch { margin: 16px 0 0 !important; }
.watch a { font: 600 18px/1.4 var(--font-display); color: var(--ink); text-decoration-color: var(--no); text-decoration-thickness: 4px; }
.fig { margin: 32px 0; }
.fig img { width: 100%; height: auto; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--surface); }
.fig figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); }
.verdict { margin: 28px 0; padding: 16px 20px; background: var(--surface); border: 3px solid var(--ink); border-left-width: 12px; border-radius: var(--radius-sm); }
.verdict-go { border-left-color: var(--go); }
.verdict-maybe { border-left-color: var(--maybe); }
.verdict-no { border-left-color: var(--no); }
.verdict .pill { margin-bottom: 4px; }
article small { color: var(--muted); font-size: 15px; }

/* Email box for the full guide */
.guide { margin-top: 48px; padding: 24px; background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--no); }
.guide h2 { margin-top: 0; }
.guide label { display: block; margin: 12px 0; }
.guide input[type=email] { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 12px; color: var(--ink); background: var(--bg); border: 3px solid var(--ink); border-radius: var(--radius-sm); }
.guide .ok { font-size: 15px; color: var(--muted); }
.guide button { font: 600 19px/1.2 var(--font-display); color: var(--surface); background: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 24px; cursor: pointer; }
.guide button:hover { transform: translate(-2px, -2px); }
.guide button, .guide button:hover { transition: transform 0.15s ease; }
.guide.soon { border-style: dashed; box-shadow: none; }

footer { text-align: center; color: var(--muted); font-size: 15px; padding-bottom: 40px; }
footer p { margin: 0; }

@media (max-width: 640px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 120px); gap: 20px; }
  .brand { font-size: 22px; }
  .brand img { width: 36px; height: 36px; }
  .yt { font-size: 13px; padding: 8px 12px; }
  .card { grid-template-columns: minmax(0, 96px) minmax(0, 1fr); gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .mascot { animation: none; }
  .btn, .card, .guide button { transition: none; }
  .btn:hover, .card:hover, .guide button:hover { transform: none; }
}

.legend-note { margin: 0 0 8px; font-size: 0.95em; color: var(--muted); }
.fig img { height: auto; }
