:root {
    color-scheme: light;
    --page: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef4fb;
    --ink: #142033;
    --muted: #5d6979;
    --line: #dbe3ed;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --teal: #0f8b8d;
    --amber: #b45309;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html {
    min-width: 280px;
    min-height: 100%;
    background: var(--page);
}

body {
    min-width: 280px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page-inner,
.header-inner,
.content-grid,
.faq-inner,
.footer-inner {
    width: min(100% - 32px, 1080px);
    margin-inline: auto;
}

.site-header {
    min-height: 68px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.site-logo span { color: var(--blue); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #526174;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-current {
    border-color: var(--line);
    color: var(--blue-dark);
    background: #f7f9fc;
}

.page-hero,
.detail-hero {
    padding: 64px 0 132px;
    border-bottom: 1px solid #d7e2f0;
    background: #eaf2fc;
    text-align: center;
}

.detail-hero { padding-bottom: 112px; }

.eyebrow,
.section-kicker {
    margin: 0 0 10px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero h1,
.detail-hero h1 {
    margin: 0;
    color: #162844;
    font-size: 58px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0;
}

.hero-copy,
.detail-hero > .page-inner > p:not(.eyebrow) {
    max-width: 680px;
    margin: 18px auto 0;
    color: #50637b;
    font-size: 18px;
    line-height: 1.65;
}

.back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.calculator-wrap,
.answer-section {
    position: relative;
    z-index: 2;
    margin-top: -78px;
}

.calculator-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.8fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.calculator-input-side {
    padding: 36px;
}

.calculator-input-side h2,
.section-heading h2,
.content-grid h2,
.faq-inner h2,
.inline-calculator h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: 0;
}

.calculator-form { margin-top: 24px; }

.calculator-form label {
    display: block;
    margin-bottom: 8px;
    color: #526174;
    font-size: 13px;
    font-weight: 800;
}

.input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.input-row input,
.inline-form input {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 15px;
    border: 1px solid #cbd6e3;
    border-radius: 8px;
    outline: 0;
    color: var(--ink);
    background: #f9fbfd;
    font-size: 18px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.input-row input:focus,
.inline-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
    background: #ffffff;
}

.input-row button,
.inline-form button {
    min-height: 52px;
    padding: 0 20px;
    border: 1px solid var(--blue);
    border-radius: 8px;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
}

.input-row button:hover,
.inline-form button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }

.calculator-result {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px;
    border-left: 1px solid var(--line);
    background: #163763;
    color: #ffffff;
    text-align: center;
}

.calculator-result-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calculator-result-summary > span {
    color: #c6d8ef;
    font-size: 14px;
    font-weight: 750;
}

.calculator-result-summary time {
    margin-top: 11px;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.25;
}

.calculator-result-summary small {
    margin-top: 12px;
    color: #a9dfe5;
    font-size: 12px;
    font-weight: 750;
}

.date-countdown {
    width: min(100%, 440px);
    min-height: 112px;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid rgba(198, 216, 239, 0.24);
}

.date-countdown > p {
    margin: 0 0 11px;
    color: #c6d8ef;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.date-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.date-countdown-unit {
    min-width: 0;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border: 1px solid rgba(198, 216, 239, 0.2);
    border-radius: 8px;
    background: rgba(5, 24, 49, 0.38);
}

.date-countdown-unit strong {
    min-width: 2ch;
    color: #ffffff;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1;
}

.date-countdown-unit span {
    margin-top: 7px;
    color: #9fb8d7;
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.date-countdown-unit.is-seconds strong { color: #5eead4; }

.date-countdown.is-light {
    width: min(100%, 520px);
    margin: 24px auto 0;
    border-top-color: var(--line);
}

.date-countdown.is-light > p { color: #526174; }

.date-countdown.is-light .date-countdown-unit {
    border-color: #d6dfeb;
    background: #f3f6fa;
}

.date-countdown.is-light .date-countdown-unit strong { color: var(--ink); }
.date-countdown.is-light .date-countdown-unit span { color: #64748b; }
.date-countdown.is-light .date-countdown-unit.is-seconds strong { color: #0788a4; }

.featured-section { padding: 74px 0 78px; }

.section-heading {
    max-width: 680px;
    margin-bottom: 28px;
}

.date-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.date-card {
    min-width: 0;
    min-height: 150px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--blue);
    border-radius: 8px;
    background: var(--surface);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.date-card:nth-child(2) { border-top-color: var(--teal); }
.date-card:nth-child(3) { border-top-color: var(--amber); }

.date-card:hover {
    border-color: #b9c7d8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.date-card-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--blue-dark);
    background: #eaf1ff;
    font-size: 19px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.date-card:nth-child(2) .date-card-number { color: #086b6d; background: #e5f5f3; }
.date-card:nth-child(3) .date-card-number { color: #92400e; background: #fff2dc; }

.date-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.date-card time {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.date-card-arrow { color: #8190a3; font-size: 21px; }

.days-table-section {
    padding: 76px 0 84px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.days-table-section .section-heading > p:not(.section-kicker) {
    max-width: 680px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.days-table-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.days-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--ink);
}

.days-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.days-table .days-column { width: 24%; }
.days-table .date-column { width: 48%; }
.days-table .weekday-column { width: 28%; }

.days-table th,
.days-table td {
    height: 56px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.days-table thead th {
    height: 52px;
    color: #dceaff;
    background: #163763;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.days-table tbody tr:nth-child(even) { background: #f7f9fc; }
.days-table tbody tr:last-child > * { border-bottom: 0; }

.days-table tbody th,
.days-table tbody td {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.days-table tbody th { font-weight: 850; }
.days-table tbody td { color: #526174; }

.days-table tbody th a {
    color: var(--blue-dark);
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.days-table tbody th a:hover { color: #163763; }

.content-section {
    padding: 78px 0;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
    gap: 68px;
    align-items: start;
}

.content-grid article > p:not(.section-kicker) {
    margin: 19px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.content-grid article h2:not(:first-of-type) { margin-top: 38px; }

.info-panel,
.related-panel {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.info-panel h2,
.related-panel h2 {
    margin: 0 0 17px;
    font-size: 20px;
}

.info-panel ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-panel li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    color: #465569;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.info-panel li span {
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
}

.faq-section {
    padding: 76px 0 84px;
    border-top: 1px solid var(--line);
    background: var(--page);
}

.faq-inner { max-width: 800px; }
.faq-list { margin-top: 28px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
    position: relative;
    padding: 21px 42px 21px 0;
    color: #243247;
    cursor: pointer;
    font-size: 16px;
    font-weight: 850;
    list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 5px;
    color: var(--blue);
    font-size: 23px;
    font-weight: 500;
    transform: translateY(-50%);
}

.faq-list details[open] summary::after { content: "-"; }

.faq-list details p {
    max-width: 690px;
    margin: -4px 0 21px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.answer-card {
    padding: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    text-align: center;
}

.answer-card > p {
    margin: 0;
    color: #5e6d80;
    font-size: 15px;
    font-weight: 750;
}

.answer-card > time {
    display: block;
    margin-top: 10px;
    color: #163763;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.18;
}

.answer-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.answer-meta span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #536174;
    background: #f7f9fc;
    font-size: 12px;
    font-weight: 800;
}

.date-equation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: #546276;
    font-size: 14px;
}

.date-equation span { color: var(--blue-dark); font-weight: 850; }
.date-equation strong { color: var(--ink); }

.share-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.share-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #334155;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.share-button:hover { transform: translateY(-1px); }
.share-primary { border-color: var(--blue); color: #ffffff; background: var(--blue); }
.share-whatsapp { border-color: #137a42; color: #ffffff; background: #137a42; }
.share-x { border-color: #111827; color: #ffffff; background: #111827; }

.inline-calculator-section { padding: 52px 0 0; }

.inline-calculator {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1fr) minmax(210px, 0.8fr);
    align-items: end;
    gap: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.inline-calculator h2 { font-size: 23px; }

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.inline-result {
    min-height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 22px;
    border-left: 1px solid var(--line);
}

.inline-result span,
.inline-result small { color: var(--muted); font-size: 11px; font-weight: 750; }
.inline-result time { margin: 3px 0; color: var(--ink); font-size: 16px; font-weight: 900; }

.detail-content { margin-top: 58px; }

.related-panel { display: grid; }

.related-panel a {
    display: grid;
    gap: 3px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.related-panel a span { color: var(--teal); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.related-panel a strong { color: #35445a; font-size: 14px; }
.related-panel a:hover strong { color: var(--blue-dark); }

.site-footer {
    padding: 30px 0;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p { margin: 0; color: #697586; font-size: 13px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .calculator-card,
    .content-grid { grid-template-columns: 1fr; }

    .calculator-result {
        min-height: 310px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .date-card-grid { grid-template-columns: 1fr; }
    .date-card { min-height: 112px; }

    .content-grid { gap: 36px; }

    .inline-calculator {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .inline-result {
        grid-column: 1 / -1;
        padding: 16px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 600px) {
    .page-inner,
    .header-inner,
    .content-grid,
    .faq-inner,
    .footer-inner { width: min(100% - 22px, 1080px); }

    .site-header,
    .header-inner { min-height: 62px; }
    .site-nav a { padding-inline: 10px; font-size: 12px; }
    .site-nav a.is-current { display: none; }

    .page-hero,
    .detail-hero { padding: 48px 0 105px; }
    .detail-hero { padding-bottom: 94px; }

    .page-hero h1,
    .detail-hero h1 { font-size: 38px; }

    .hero-copy,
    .detail-hero > .page-inner > p:not(.eyebrow) { font-size: 16px; }

    .calculator-wrap,
    .answer-section { margin-top: -62px; }

    .calculator-input-side { padding: 25px 18px; }
    .calculator-input-side h2,
    .section-heading h2,
    .content-grid h2,
    .faq-inner h2 { font-size: 27px; }

    .input-row { grid-template-columns: 1fr; }
    .input-row button { width: 100%; }

    .calculator-result { min-height: 300px; padding: 25px 18px; }
    .calculator-result-summary time { font-size: 25px; }
    .date-countdown { margin-top: 22px; }
    .date-countdown-unit strong { font-size: 22px; }

    .featured-section { padding: 58px 0; }
    .date-card { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
    .date-card-arrow { display: none; }

    .days-table-section { padding: 58px 0 64px; }
    .days-table-section .section-heading { margin-bottom: 22px; }
    .days-table .days-column { width: 29%; }
    .days-table .date-column { width: 43%; }
    .days-table .weekday-column { width: 28%; }
    .days-table th,
    .days-table td { height: 52px; padding: 11px 9px; }
    .days-table tbody th,
    .days-table tbody td { font-size: 12px; }
    .days-table thead th { font-size: 10px; }

    .content-section { padding: 60px 0; }
    .faq-section { padding: 60px 0 66px; }

    .answer-card { padding: 28px 14px; }
    .answer-card > time { font-size: 29px; }

    .date-equation {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .share-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .inline-calculator-section { padding-top: 40px; }
    .inline-calculator { grid-template-columns: 1fr; padding: 22px 14px; }
    .inline-form { grid-template-columns: minmax(0, 1fr) auto; }
    .inline-result { grid-column: auto; }
    .detail-content { margin-top: 42px; }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 340px) {
    .inline-form { grid-template-columns: 1fr; }
    .inline-form button { width: 100%; }
    .date-card-number { width: 42px; height: 42px; }
}

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