
/* OpenWorkdays: one stylesheet for the whole site. No framework. */

:root {
  --paper: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eceeea;
  --ink: #16201b;
  --ink-2: #46524b;
  --muted: #6b766f;
  --line: #dde2dc;
  --line-2: #c5ccc4;
  --accent: #1f6f52;
  --accent-ink: #ffffff;
  --accent-soft: #e1f0e8;
  --holiday: #d2492e;
  --holiday-soft: #fbe6e0;
  --weekend: #7f8b93;
  --weekend-soft: #ebeff1;
  --bridge: #b8811f;
  --bridge-soft: #fbefd6;
  --focus: #1f6f52;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(22, 32, 27, .05), 0 10px 28px -14px rgba(22, 32, 27, .18);
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101412;
    --surface: #171d1a;
    --surface-2: #1f2723;
    --ink: #e6ebe6;
    --ink-2: #b4bfb7;
    --muted: #8a968e;
    --line: #29332d;
    --line-2: #38443d;
    --accent: #52b98c;
    --accent-ink: #0d1a13;
    --accent-soft: #163326;
    --holiday: #f2856b;
    --holiday-soft: #3b201a;
    --weekend: #97a3aa;
    --weekend-soft: #212a2e;
    --bridge: #e2ab4c;
    --bridge-soft: #3a2d14;
    --focus: #52b98c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
--paper: #101412;
  --surface: #171d1a;
  --surface-2: #1f2723;
  --ink: #e6ebe6;
  --ink-2: #b4bfb7;
  --muted: #8a968e;
  --line: #29332d;
  --line-2: #38443d;
  --accent: #52b98c;
  --accent-ink: #0d1a13;
  --accent-soft: #163326;
  --holiday: #f2856b;
  --holiday-soft: #3b201a;
  --weekend: #97a3aa;
  --weekend-soft: #212a2e;
  --bridge: #e2ab4c;
  --bridge-soft: #3a2d14;
  --focus: #52b98c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.8rem); margin-top: 2.2em; }
h3 { font-size: 1.1rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.2) blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; }
.brand span b { color: var(--accent); font-weight: 600; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
@media (max-width: 640px) { .site-header .wrap { padding-top: 8px; padding-bottom: 6px; } .nav { width: 100%; justify-content: space-between; margin-left: -8px; } .nav a { padding: 6px 8px; font-size: .9rem; } }

/* Hero */
.hero { padding: 56px 0 28px; }
.hero h1 { max-width: 20ch; }
.hero .lead { margin-bottom: 1.6rem; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; margin-bottom: 12px; }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.holiday b { color: var(--holiday); }
.stat.working b { color: var(--accent); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.small { padding: 6px 10px; font-size: .85rem; }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type="date"], input[type="number"], select, input[type="search"], input[type="text"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; min-height: 42px;
}
input:focus, select:focus { border-color: var(--accent); }
.field { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .9rem; color: var(--ink-2); }
.check input { width: auto; min-height: 0; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.segmented button { font: inherit; font-weight: 600; font-size: .9rem; background: var(--surface); color: var(--ink-2); border: 0; padding: 8px 14px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* Calculator result */
.result { margin-top: 18px; padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid transparent; }
.result .big { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.result .big small { font-family: var(--font-body); font-size: 1rem; font-weight: 500; color: var(--ink-2); margin-left: 8px; }
.result ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .95rem; }
.result.warn { background: var(--bridge-soft); }
.result .excluded { margin-top: 10px; font-size: .9rem; }
.result .excluded li { margin: 2px 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.weekend td { color: var(--muted); }
tr.total td { font-weight: 600; background: var(--surface-2); }
.date-cell { white-space: nowrap; font-weight: 600; }
.weekday-cell { color: var(--muted); white-space: nowrap; }

/* Tags */
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.tag.observed { background: var(--weekend-soft); color: var(--weekend); }
.tag.estimated { background: var(--bridge-soft); color: var(--bridge); }
.tag.weekend { background: var(--weekend-soft); color: var(--weekend); }
.tag.holiday { background: var(--holiday-soft); color: var(--holiday); }
.tag.bridge { background: var(--bridge-soft); color: var(--bridge); }

/* Notes and callouts */
.note { border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 18px 0; color: var(--ink-2); }
.note.warn { border-left-color: var(--bridge); }
.note.holiday { border-left-color: var(--holiday); }
.cite { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px 16px; font-size: .95rem; }
.cite b { font-weight: 600; }

/* Lists of links */
.year-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.year-links a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 500; font-size: .9rem; }
.year-links a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.year-links a:hover { border-color: var(--accent); }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; margin: 14px 0; }
.country-grid a { display: flex; justify-content: space-between; gap: 10px; text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; }
.country-grid a:hover { background: var(--surface); border-color: var(--line); }
.country-grid a span { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.letter { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--muted); margin: 26px 0 4px; }
.featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.featured a { text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: block; }
.featured a:hover { border-color: var(--accent); }
.featured b { display: block; font-weight: 600; }
.featured span { color: var(--muted); font-size: .85rem; }

/* Long weekends list */
.breaks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.breaks li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: baseline; }
.breaks .days { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent); font-weight: 700; white-space: nowrap; }
.breaks .bridge .days { color: var(--bridge); }
.breaks .when { font-weight: 600; }
.breaks .why { grid-column: 2; color: var(--muted); font-size: .9rem; }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.site-footer a { color: var(--ink-2); }
.site-footer h4 { margin: 0 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 4px 0; }

/* Breadcrumbs */
.crumbs { font-size: .85rem; color: var(--muted); margin: 22px 0 8px; }
.crumbs a { color: var(--ink-2); }
.crumbs span { margin: 0 6px; }

/* Home calculator box */
.calc-box { margin: 8px 0 32px; }
.calc-box .form-row { grid-template-columns: 2fr 1fr 1fr auto; }
@media (max-width: 720px) { .calc-box .form-row { grid-template-columns: 1fr 1fr; } }
.next-holiday { display: flex; gap: 12px; align-items: center; background: var(--holiday-soft); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0 6px; }
.next-holiday b { color: var(--holiday); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 8px 0 16px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.legend .h i { background: var(--holiday); }
.legend .w i { background: var(--weekend); }
.legend .b i { background: var(--bridge); }

/* Compact month calendar strip */
.month-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 10px; }
.month h4 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
.month h4 b { color: var(--accent); font-variant-numeric: tabular-nums; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.days i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.days i.w { background: var(--weekend-soft); }
.days i.h { background: var(--holiday); }
.days i.b { background: var(--bridge); opacity: .55; }
.days i.e { background: transparent; }

.faq dt { font-weight: 600; margin-top: 16px; }
.faq dd { margin: 4px 0 0; color: var(--ink-2); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { .site-header, .site-footer, .calc-box, .btn { display: none; } body { background: #fff; color: #000; } }
