/* ─── RESET ─── */
*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ─── DESIGN TOKENS ─── */
:root {
    /* Zinc neutrals */
    --zinc-50:  #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
    --zinc-950: #09090b;

    /* Brand red */
    --red-50:  #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;

    /* Semantic */
    --bg:           #f6f7f9;
    --bg-card:      #ffffff;
    --bg-muted:     var(--zinc-100);
    --bg-chip:      var(--zinc-100);
    --text:         var(--zinc-900);
    --text-soft:    var(--zinc-700);
    --text-muted:   var(--zinc-500);
    --border:       var(--zinc-200);
    --border-soft:  var(--zinc-100);
    --accent:       var(--red-600);
    --accent-strong:var(--red-700);
    --ring:         var(--red-600);

    /* Layout (SP-style compact, mobile-first) */
    --width: 760px;
    --gutter: 0.5rem;        /*  8px */
    --gutter-lg: 0.625rem;   /* 10px */
    --header-h: 3.25rem;     /* 52px */
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 10px;
    --radius-pill: 9999px;

    /* Spacing scale (tight) */
    --space-2xs: 0.25rem;    /*  4px */
    --space-xs:  0.375rem;   /*  6px */
    --space-sm:  0.5rem;     /*  8px */
    --space-md:  0.75rem;    /* 12px */
    --space-lg:  1rem;       /* 16px */
    --space-xl:  1.5rem;     /* 24px */

    /* Shadow (subtle) */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);

    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── BASE ─── */
html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
}

@media (min-width: 768px) { html { font-size: 16px; } }

a { text-decoration: none; color: var(--text); }
svg { display: block; }
img { max-width: 100%; height: auto; display: block; }

/* ─── CONTAINER ─── */
.container {
    max-width: var(--width);
    width: 100%;
    margin: 0 auto;
    padding-left:  var(--gutter);
    padding-right: var(--gutter);
}

/* ─── HEADER ─── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

header .container {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

header .brand {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--accent);
    line-height: 1;
}

header .brand:hover { color: var(--accent-strong); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--red-50);
    border: 1px solid var(--red-200);
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
}

.btn-outline i { font-size: 0.95rem; }

.btn-outline:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ─── MAIN ─── */
main {
    padding-top: calc(var(--header-h) + var(--space-md));
    padding-left:  var(--gutter);
    padding-right: var(--gutter);
    padding-bottom: var(--space-lg);
    max-width: var(--width);
    margin: 0 auto;
}

main > * { margin-bottom: var(--space-md); }
main > *:last-child { margin-bottom: 0; }

/* ─── BREADCRUMB (compact pill row) ─── */
.breadcrumb {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.45rem 0.7rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    font-size: 0.8rem;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumb .separator {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1;
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-soft);
    transition: color var(--transition);
}

.breadcrumb a i { font-size: 0.85rem; color: var(--text-muted); }

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb li[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* ─── SECTION HEADING (SP centered chip) ─── */
.section-heading {
    position: relative;
    text-align: center;
    margin: var(--space-md) 0 var(--space-sm);
}

.section-heading::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 4px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateY(-50%);
    z-index: 0;
}

.section-heading > span {
    position: relative;
    z-index: 1;
    display: inline-block;
    background: var(--bg);
    padding: 0 0.7rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
}

/* ─── ADS ─── */
.ads {
    display: block;
    min-height: 100px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

/* ─── CARD ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 0.55rem 0.75rem;
    background: var(--zinc-50);
    border-bottom: 1px solid var(--border-soft);
}

.card-header .card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.card-header .card-title i {
    font-size: 0.95rem;
    color: var(--accent);
}

/* ─── RESULT HERO CARD ─── */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 0.5rem 0.75rem;
    background: var(--zinc-50);
    border-bottom: 1px solid var(--border-soft);
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--red-50);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--red-200);
}

.live-badge .pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.85); }
}

.result-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-soft);
    font-weight: 500;
}

