:root {
  --primary: #0f172a;
  --accent: #ff4757;
  --accent-dark: #e63946;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 14px rgba(0, 0, 0, .05);
  --ok: #047857;
  --warn: #b45309;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; color: var(--primary); margin: 0 0 .6rem; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); margin-top: 2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* header */
.site-header { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 16px; padding: 10px 0; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 800; font-size: 1.25rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { color: #fff; }
.brand small { font-weight: 500; opacity: .75; font-size: .8rem; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); display: inline-block; }
.search { margin-left: auto; display: flex; gap: 6px; flex: 1 1 240px; max-width: 420px; }
.search input { flex: 1; min-width: 0; padding: .5rem .8rem; border-radius: 8px; border: 0; font: inherit; }
.search button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .5rem 1rem; font: inherit;
  font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}
.search button:hover, .btn:hover { background: var(--accent-dark); color: #fff; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a {
  color: #e2e8f0; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: .35rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .9rem;
}
.cats a:hover { background: var(--accent); color: #fff; }
main { padding-block: 24px 48px; min-height: 60vh; }

/* hero */
.hero { padding: 12px 0 8px; }
.hero p { color: var(--muted); max-width: 70ch; font-size: 1.05rem; }

/* rail + chips */
.rail { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; flex: 0 0 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: .55rem 1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--primary); text-decoration: none; font-weight: 600;
}
.pill b { background: var(--accent); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 .5rem; }
.pill:hover { border-color: var(--accent); color: var(--primary); }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.chips-rail { display: flex; }
.chips-rail .chip { width: 150px; }
.chip {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--primary);
  text-decoration: none; font-weight: 600; text-align: center; font-size: .92rem;
}
.chip:hover { border-color: var(--accent); }
.chip img { width: 64px; height: 64px; object-fit: contain; }
.chip-initial {
  width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 800;
}

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.card-link:hover h3 { color: var(--accent-dark); }
.card-img { position: relative; background: #e2e8f0; }
.card-img img { width: 100%; height: auto; }
.card-ph { display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.card-body { padding: 10px 12px 14px; }
.card-body h3 { margin: 0 0 .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body p { margin: 0; font-size: .85rem; }
.badge {
  position: absolute; left: 8px; bottom: 8px; font-size: .75rem; font-weight: 700; padding: .2rem .6rem;
  border-radius: 999px; color: #fff; background: var(--ok);
}
.badge-upcoming { background: var(--warn); }
.badge-expired { background: #475569; }

/* breadcrumbs */
.crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--muted); }

/* store */
.store-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 8px; }
.store-head img { width: 96px; height: 96px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; flex: none; }
.tab-list { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tab-list a {
  padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent;
}
.tab-list a[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--accent); }
[data-tabs].on [role="tabpanel"][hidden] { display: none; }

/* misc */
.archive { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 24px; }
.archive summary { cursor: pointer; font-weight: 600; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 20px 0; }
.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; padding: .75rem 1rem; border-radius: var(--radius); }
.prose { max-width: 78ch; margin-top: 2.5rem; }
.prose h2 { margin-top: 1.6rem; }
.prose p { color: #1e293b; }

/* gateway */
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.country { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.country-link { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--primary); margin-bottom: 8px; }
.country-link:hover strong { color: var(--accent-dark); }
.flag { font-size: 2.4rem; line-height: 1; }

/* footer */
.site-footer { background: var(--primary); color: #cbd5e1; padding: 28px 0; }
.site-footer a { color: #fff; }
.site-footer .muted { color: #94a3b8; }
.foot-title { font-weight: 700; margin-bottom: .4rem; color: #fff; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0 0 14px; }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .store-head { flex-direction: column; }
  .search { max-width: none; order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .chip, .pill { transition: transform .15s, border-color .15s; }
  .card:hover, .chip:hover { transform: translateY(-2px); }
}

.flag-img { display: inline-block; vertical-align: -3px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.flag { line-height: 0; }

.about { margin-top: 2.5rem; max-width: 980px; }
.about > p:first-of-type { font-size: 1.05rem; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1.2rem 0; }
.about-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.about-grid p { margin: 0; color: var(--muted); font-size: .95rem; }

.flyer-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 16px; }
.badge-static { display: inline-block; font-weight: 700; font-size: .9rem; padding: .3rem .85rem; border-radius: 999px; color: #fff; background: var(--ok); }
.badge-static.badge-upcoming { background: var(--warn); }
.badge-static.badge-expired { background: #475569; }
.back { font-weight: 600; }
.related { margin-top: 2rem; }
.plain-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 0; margin: 0 0 .75rem; }
.plain-links a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; }
.prose h3 { margin-top: 1.1rem; }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-card a { color: inherit; text-decoration: none; display: block; height: 100%; }
.post-card:hover h3 { color: var(--accent-dark); }
.post-img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #e2e8f0; }
.post-body-sm { padding: 14px 16px 18px; }
.post-body-sm h3 { font-size: 1.1rem; margin: .2rem 0 .4rem; }
.post-body-sm p { margin: 0 0 .3rem; }
.post { max-width: 760px; margin-inline: auto; }
.post-head h1 { margin-bottom: .5rem; }
.post-meta { font-size: .9rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: .4rem 0 1rem; }
.tags span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .7rem; font-size: .8rem; color: var(--muted); }
.post-cover { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); margin: 0 0 1.5rem; background: #e2e8f0; }
.post-content { font-size: 1.08rem; line-height: 1.75; }
.post-content h2 { margin-top: 2.2rem; }
.post-content h3 { margin-top: 1.6rem; }
.post-content p, .post-content li { color: #1e293b; }
.post-content ul, .post-content ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.post-content li { margin-bottom: .35rem; }
.post-content blockquote { margin: 1.5rem 0; padding: .6rem 1.1rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.post-content blockquote p { margin: 0; }
.post-content figure { margin: 1.5rem 0; }
.post-content figure img { border-radius: var(--radius); }
.post-content figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.post-content code { background: #e2e8f0; padding: .05rem .35rem; border-radius: 4px; font-size: .92em; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .98rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: .65rem .9rem; text-align: left; vertical-align: top; line-height: 1.5; }
.post-content td:first-child { font-weight: 600; }
@media (max-width: 560px) { .post-content td:first-child { white-space: normal; } .post-content th, .post-content td { padding: .5rem .6rem; font-size: .92rem; } }
.post-content th { background: var(--primary); color: #fff; font-weight: 700; }
.post-content tbody tr:nth-child(even) { background: rgba(15, 23, 42, .03); }
