/* ============================================================
   Coding Hours — HorizonX tokens, light civic palette
   Primary #0150A6 · Accent #2FB3D1
   ============================================================ */

:root {
  --background: #f3f7fb;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-hover: #eef5fb;
  --foreground: #0f172a;
  --navy: #0f172a;
  --muted: #5b6b80;
  --muted-strong: #334155;
  --border: rgba(1, 80, 166, 0.12);
  --border-strong: rgba(1, 80, 166, 0.28);
  --primary: #0150a6;
  --primary-dark: #013f85;
  --primary-soft: rgba(1, 80, 166, 0.08);
  --accent: #2fb3d1;
  --accent-soft: rgba(47, 179, 209, 0.14);
  --ink: #1e293b;
  --paper: #f3f7fb;
  --section: #eef4fa;
  --card: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --success: #16a34a;
  --warning: #f59e0b;
  --error: #dc2626;
  --header: #ffffff;
  --header-ink: #0f172a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 18px 40px rgba(1, 80, 166, 0.08);
  --container-max: 1120px;
  --font: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(1200px 420px at 8% -10%, rgba(47, 179, 209, 0.16), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgba(1, 80, 166, 0.1), transparent 50%),
    var(--background);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); transition: color 180ms var(--ease); }
a:hover { color: var(--primary-dark); }
.skip {
  position: absolute; left: -999px; top: 0;
}
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.wrap { width: min(var(--container-max), calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  color: var(--header-ink);
  border-top: 4px solid #0150A6;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo {
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, #0150A6, #2FB3D1);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 4px; }
.nav a {
  color: var(--muted-strong);
  text-decoration: none;
  font-weight: 650;
  font-size: .94rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--primary); background: var(--primary-soft); }
.nav a[aria-current="page"] {
  color: var(--primary);
  text-decoration: none;
  border-bottom-color: #0150A6;
  background: transparent;
}
.nav-toggle {
  display: none;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0 0; color: var(--muted); font-size: .92rem; }
.crumbs a { color: var(--primary); text-decoration: none; }
.hero { padding: 36px 0 18px; }
.kicker {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  color: #0150A6;
  font-weight: 800;
  margin: 0 0 10px;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; color: var(--navy); letter-spacing: -0.02em; }
h1 { font-size: clamp(1.85rem, 4vw, 2.75rem); margin: 0 0 12px; }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 44rem; margin: 0; }
.card, .checker {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.checker {
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}
.checker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #0150A6, #2FB3D1);
}
.checker header h2 { margin: 0 0 6px; }
.checker header p { margin: 0; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
label { display: grid; gap: 6px; font-weight: 700; margin: 10px 0; color: var(--navy); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--primary-dark);
  background: var(--primary); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: background 180ms var(--ease), transform 160ms var(--ease), box-shadow 180ms var(--ease);
}
.btn:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 8px 18px rgba(1, 80, 166, 0.22); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.error { color: var(--error); font-weight: 700; min-height: 1.2em; }
.result { margin-top: 16px; padding: 16px; border-radius: var(--radius-md); }
.result.active { background: #fef2f2; border: 1px solid #fecaca; }
.result.window { background: #fffbeb; border: 1px solid #fde68a; }
.result.free, .result.none { background: #f0fdf4; border: 1px solid #bbf7d0; }
.result.hold { background: var(--section); border: 1px solid var(--line); }
.week { list-style: none; padding: 0; display: grid; gap: 8px; }
.week li {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.week li.today { border-color: var(--primary); background: var(--primary-soft); }
.chips {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li { list-style: none; list-style-type: none; margin: 0; padding: 0; }
.chips li::marker { content: none; }
.chips li::before,
.chips li::after { content: none; display: none; }
.chips a {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--primary);
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.chips a:hover { color: var(--primary-dark); border-color: var(--primary); background: var(--primary-soft); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cards .card h3 { margin-top: 0; }
.cards .card h3 a { text-decoration: none; }
.cards .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-medium); }
.articles { padding: 8px 0 28px; }
.prose { padding: 24px 0; max-width: 48rem; }
.prose a { color: var(--primary); }
.prose a:hover { color: var(--primary-dark); }
.prose h2, .prose h3, .prose h4 { color: var(--navy); }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.prose blockquote {
  margin: 0 0 1rem;
  padding: 8px 14px;
  border-left: 4px solid var(--primary);
  color: var(--muted);
  background: #fff;
}
.prose img { display: block; max-width: 100%; height: auto; margin: 0 0 1rem; border-radius: var(--radius-sm); }
.note {
  background: var(--surface);
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 0 0 28px;
  box-shadow: var(--shadow-soft);
}
.featured-image { display: block; width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-md); margin: 0 0 1.2rem; border: 1px solid var(--line); }
.site-footer {
  margin-top: 48px;
  background: #ffffff;
  color: var(--navy);
  padding: 36px 0 22px;
  border-top: 1px solid var(--border);
  border-bottom: 4px solid #0150A6;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; }
.site-footer a { color: var(--muted-strong); display: block; margin: 4px 0; text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.site-footer .logo { margin: 0 0 8px; }
.tiny { opacity: .75; color: var(--muted); }
.stack { line-height: 1.8; }
.faqs { padding: 8px 0 16px; }
.faqs .faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 0 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.faq-heading { margin: 0; font-size: 1rem; font-family: inherit; }
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: background 180ms var(--ease);
}
.faq-trigger:hover { background: var(--surface-hover); }
.faq-q { overflow-wrap: anywhere; }
.faq-icon {
  color: #2FB3D1;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  font-weight: 500;
}
.faq-item.is-open .faq-icon { color: #2FB3D1; }
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s var(--ease);
}
.faq-item.is-open .faq-panel { grid-template-rows: 1fr; }
.faq-a {
  overflow: hidden;
  min-height: 0;
  padding: 0 16px;
  color: var(--ink);
}
.faq-item.is-open .faq-a { padding-bottom: 14px; }
.home-article { padding: 20px 0 28px; }
.home-article h2 { border-left: 4px solid #0150A6; padding-left: 12px; margin: 2rem 0 .8rem; }
.home-article h3 { margin: 1.4rem 0 .6rem; }
.home-article p { margin: 0 0 1rem; }
.home-article a { color: var(--primary); }
.home-article a:hover { color: var(--primary-dark); }
.home-article .note { margin: 1rem 0; }
.home-article ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.home-article ul li { position: relative; padding: 4px 0 4px 1.35rem; }
.home-article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: .55em;
  height: .55em;
  border-radius: 50%;
  background: #2FB3D1;
}
.home-article ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.home-article ol li { margin: 4px 0; }
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
.home-article table { width: 100%; border-collapse: collapse; min-width: 520px; background: var(--card); }
.home-article th, .home-article td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.home-article th { background: #0150A6; color: #fff; font-weight: 700; }
.status-pill {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--navy);
  font-weight: 700;
  font-size: .85rem;
}
.facts, .updates { padding: 8px 0 24px; }
.fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.fact-card { text-align: center; }
.fact-value { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 0; }
.fact-label { margin: 4px 0; font-weight: 700; }
.fact-source { font-size: .8rem; color: var(--muted); margin: 0; }
.update-body { margin-top: 8px; }
.content-button-wrap { margin: 0 0 1rem; max-width: 100%; }
.prose .content-button, .home-article .content-button, .wysiwyg .content-button {
  display: inline-block;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.prose .content-button:hover, .home-article .content-button:hover { filter: brightness(.95); color: inherit; }
.prose figure, .home-article figure { margin: 0 0 1rem; max-width: 100%; }
.prose figcaption, .home-article figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.prose img, .home-article img { max-width: 100%; height: auto; }

@media (max-width: 800px) {
  .grid3, .footer-grid, .week li { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; }
  .nav.open { display: flex; flex-direction: column; }
  .header-inner { flex-wrap: wrap; }
  .btn { width: 100%; }
  .home-article h2 { font-size: 1.25rem; }
  .featured-image { max-height: 240px; }
  input, select, textarea, .btn { max-width: 100%; }
  .home-article table { min-width: 480px; }
  .hero { padding: 24px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