.result-date i {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.result-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.result-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.85rem 0.5rem;
    text-align: center;
}

.result-block:first-child {
    border-right: 1px solid var(--border-soft);
}

.result-block .result-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.result-block .result-label i { font-size: 0.8rem; }

.result-number {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--zinc-900);
    font-variant-numeric: tabular-nums;
    min-height: 2.4rem;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    letter-spacing: -0.02em;
}

.result-number:empty,
.result-number.loading { color: transparent; }

.result-number:empty::after,
.result-number.loading::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--zinc-100) 25%, var(--zinc-200) 37%, var(--zinc-100) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.result-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

@media (min-width: 768px) {
    .result-number { font-size: 2.75rem; }
    .result-block { padding: 1.1rem 0.75rem; }
}

/* ─── TABLE ─── */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    line-height: 1.4;
    text-align: center;
    background: var(--bg-card);
    font-size: 0.85rem;
}

.card table {
    border-radius: 0;
    box-shadow: none;
    border: none;
}

table:not(.card table):not(.accordion-panel table) {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.accordion-panel table {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

table thead {
    background: var(--zinc-50);
}

table thead th {
    padding: 0.45rem 0.6rem;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
}

table tbody td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.85rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

table tbody td:first-child {
    color: var(--text-soft);
    font-weight: 500;
}

table tbody tr:last-child td { border-bottom: none; }

table tbody tr:hover td { background: var(--zinc-50); }

table tbody tr:nth-child(odd) td { background: #fcfcfd; }
table tbody tr:nth-child(odd):hover td { background: var(--zinc-50); }

/* ─── PILL CTA (SP-style) ─── */
a.previous-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}

a.previous-result .cta-left {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

a.previous-result .cta-left i {
    color: var(--accent);
    font-size: 1rem;
}

a.previous-result .cta-right i {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}

a.previous-result:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

a.previous-result:hover .cta-left i,
a.previous-result:hover .cta-right i { color: #fff; }

a.previous-result:hover .cta-right i { transform: translateX(3px); }

/* ─── ARTICLE ─── */
article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

article > * {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-md);
}

article > *:last-child { margin-bottom: var(--space-md); }

article h1 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text);
    padding: 0.7rem var(--space-md);
    margin: 0 0 var(--space-md) 0;
    background: var(--zinc-50);
    border-bottom: 1px solid var(--border-soft);
    border-left: 3px solid var(--accent);
    letter-spacing: -0.005em;
}

article h2 {
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    margin: var(--space-md) var(--space-md) var(--space-sm);
    border-left: 3px solid var(--accent);
    background: var(--zinc-50);
    letter-spacing: -0.005em;
}

article h3 {
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
    margin: var(--space-md) 0 var(--space-2xs);
    padding: 0 var(--space-md);
}

article h2:first-child { margin-top: 0; }

article p {
    line-height: 1.65;
    color: var(--text-soft);
    margin-bottom: var(--space-sm);
    font-size: 0.92rem;
}

article p strong { color: var(--text); font-weight: 600; }

article ul, article ol {
    padding-left: 2rem;
    padding-right: var(--space-md);
    margin-bottom: var(--space-sm);
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.65;
}

article ul li, article ol li { margin-bottom: 0.25rem; }

article ul li::marker { color: var(--accent); }

article img {
    display: block;
    width: calc(100% - var(--space-md) * 2);
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: var(--space-md) auto;
    padding: 0 !important;
    object-fit: cover;
    border: 1px solid var(--border-soft);
}

article div { padding: 0; }
article div:has(table) { padding: 0; margin-bottom: var(--space-md); }
article div:has(.accordion-item) { padding: 0; margin-bottom: 0; }
article h2 + p { margin-top: 0; }

article a {
    color: var(--accent);
    font-weight: 500;
    transition: color var(--transition);
}

article a:hover {
    text-decoration: underline;
    color: var(--accent-strong);
}

@media (min-width: 768px) {
    article > * { padding: 0 var(--space-lg); }
    article h1 { font-size: 1.1rem; padding: 0.85rem var(--space-lg); }
    article h2 { font-size: 1.05rem; margin-left: var(--space-lg); margin-right: var(--space-lg); }
    article h3 { padding: 0 var(--space-lg); }
    article ul, article ol { padding-left: 2.4rem; padding-right: var(--space-lg); }
    article img { width: calc(100% - var(--space-lg) * 2); }
}

/* ─── FAQ (compact list-style) ─── */
.faq-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0.75rem;
}

