/* MarketsEveryDay — one stylesheet, no framework, no web fonts. */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1f29;
  --muted: #5a6475;
  --line: #dfe3ea;
  --line-strong: #c5ccd8;
  --accent: #0b5cad;
  --accent-ink: #ffffff;
  --accent-soft: #e7f0fa;
  --zebra: #f3f5f8;
  --open: #17663a;
  --open-bg: #e3f4e9;
  --closed: #a1261b;
  --closed-bg: #fbe9e7;
  --focus: #f0a500;
  --radius: 8px;
  --wrap: 960px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11151c;
    --surface: #181d26;
    --text: #e6e9ef;
    --muted: #a3acbb;
    --line: #2a313d;
    --line-strong: #3a4352;
    --accent: #7db7f5;
    --accent-ink: #0b1220;
    --accent-soft: #1d2a3b;
    --zebra: #1c222c;
    --open: #7fd6a0;
    --open-bg: #16301f;
    --closed: #ff9b8f;
    --closed-bg: #3a1d1a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  overflow-wrap: break-word;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius); z-index: 10; }
.skip-link:focus { left: 8px; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .45em; border-radius: 2px; background: var(--accent); vertical-align: .02em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; color: var(--text); font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
main { padding-top: 24px; padding-bottom: 48px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 20px 0 28px; }

/* language switcher */
.lang-switch { margin: 0 0 20px; display: inline-block; max-width: 100%; }
.lang-switch summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .9rem; list-style: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after { content: "▾"; color: var(--muted); }
.lang-switch[open] summary::after { content: "▴"; }
.lang-switch ul { margin: 8px 0 0; padding: 8px; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.lang-switch li a, .lang-current { display: block; padding: 5px 8px; border-radius: 5px; font-size: .92rem; }
.lang-switch li a { text-decoration: none; }
.lang-switch li a:hover { background: var(--accent-soft); }
.lang-current { font-weight: 700; color: var(--muted); }

/* market page */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr)); gap: 1px; margin: 16px 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts > div { background: var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 12px 14px; min-width: 0; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 6px; margin: 0 0 18px; min-width: 0; }
.block > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.sched { margin-bottom: 12px; }
.sched h3 { margin-bottom: 4px; }
.sched ul { margin: 0; padding-left: 1.2em; }
address { font-style: normal; }
.lines { line-height: 1.6; }
.contacts { margin: 0 0 12px; }
.contacts > div { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.contacts > div:first-child { border-top: 0; }
.contacts dt { color: var(--muted); }
.contacts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.map { display: block; width: 100%; height: 300px; border: 0; border-radius: var(--radius); margin: 4px 0 12px; background: var(--zebra); }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--zebra); white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--zebra); }
.kv th { width: 36%; min-width: 130px; font-weight: 600; color: var(--muted); }
.kv td { overflow-wrap: anywhere; }
.holidays { min-width: 520px; }
.holidays td:nth-child(2) { white-space: nowrap; }
.status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.status-closed { color: var(--closed); background: var(--closed-bg); }
.status-open { color: var(--open); background: var(--open-bg); }

/* MIC / currency */
.record > h2 { color: var(--muted); font-weight: 600; margin-bottom: 14px; }

/* archives */
.item-list { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.item-list a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; height: 100%; }
.item-list a:hover { border-color: var(--accent); }
.archive .item { margin: 0 0 22px; }
.archive .item h2 { margin-bottom: 8px; }
.archive .item h2 a { text-decoration: none; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 24px 0 0; }
.pager a, .pager span { min-width: 40px; padding: 7px 11px; text-align: center; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.pager .pager-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pager .pager-gap { border: 0; background: none; min-width: 0; padding: 7px 2px; color: var(--muted); }
.pager a:hover { border-color: var(--accent); }

/* prose */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.4em; }
.notfound { padding: 32px 0; }

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .block { padding: 14px 12px 4px; }
  .contacts > div { grid-template-columns: 1fr; gap: 0; }
  th, td { padding: 8px 10px; }
}
@media print {
  .site-header nav, .lang-switch, .pager, .map, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
