@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../vendor/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../vendor/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../vendor/fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../../vendor/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../vendor/fonts/source-serif-4-latin-700-normal.woff2") format("woff2");
}

:root,
[data-theme="light"] {
  --sh-bg: #f7f3eb;
  --sh-bg-elevated: #fffdf8;
  --sh-surface: #fffaf2;
  --sh-text: #1f2420;
  --sh-muted: #5a635c;
  --sh-border: #d9d0c2;
  --sh-accent: #0f6a5a;
  --sh-accent-contrast: #f4fffb;
  --sh-accent-soft: #d8efe9;
  --sh-danger: #9b2c2c;
  --sh-focus: #0f6a5a;
  --sh-hero-wash: linear-gradient(165deg, #f7f3eb 0%, #ebe4d6 45%, #e2f0eb 100%);
}

[data-theme="dark"] {
  --sh-bg: #1c1f1d;
  --sh-bg-elevated: #262a27;
  --sh-surface: #2c322e;
  --sh-text: #eef2ef;
  --sh-muted: #a8b2ab;
  --sh-border: #3d4540;
  --sh-accent: #3cb89f;
  --sh-accent-contrast: #06241e;
  --sh-accent-soft: #1e3d36;
  --sh-danger: #f0a0a0;
  --sh-focus: #3cb89f;
  --sh-hero-wash: linear-gradient(165deg, #1c1f1d 0%, #232826 50%, #1a2c28 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background: var(--sh-bg);
  color: var(--sh-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
.brand-wordmark {
  font-family: "Source Serif 4", Georgia, serif;
}

a {
  color: var(--sh-accent);
}

a:hover {
  color: var(--sh-text);
}

:focus-visible {
  outline: 3px solid var(--sh-focus);
  outline-offset: 2px;
}

.site-navbar {
  background: color-mix(in srgb, var(--sh-bg-elevated) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sh-border);
}

.brand-wordmark {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sh-text) !important;
  font-size: 1.15rem;
}

.nav-link {
  color: var(--sh-muted) !important;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sh-text) !important;
}

.nav-link.active {
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

.theme-toggle {
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  color: var(--sh-text);
  border-radius: 0.5rem;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-accent {
  background: var(--sh-accent);
  border-color: var(--sh-accent);
  color: var(--sh-accent-contrast);
  font-weight: 600;
}

.btn-accent:hover,
.btn-accent:focus {
  filter: brightness(0.95);
  color: var(--sh-accent-contrast);
}

.btn-outline-accent {
  border: 1px solid var(--sh-accent);
  color: var(--sh-accent);
  background: transparent;
  font-weight: 600;
}

.btn-outline-accent:hover {
  background: var(--sh-accent-soft);
  color: var(--sh-text);
}

main {
  flex: 1 0 auto;
}

.page-shell {
  background: var(--sh-hero-wash);
}

.calc-panel,
.content-panel,
.results-panel {
  background: var(--sh-bg-elevated);
  border: 1px solid var(--sh-border);
  border-radius: 1rem;
  padding: 1.25rem;
}

.calc-panel {
  box-shadow: 0 10px 30px color-mix(in srgb, var(--sh-text) 6%, transparent);
}

.form-label {
  font-weight: 600;
  color: var(--sh-text);
}

.form-control,
.form-select {
  background: var(--sh-surface);
  border-color: var(--sh-border);
  color: var(--sh-text);
}

.form-control:focus,
.form-select:focus {
  background: var(--sh-surface);
  color: var(--sh-text);
  border-color: var(--sh-accent);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--sh-accent) 25%, transparent);
}

.muted {
  color: var(--sh-muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-tile {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: 0.75rem;
  padding: 0.85rem;
}

.stat-tile .label {
  display: block;
  font-size: 0.8rem;
  color: var(--sh-muted);
  font-weight: 600;
}

.stat-tile .value {
  font-size: 1.15rem;
  font-weight: 700;
}

.shift-row {
  border: 1px solid var(--sh-border);
  border-radius: 0.75rem;
  padding: 0.85rem;
  background: var(--sh-surface);
  margin-bottom: 0.75rem;
}

.site-footer {
  border-top: 1px solid var(--sh-border);
  background: var(--sh-bg-elevated);
  color: var(--sh-muted);
  padding: 2rem 0;
  margin-top: 2rem;
}

.site-footer a {
  color: var(--sh-text);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--sh-accent);
  text-decoration: underline;
}

.prose h2,
.prose h3 {
  margin-top: 1.5rem;
}

.prose p,
.prose li {
  line-height: 1.65;
}

.faq-item {
  border-bottom: 1px solid var(--sh-border);
  padding: 1rem 0;
}

.alert-tool {
  background: var(--sh-accent-soft);
  border: 1px solid var(--sh-border);
  color: var(--sh-text);
  border-radius: 0.75rem;
}

.badge-preset {
  background: var(--sh-accent-soft);
  color: var(--sh-text);
  font-weight: 600;
}

.admin-shell {
  background: var(--sh-bg);
  min-height: 100vh;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--sh-text);
  --bs-table-border-color: var(--sh-border);
  --bs-table-striped-bg: var(--sh-surface);
  --bs-table-hover-bg: var(--sh-accent-soft);
}

.navbar-toggler {
  border-color: var(--sh-border);
}

.navbar-toggler-icon {
  filter: invert(0.35);
}

[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(0.9);
}

.empty-state {
  border: 1px dashed var(--sh-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--sh-muted);
}

.blog-card {
  display: block;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--sh-border);
  text-decoration: none;
  color: inherit;
}

.blog-card:hover h2 {
  color: var(--sh-accent);
}

@media (max-width: 767.98px) {
  .calc-first {
    order: -1;
  }
}