.faq-item {
    border-bottom: 1px solid var(--border-soft);
}

.faq-item:last-child { border-bottom: none; }

.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
}

.faq-q:hover { background: var(--zinc-50); }

.faq-q .faq-marker {
    color: var(--accent);
    font-weight: 700;
    margin-right: 0.3rem;
}

.faq-q .chevron {
    color: var(--text-muted);
    font-size: 1rem;
    transition: transform var(--transition);
}

.faq-q[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.faq-a {
    padding: 0 0.75rem 0.7rem 1.7rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-soft);
}

.faq-a[hidden] { display: none; }

/* ─── INFO STRIP (3-column compact factbar) ─── */
.info-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.info-strip > div {
    padding: 0.55rem 0.4rem;
    text-align: center;
    border-right: 1px solid var(--border-soft);
}

.info-strip > div:last-child { border-right: none; }

.info-strip .info-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.info-strip .info-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.info-strip .info-value i {
    font-size: 0.85rem;
    color: var(--accent);
    vertical-align: -1px;
    margin-right: 0.1rem;
}

/* ─── DISCLAIMER ─── */
.disclaimer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 0.7rem 0.85rem;
    text-align: justify;
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--text-soft);
}

.disclaimer strong {
    color: var(--text);
    font-weight: 700;
}

/* ─── ACCORDION (year archives) ─── */
.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

article .accordion-item {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-soft);
}

article .accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--zinc-50);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
    transition: background var(--transition);
}

.accordion-trigger:hover { background: var(--zinc-100); }

.accordion-trigger .trigger-left {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-trigger .year-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--red-50);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--red-200);
}

.accordion-trigger .chevron {
    font-size: 1.05rem;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.accordion-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.accordion-panel {
    border-top: 1px solid var(--border-soft);
}

.accordion-panel[hidden] { display: none; }

article .accordion-trigger { background: var(--bg-card); }
article .accordion-trigger:hover { background: var(--zinc-50); }
article .accordion-trigger[aria-expanded="true"] { background: var(--zinc-50); }

/* ─── FOOTER (SP-style minimal) ─── */
footer {
    background: var(--zinc-900);
    color: var(--zinc-400);
    padding: var(--space-md) var(--space-md) var(--space-md);
    margin-top: var(--space-lg);
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.55;
}

footer .footer-brand {
    margin: 0 auto var(--space-xs);
    max-width: var(--width);
}

footer .footer-brand strong {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}

footer .footer-brand p {
    font-size: 0.72rem;
    color: var(--zinc-500);
    margin-top: 0.1rem;
}

footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.15rem 0.4rem;
    max-width: var(--width);
    margin: 0 auto var(--space-xs);
    font-size: 0.78rem;
}

footer .footer-links a {
    color: var(--zinc-300);
    padding: 0.2rem 0.35rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition);
}

footer .footer-links a:hover { color: var(--accent); }

footer .footer-links .sep {
    color: var(--zinc-700);
    font-size: 0.7rem;
}

footer .footer-copy {
    color: var(--zinc-500);
    font-size: 0.72rem;
    border-top: 1px solid var(--zinc-800);
    padding-top: var(--space-xs);
    margin: var(--space-xs) auto 0;
    max-width: var(--width);
}

/* ─── FOCUS ─── */
*:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
