:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-muted: #eef2f4;
  --text: #1f2933;
  --muted: #5f6973;
  --subtle: #7b8490;
  --border: #d7dde2;
  --border-strong: #b9c3cb;
  --accent: #234d5d;
  --accent-dark: #173743;
  --accent-soft: #e4eef0;
  --link: #184f67;
  --max-width: 1120px;
  --content-width: 760px;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

p {
  margin-bottom: 1rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: #ffffff;
  padding: 0.55rem 0.8rem;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.container.narrow {
  width: min(100% - 2rem, var(--content-width));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(221, 216, 206, 0.86);
  background: rgba(246, 244, 241, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.brand-name {
  font-size: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a:focus,
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-lines::before {
  top: -6px;
}

.nav-toggle-lines::after {
  top: 6px;
}

.hero {
  padding: 7rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 4rem;
  align-items: end;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 1rem;
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 560px;
  margin-bottom: 1.55rem;
  color: var(--text);
  font-size: clamp(1.24rem, 2vw, 1.72rem);
  line-height: 1.35;
}

.hero-description,
.page-header p,
.prose p {
  color: var(--muted);
  font-size: 1.04rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button-row.compact {
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.68rem 1rem;
  font-weight: 750;
  line-height: 1.1;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus {
  background: var(--accent-dark);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--accent-dark);
}

.button-secondary:hover,
.button-secondary:focus {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.text-link {
  color: var(--link);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.signal-panel {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signal-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  padding: 1.15rem;
}

.signal-item + .signal-item {
  border-top: 1px solid var(--border);
}

.signal-item span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.signal-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.section {
  padding: 4.25rem 0;
}

.section-border {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.44);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 3rem;
}

h2 {
  margin-bottom: 0.75rem;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  line-height: 1.3;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.55rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.page-header {
  padding: 5.5rem 0 3.5rem;
}

.page-header h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
}

.page-header p {
  max-width: 680px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-button {
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 0.54rem 0.85rem;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.filter-button:hover,
.filter-button:focus,
.filter-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.post-grid,
.post-list {
  display: grid;
  gap: 1rem;
}

.post-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card,
.empty-card,
.info-card,
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(31, 41, 51, 0.05);
}

.post-card {
  display: block;
  padding: 1.25rem;
}

.post-card:hover,
.post-card:focus {
  border-color: var(--accent);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.75rem;
  color: var(--subtle);
  font-size: 0.84rem;
}

.post-category {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--accent-dark);
  padding: 0.16rem 0.45rem;
  font-weight: 760;
}

.post-card h2,
.post-card h3 {
  margin-bottom: 0.45rem;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.38rem;
}

.post-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.empty-card {
  padding: 1.25rem;
}

.empty-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.manual-list {
  display: grid;
  gap: 1rem;
}

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

.info-card {
  padding: 1.25rem;
}

.info-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.24rem;
}

.info-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-card {
  margin-top: 1.5rem;
  padding: 1.4rem;
}

.contact-card p {
  margin-bottom: 0.35rem;
}

.contact-card a {
  color: var(--link);
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--surface-muted);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-copy {
  display: grid;
  gap: 0.2rem;
}

.footer-copy p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--link);
  font-weight: 740;
}

.footer-links a:hover,
.footer-links a:focus {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

:focus-visible {
  outline: 3px solid rgba(35, 77, 93, 0.42);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .hero {
    padding-top: 5rem;
  }

  .hero-grid,
  .split-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .signal-panel {
    max-width: 560px;
  }

  .post-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container,
  .container.narrow {
    width: min(100% - 1.25rem, var(--max-width));
  }

  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: 64px;
    right: 0.625rem;
    left: 0.625rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 0.45rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    border-bottom: 0;
    border-radius: var(--radius);
    padding: 0.75rem;
  }

  .nav a:hover,
  .nav a:focus,
  .nav a[aria-current="page"] {
    background: var(--accent-soft);
  }

  .hero {
    padding: 4rem 0 3.25rem;
  }

  h1 {
    font-size: clamp(2.75rem, 18vw, 4.15rem);
  }

  .page-header {
    padding: 4rem 0 2.75rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading .text-link {
    display: inline-flex;
    margin-top: 0.75rem;
  }

  .signal-item {
    grid-template-columns: 38px 1fr;
    gap: 0.8rem;
    padding: 1rem;
  }

  .hero .signal-panel {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
