:root { color-scheme: light; --blue: #007aff; --dark: #005ecb; --pale: #eef6ff; --ink: #222; --muted: #546170; --line: #dce4ee; }
* { box-sizing: border-box; }
body { margin: 0; background: #f7f9ff; color: var(--ink); font: 16px/1.7 system-ui, Arial, sans-serif; }
a { color: var(--dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #183f78; outline-offset: 4px; }
.skip { position: absolute; left: 16px; top: -100px; padding: 10px; background: white; z-index: 5; }
.skip:focus { top: 10px; }
.site-header { text-align: center; background: var(--blue); color: white; padding: 29px 16px 30px; }
h1 { margin: 0; font-size: 28px; line-height: 1.35; font-weight: 750; }
.site-header p { margin: 10px auto 0; max-width: 680px; }
.container { max-width: 950px; margin: 0 auto; padding: 20px 28px 35px; background: white; border-radius: 0 0 10px 10px; box-shadow: 0 3px 10px #0000000c; }
.main-nav { display: flex; align-items: stretch; gap: 10px; padding: 0 0 21px; border-bottom: 1px solid var(--line); }
.main-nav a { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; text-align: center; text-decoration: none; font-size: 15px; font-weight: 650; color: #3b4d61; }
.main-nav a:hover { background: var(--pale); color: var(--dark); }
.main-nav a[aria-current] { background: var(--pale); color: var(--dark); border-color: #98c7fb; }
.today { text-align: center; color: var(--muted); font-size: 14px; margin: 17px 0 22px; }
.calculator { margin-top: 18px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
label, .field-label { font-weight: 650; }
input[type=date], input[type=number], select { display: block; width: 100%; min-width: 0; height: 53px; background: white; border: 1px solid #a6b5c6; border-radius: 6px; padding: 10px 12px; color: var(--ink); font-size: 17px; }
input:hover, select:hover { border-color: var(--blue); }
.field-note { display: block; min-height: 26px; font-size: 13px; color: var(--muted); margin-top: 5px; }
.text-button { background: transparent; border: 0; color: var(--dark); padding: 2px 0 2px 12px; min-height: 30px; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; cursor: pointer; }
.options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 18px; }
.check-label { display: flex; align-items: center; gap: 9px; font-weight: 400; }
input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--dark); flex-shrink: 0; }
.actions { display: flex; gap: 12px; }
.button { display: inline-block; text-decoration: none; text-align: center; cursor: pointer; border: 1px solid var(--dark); background: var(--dark); color: white; font-weight: 650; border-radius: 7px; min-height: 48px; padding: 9px 24px; }
.button:hover { background: #004ca7; }
.button.secondary { background: white; border-color: #b7c5d6; color: #354e6d; }
.button.secondary:hover { background: var(--pale); }
.actions .button:first-child { flex: 1; }
.error { color: #a51f2d; font-weight: 600; margin: 12px 0; }
.error:empty { display: none; }
.result { margin-top: 25px; padding: 23px 20px 19px; background: var(--pale); border: 1px solid #bfdbfc; border-radius: 8px; text-align: center; }
.result-label { margin: 0; font-size: 14px; color: #405a76; }
.result-number { display: block; font-size: clamp(44px, 8vw, 60px); font-weight: 750; letter-spacing: -1.5px; color: #0755af; line-height: 1.2; margin-top: 3px; overflow-wrap: anywhere; }
.date-result .result-number { font-size: clamp(34px, 7vw, 48px); padding: 8px 0; }
.result-unit { display: block; color: #164c89; font-size: 18px; font-weight: 600; }
.result-dates { margin: 9px 0 0; color: #3f5b7b; font-size: 14px; }
.result-equivalent { margin: 4px 0 17px; font-weight: 600; }
.result-breakdown { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #c6dbf3; padding-top: 14px; margin: 15px 0 10px; }
.result-breakdown > div + div { border-left: 1px solid #c6dbf3; }
.result-breakdown strong { display: block; font-size: 23px; color: #194f8b; }
.result-breakdown span { font-size: 14px; }
.small { font-size: 13px; color: var(--muted); }
.result .small { margin: 7px 0 0; }
.content { margin-top: 32px; }
h2 { font-size: 22px; line-height: 1.4; margin: 30px 0 10px; }
h3 { font-size: 17px; margin: 20px 0 7px; }
p { margin: 10px 0; }
.content ul, .content ol { padding-left: 23px; }
.content li { margin: 6px 0; }
.example { padding: 15px 18px; border-left: 3px solid #7cb6f7; background: #f7faff; margin: 18px 0; }
.example p { margin: 0; }
.faq { margin-top: 26px; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 15px 4px; font-weight: 650; cursor: pointer; }
details p { padding: 0 4px 13px; margin: 0; }
.related { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 17px; }
.related p { margin: 6px 0; }
.site-footer { max-width: 950px; margin: 24px auto; padding: 0 25px 15px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.site-footer a { color: #415b7c; }
.preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 20px; }
.preset-row span { font-size: 14px; color: var(--muted); margin-right: 4px; }
.preset-row button { background: white; border: 1px solid #b7c5d6; border-radius: 5px; color: var(--dark); padding: 5px 11px; min-height: 36px; cursor: pointer; font-size: 14px; }
.preset-row button:hover { background: var(--pale); }
.amount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.countdown { padding: 32px 20px 28px; }
.countdown .result-number { font-size: clamp(65px, 11vw, 86px); }
.countdown .button { margin-top: 16px; }
.holiday-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px 45px; text-align: center; margin: 23px 0; }
.holiday-list dt { font-size: 14px; color: var(--muted); }
.holiday-list dd { margin: 3px 0 0; font-size: 18px; font-weight: 650; }
[hidden] { display: none !important; }
noscript p { padding: 16px; background: #fff4d8; border: 1px solid #e5cd8f; }
@media(max-width: 600px) {
  .site-header { padding: 25px 17px; }
  h1 { font-size: 26px; }
  .site-header p { font-size: 15px; }
  .container { padding: 16px 17px 28px; border-radius: 0; }
  .main-nav { gap: 7px; padding-bottom: 16px; }
  .main-nav a { font-size: 12px; padding: 9px 5px; }
  .field-grid { grid-template-columns: 1fr; gap: 14px; }
  .today { margin: 14px 0 18px; font-size: 13px; }
  .options { align-items: flex-start; flex-direction: column; margin-top: 10px; gap: 5px; }
  .options .text-button { padding-left: 0; }
  .result { padding: 19px 12px 16px; margin-top: 20px; }
  .check-label { font-size: 14px; }
  .actions { gap: 10px; }
  .button { padding-left: 17px; padding-right: 17px; }
  h2 { font-size: 21px; }
  .site-footer { padding: 0 17px; }
}
@media print {
  body { background: white; }
  .main-nav, .actions, .text-button, .site-footer, .preset-row, .related { display: none; }
  .site-header { color: #111; background: white; }
  .container { box-shadow: none; }
  .result { break-inside: avoid; }
}
.calculator .actions { margin-top: 17px; }
.calculator .actions .button { flex: 0 1 100%; }
.sun-result { margin-top: 21px; }
.sun-result .place-date { font-size: 18px; margin: 0 0 15px; color: #25486e; }
.place-date span { font-weight: 450; white-space: nowrap; }
.sun-result .result-number { font-size: 64px; }
.sun-result .word-result { font-size: clamp(30px, 7vw, 46px); letter-spacing: -1px; margin: 10px 0; }
.sun-result .result-breakdown { margin-bottom: 13px; }
.sun-result .result-breakdown strong { font-size: 25px; }
.day-change { font-size: 14px; margin: 7px 0; color: #284d74; }
.polar-note { font-size: 15px; font-weight: 600; }
.day-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 8px; }
.day-nav a, .day-nav > span { display: block; padding: 9px 10px; font-size: 14px; min-height: 42px; }
.day-nav > span { color: #657387; }
.twilight { margin-top: 4px; }
.twilight summary { color: var(--dark); }
.twilight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.twilight-grid p { margin: 0; padding-bottom: 12px; }
.twilight-grid span { display: block; font-size: 14px; color: var(--muted); }
.twilight-grid strong { display: block; font-size: 21px; font-weight: 650; }
.table-wrap { width: 100%; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
caption { text-align: left; font-size: 13px; color: var(--muted); padding: 0 0 12px; }
th, td { text-align: right; border-bottom: 1px solid var(--line); padding: 11px 10px; }
th:first-child { text-align: left; }
thead th { background: #f5f8fc; font-size: 14px; color: #465b74; }
tbody th { font-weight: 500; }
.selected-day { background: #eef6ff; }
.selected-day th, .selected-day td { font-weight: 650; }
.city-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px 16px; }
.city-links a { padding: 5px 0; }
.home-link { text-decoration: none; font-weight: 650; }
@media (max-width: 600px) {
  .sun-result .result-number { font-size: 58px; }
  .sun-result .word-result { font-size: 36px; }
  .sun-result .result-breakdown strong { font-size: 21px; }
  .sun-result .place-date { font-size: 17px; }
  .city-links { grid-template-columns: repeat(2, 1fr); }
  th, td { padding: 10px 5px; font-size: 13px; }
  thead th { font-size: 13px; }
  .day-nav a, .day-nav > span { padding-left: 2px; padding-right: 2px; }
}
@media (max-width: 359px) {
  th, td { font-size: 12px; padding: 10px 3px; }
  .sun-result .result-breakdown strong { font-size: 19px; }
  .sun-result .place-date span { display: block; }
}
@media print { .calculator, .day-nav, .city-section { display: none; } }
.period-links { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 22px; margin: 12px 0 17px; font-size: 14px; }
.period-fields { grid-template-columns: 1.3fr 1.1fr 0.8fr 1.1fr; gap: 18px; }
.period-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 15px; }
.period-actions p { max-width: 590px; margin: 0; }
.period-actions .button { flex-shrink: 0; }
.period-summary { text-align: center; background: var(--pale); border: 1px solid #bfdbfc; border-radius: 8px; padding: 15px; margin-top: 22px; }
.period-summary h2 { margin: 0 0 5px; font-size: 23px; color: #25486e; }
.period-summary h2 span { font-weight: 500; white-space: nowrap; }
.period-summary p { margin: 5px 0; }
.view-switch { justify-content: space-between; }
.print-button { padding-left: 0; }
.month-jumps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 13px 0; }
.month-jumps a { padding: 7px 4px; border: 1px solid var(--line); border-radius: 5px; text-align: center; font-size: 13px; text-decoration: none; }
.month-jumps a:hover { background: var(--pale); }
.period-tables { margin-top: 14px; }
.annual-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 24px; align-items: start; }
.month-block { min-width: 0; scroll-margin-top: 20px; }
.month-block h2 { font-size: 21px; padding: 9px 12px; background: #eaf3ff; margin: 0; color: #25486e; border-radius: 6px 6px 0 0; }
.annual-tables th, .annual-tables td { font-size: 13px; padding: 7px 7px; }
.annual-tables tbody th { white-space: nowrap; }
.calendar-notes { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 5px; }
.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; }
@media (min-width: 900px) {
  .month-jumps { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; }
  .month-jumps a { font-size: 12px; padding-left: 1px; padding-right: 1px; }
}
@media (max-width: 600px) {
  .main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav a { font-size: 14px; }
  .period-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
  .period-fields select, .period-fields input { font-size: 15px; padding-left: 8px; padding-right: 5px; }
  .period-actions { display: block; }
  .period-actions .button { width: 100%; margin-top: 13px; }
  .period-summary h2 { font-size: 21px; }
  .period-summary h2 span { display: block; }
  .period-nav { flex-wrap: wrap; justify-content: center; gap: 0 13px; }
  .period-nav a, .period-nav span { font-size: 13px; }
  .month-jumps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .annual-tables { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  @page { margin: 12mm; }
  .period-links, .month-jumps, .table-note, .calendar-notes { display: none; }
  .annual-tables { display: block; }
  .month-block { break-inside: avoid; }
  .annual-tables .month-block + .month-block { break-before: page; }
  .calendar-table th, .calendar-table td { font-size: 10pt; padding: 3px 6px; }
  .calendar-table a { color: #222; text-decoration: none; }
  .period-summary { padding: 5px; margin: 5px 0 12px; }
  .period-summary p { display: none; }
}
