:root {
  color-scheme: light;
  --surface:#f2f5f8;
  --paper:#fff;
  --ink:#142638;
  --navy:#102438;
  --muted:#51677b;
  --line:#d9e2eb;
  --blue:#204c77;
  --blue-wash:#e9f2fb;
  --ready:#08705a;
  --ready-wash:#e6f7ef;
  --waiting:#855116;
  --waiting-wash:#fff2d9;
  --radius:15px;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  background:var(--surface);
  line-height:1.5;
}
*,*::before,*::after {box-sizing:border-box;}
[hidden] {display:none !important;}
body {margin:0; min-width:280px;}
a {color:var(--blue); text-underline-offset:.18em;}
a:hover {color:#116b94;}
button,input,select {font:inherit;}
button,summary {cursor:pointer;}
button:disabled {cursor:default; opacity:.56;}
:focus-visible {outline:3px solid #2a85bf; outline-offset:3px;}
h1,h2,h3,p,dl {margin:0;}
h1,h2,h3 {line-height:1.15; letter-spacing:-.028em;}
h1 {font-size:clamp(2rem,4.7vw,3.4rem); font-weight:760;}
h2 {font-size:clamp(1.3rem,2.6vw,1.8rem);}
h3 {font-size:1.2rem;}
.shell {width:min(1180px,calc(100% - 48px)); margin-inline:auto;}
.visually-hidden,.skip-link:not(:focus) {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;}
.skip-link:focus {position:fixed; inset:8px auto auto 8px; z-index:10; background:#fff; padding:12px;}
.site-header {position:relative; background:#fbfcfe; border-bottom:1px solid var(--line);}
.header-inner {display:flex; align-items:center; gap:24px; min-height:72px;}
.brand {display:inline-flex; align-items:center; gap:10px; color:var(--ink); font-size:1.22rem; font-weight:800; letter-spacing:-.045em; text-decoration:none; white-space:nowrap;}
.brand-domain {color:#38749d;}
.brand-mark {display:inline-flex; width:34px; height:34px; align-items:center; justify-content:center; gap:3px; background:#18405b; color:#e4f3fb; border-radius:10px;}
.brand-mark i {width:3px; height:9px; border-radius:2px; background:currentColor;}
.brand-mark i:nth-child(2) {height:13px; color:#91e6c8;}
.brand-mark i:nth-child(3) {height:18px;}
.main-nav {display:flex; gap:5px; align-items:center; margin-inline:auto; font-size:.91rem;}
.main-nav a {color:var(--muted); text-decoration:none; padding:8px 10px; border-radius:8px; white-space:nowrap;}
.main-nav a:hover,.main-nav a[aria-current="page"] {background:#e8eff6; color:var(--ink);}
.languages {position:relative; margin-inline-start:auto; font-size:.91rem;}
.languages summary {display:flex; min-height:39px; align-items:center; gap:10px; list-style:none; border:1px solid var(--line); padding:6px 12px; border-radius:9px; background:white; white-space:nowrap; font-weight:650;}
.languages summary::-webkit-details-marker {display:none;}
.languages summary::after {content:""; width:7px; height:7px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:translateY(-2px) rotate(45deg);}
.languages ul {position:absolute; z-index:5; top:calc(100% + 6px); right:0; width:174px; max-height:65vh; overflow:auto; margin:0; padding:6px; list-style:none; border:1px solid var(--line); border-radius:12px; background:white; box-shadow:0 12px 28px #14263821;}
.languages a {display:block; color:var(--ink); text-decoration:none; border-radius:6px; padding:7px 9px;}
.languages a:hover,.languages a[aria-current="page"] {background:var(--blue-wash);}
.hero {display:grid; grid-template-columns:minmax(0,1.75fr) minmax(250px,1fr); gap:clamp(16px,4vw,48px); align-items:center; margin-top:28px; padding:clamp(20px,4.5vw,49px); border-radius:20px; color:#f8fbff; background:radial-gradient(ellipse at 96% 8%,#274961,transparent 69%),linear-gradient(115deg,#13253a,#0e1b2d); box-shadow:0 10px 23px #182b3f18;}
.hero h1 {max-width:680px; text-wrap:balance;}
.hero p:not(.clock-heading) {margin-top:15px; max-width:640px; color:#d9e7f2; font-size:clamp(1rem,1.65vw,1.14rem);}
.hero-copy .button {margin-top:21px;}
.hero-clock {display:grid; align-content:center; gap:2px; padding:clamp(14px,2.7vw,26px); border:1px solid #8facbf51; background:#0a1c31b8; border-radius:14px; color:#e8f2fc; font-variant-numeric:tabular-nums; min-width:0;}
.clock-heading {display:flex; align-items:center; gap:8px; margin-bottom:5px; font-weight:620; font-size:.87rem; color:#d9e7f2;}
.live-dot {width:8px; height:8px; border-radius:50%; background:#75e0b9; box-shadow:0 0 0 4px #75e0b921;}
.is-selected .live-dot {background:#f3bb7f; box-shadow:0 0 0 4px #f3bb7f21;}
.clock-value {font-size:clamp(2.45rem,5.5vw,3.75rem); letter-spacing:-.045em; line-height:1.12; font-weight:730; color:white;}
.clock-value small {font-size:.54em; font-weight:600; color:#b9d0e4;}
.clock-zone {font-size:.87rem; color:#bdd0e2;}
.clock-count {margin-top:10px; padding-top:10px; border-top:1px solid #8facbf51; display:flex; align-items:center; gap:10px; color:#e3eef9;}
.clock-count strong {font-size:1.45rem; color:#a6efd3;}
.clock-count small {color:#c6d9ea; font-size:.87rem;}
.controls,.calendar-controls {display:flex; align-items:end; flex-wrap:wrap; gap:12px; padding:14px; background:var(--paper);}
.controls {border:1px solid var(--line); border-radius:var(--radius); margin-top:14px;}
.controls label,.calendar-controls label {flex:1 1 125px;}
.controls label:first-child,.calendar-controls label:first-child {flex:1.25 1 202px;}
label {display:grid; gap:4px; font-size:.91rem; color:#3a536b; font-weight:650; min-width:0;}
input,select,.button {min-height:42px; border:1px solid #cad7e4; border-radius:9px; background:white; color:var(--ink); padding:8px 11px; font-size:.94rem; max-width:100%;}
select {appearance:none; padding-right:32px; background-image:linear-gradient(45deg,transparent 50%,#496a85 50%),linear-gradient(135deg,#496a85 50%,transparent 50%); background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%; background-size:5px 5px; background-repeat:no-repeat;}
input[type="date"],input[type="time"] {width:100%; min-width:0;}
.button {display:inline-flex; gap:8px; align-items:center; justify-content:center; text-decoration:none; font-weight:670; white-space:normal; text-align:center; flex-shrink:0;}
.button:hover {filter:brightness(.96); color:inherit;}
.button-light:hover {color:#153350;}
.button-light {background:#f5f9ff; color:#153350; border-color:#f5f9ff;}
.button-primary {background:#204c77; color:white; border-color:#204c77;}
.button-primary:hover {color:#fff;}
.button-secondary {background:#f8fbfe; color:#254562;}
.button[aria-pressed="true"],.button[aria-pressed="true"]:hover {background:var(--blue-wash); color:#163f68; border-color:#95b7d3;}
.form-error {flex-basis:100%; color:#9c302d; font-size:.93rem;}
.section {margin-top:30px;}
.section-head {display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:13px;}
.section-meta,.note,.muted {font-size:.92rem; color:var(--muted);}
.note {margin-top:10px; max-width:85ch;}
.featured-grid {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;}
.market-card {display:grid; grid-template-rows:auto auto 1fr auto; gap:7px; min-width:0; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:16px; color:var(--ink); text-decoration:none; transition:border-color .15s,box-shadow .15s;}
.market-card:hover {color:var(--ink); border-color:#8caac5; box-shadow:0 4px 14px #182b3f10;}
.market-card strong {font-size:1.06rem; overflow-wrap:anywhere;}
.card-top {display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:5px;}
.market-code {font-weight:760; font-size:.82rem; color:#285472; letter-spacing:.025em;}
.card-hours {font-weight:560; font-size:.95rem; font-variant-numeric:tabular-nums;}
.market-next {font-size:.875rem; color:var(--muted);}
.panel {background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); min-width:0;}
.filters {display:flex; align-items:center; gap:10px; padding:12px;}
.search-field {flex:1 1 auto;}
.region-filter {flex:0 1 180px;}
.search-field input {width:100%;}
.table-wrap {overflow:auto; max-width:100%;}
table {border-collapse:separate; border-spacing:0; width:100%; text-align:left; font-size:.94rem;}
caption {text-align:left; color:var(--muted); padding:10px 15px; font-size:.89rem;}
th,td {padding:11px 14px; border-bottom:1px solid #e8eef4; vertical-align:middle;}
th[scope="col"] {background:#eaf0f6; color:#36526d; font-weight:680; font-size:.86rem;}
th[scope="row"] {font-weight:650;}
tbody tr:last-child>* {border-bottom:0;}
tbody tr:hover>* {background:#f5f9fc;}
tbody a {color:var(--ink); text-decoration-color:#a3b7c8;}
tbody small {display:block; font-size:.84rem; color:var(--muted); font-weight:450;}
.market-table th[scope="row"] {min-width:200px;}
.market-table td {font-variant-numeric:tabular-nums;}
.market-table td:nth-child(4) {min-width:145px; color:#425970;}
.market-name {display:flex; align-items:center; gap:9px;}
.star {width:30px; flex:0 0 30px; background:transparent; color:#496984; border:1px solid transparent; border-radius:6px; line-height:1; font-size:1.22rem; padding:5px 0;}
.star:hover {background:#e5eef7;}
.star[aria-pressed="true"] {color:#946013;}
.status {display:inline-flex; align-items:center; gap:5px; padding:3px 8px; border-radius:99px; color:#465b70; background:#edf2f7; font-size:.83rem; font-weight:680; width:fit-content;}
.status::before {content:""; width:6px; height:6px; border-radius:100%; background:currentColor; flex-shrink:0;}
.status-open {background:var(--ready-wash); color:var(--ready);}
.status-break,.status-uncertain {background:var(--waiting-wash); color:var(--waiting);}
.status-unknown {background:#f1eef8; color:#644787;}
.empty {padding:14px; color:var(--muted);}
.faq {display:grid; gap:8px;}
.faq h2 {margin-bottom:5px;}
.faq details {background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 14px;}
.faq summary {font-weight:660;}
.faq p,.prose p {margin-top:7px; max-width:78ch; color:var(--muted);}
.site-footer {margin-top:38px; border-top:1px solid var(--line); background:#fcfdff;}
.footer-inner {display:flex; gap:15px 26px; align-items:center; flex-wrap:wrap; padding-block:17px; font-size:.9rem;}
.footer-inner .brand {margin-right:auto;}
.footer-inner .brand-mark {width:27px; height:27px; border-radius:7px;}
.page-intro {padding-top:32px; padding-bottom:17px;}
.lead {font-size:1.08rem; color:var(--muted); margin-top:10px; max-width:76ch;}
.breadcrumb {display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--muted); margin-top:22px; font-size:.92rem;}
.breadcrumb+.page-intro {padding-top:14px;}
.exchange-grid {display:grid; grid-template-columns:1.6fr 1fr; gap:13px;}
.exchange-status {padding:18px;}
.exchange-state {margin-top:13px; display:flex; align-items:center; flex-wrap:wrap; gap:9px; color:var(--muted);}
.status-metrics,.result-grid {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:13px;}
.status-metrics dt,.result-grid dt,.data-grid span {font-size:.88rem; color:var(--muted);}
.status-metrics dd,.result-grid dd {margin:4px 0 0; font-weight:650;}
.data-grid {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; padding:15px;}
.data-grid div {display:grid; align-content:start; gap:4px; overflow-wrap:anywhere;}
.year-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px;}
.year-grid .muted,.panel-title {padding:13px 15px;}
.calendar-panel,.calculator,.explanation {padding:16px;}
.calendar-controls {padding:0;}
.calendar-month {display:flex; gap:12px; align-items:center; justify-content:space-between; margin-block:18px 10px;}
.month-button {width:42px; padding:0; font-size:1.25rem;}
.month-grid {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px;}
.weekday {text-align:center; color:var(--muted); font-size:.86rem;}
.day {border:1px solid #dce5ee; background:#eef4fa; min-height:38px; border-radius:7px; color:var(--ink); padding:4px; font-weight:610;}
.day:hover {background:#deedf9;}
.day-closed {background:#f6f8fa; color:#52677c;}
.day-short,.day-uncertain {background:#fff2d9; color:#7b4b14;}
.day-unknown {background:#f1eef8; color:#644787;}
.day[aria-pressed="true"] {background:#244e72; color:white; border-color:#244e72;}
.selected-day {display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:12px; padding:12px; border-radius:8px; background:#edf4fa;}
.selected-day p {color:var(--muted); font-size:.91rem;}
.highlight>* {background:#e8f3ff;}
#share-link {width:100%; margin-bottom:8px;}
.result-grid {grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:16px;}
.result-grid div {background:#eef4fa; padding:12px; border-radius:9px;}
.result-grid dd {font-size:1.66rem; font-variant-numeric:tabular-nums;}
#count-result .form-error {margin-top:12px;}
@media (max-width:960px) {
  .header-inner {gap:10px 16px; flex-wrap:wrap; padding-top:12px;}
  .main-nav {order:3; flex:0 0 100%; margin-inline:0; overflow-x:auto; padding-bottom:8px;}
  .main-nav a:first-child {margin-left:0;}
}
@media (max-width:680px) {
  .shell {width:calc(100% - 24px);}
  .hero,.exchange-grid,.year-grid {grid-template-columns:1fr;}
  .hero {margin-top:14px; gap:16px;}
  .hero h1 {text-wrap:initial;}
  .hero-clock {column-gap:14px;}
  .clock-count {margin-top:6px;}
  .controls,.calendar-controls {gap:8px;}
  .controls label:first-child,.calendar-controls label:first-child {flex-basis:100%;}
  .controls .button {flex:1 1 100%;}
  .featured-grid {grid-template-columns:1fr; gap:7px;}
  .market-card {grid-template-columns:minmax(0,1fr) minmax(80px,1fr); grid-template-rows:auto auto; gap:3px 12px; padding:10px 11px;}
  .card-top {grid-column:2; grid-row:1;}
  .market-card strong {grid-column:1; grid-row:1;}
  .market-next {text-align:right;}
  .filters {flex-wrap:wrap;}
  .search-field {flex-basis:100%;}
  .region-filter {flex:1 1 100px;}
  .table-wrap {overscroll-behavior-x:contain;}
  th,td {padding:8px 10px;}
  .market-table th[scope="row"] {min-width:145px;}
  .market-table td:nth-child(4) {min-width:120px;}
  .market-name {gap:4px;}
  .status-metrics,.data-grid {grid-template-columns:1fr;}
  .result-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .section {margin-top:23px;}
  .footer-inner {gap:10px 15px;}
}

.calendar-actions {display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px;}
.guide-summary {overflow:hidden;}
.guide-status-table th[scope="row"] {min-width:126px;}
.guide-status-table td {min-width:104px; font-variant-numeric:tabular-nums;}
.guide-exceptions {padding:10px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:.91rem;}
.guide-exceptions p + p {margin-top:5px;}
[data-next-exception]:empty {display:none;}
.guide-year {margin-bottom:10px; overflow:hidden;}
.guide-year summary {padding:13px 15px; font-weight:670;}
.guide-year .year-grid {gap:0;}
.guide-year article {min-width:0; border-top:1px solid var(--line);}
.guide-year article + article {border-inline-start:1px solid var(--line);}
@media (max-width:680px) {
  .section-head:has(.calendar-actions) {flex-wrap:wrap;}
  .calendar-actions {justify-content:flex-start;}
  .guide-year article + article {border-inline-start:0;}
}
