:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  --ink: #173c56;
  --text: #263e4f;
  --muted: #5b6c78;
  --line: #dbe3e8;
  --blue: #1c5f83;
  --pale: #edf4f7;
  --gold: #f8c766;
  --white: #fff;
  --canvas: #f5f6f8;
  --radius: 8px;
  --motion-fast: 150ms;
}

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

body {
  margin: 0;
  min-width: 0;
  background: var(--canvas);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

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

h1,
h2,
h3 {
  color: var(--ink);
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--motion-fast) ease;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a,
input,
select,
summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}

:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--white);
}

:where(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: 44px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .5;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 16px;
  padding: 12px 16px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: calc(100% - 80px);
  max-width: 1180px;
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.9px;
}

.brand > svg,
.brand > img,
.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
}

.brand small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .6px;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a,
.main-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.main-nav .site-home-link {
  flex: none;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: var(--blue);
  font-weight: 600;
}

.main-nav .site-home-link span[aria-hidden="true"] {
  margin-right: 2px;
}

.main-nav [aria-current="page"] {
  border-bottom-color: var(--blue);
  color: var(--ink);
  font-weight: 650;
}

.preview-badge {
  flex: none;
  padding: 4px 9px;
  border: 1px solid #e4c68d;
  border-radius: 4px;
  background: #fff3dc;
  color: #6b511e;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: color var(--motion-fast) ease, background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.primary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.secondary-button {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.text-button {
  min-height: 40px;
  padding: 8px 2px;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}

.icon-button {
  width: 44px;
  flex: none;
  padding: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 23px;
  line-height: 1;
}

.primary-button svg,
.secondary-button svg,
.text-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-block: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-links a,
.footer-links .text-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-block: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

@media (hover: hover) {
  a:hover {
    color: var(--ink);
  }

  .main-nav a:hover,
  .main-nav button:hover:not(:disabled) {
    background: var(--pale);
    color: var(--ink);
  }

  .primary-button:hover:not(:disabled) {
    border-color: var(--blue);
    background: var(--blue);
    color: var(--white);
  }

  .secondary-button:hover:not(:disabled),
  .icon-button:hover:not(:disabled) {
    border-color: var(--line);
    background: var(--pale);
    color: var(--ink);
  }

  .text-button:hover:not(:disabled) {
    color: var(--ink);
    text-decoration: underline;
  }
}

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .site-header {
    gap: 16px;
  }

  .main-nav a,
  .main-nav button {
    padding-inline: 12px;
  }

  .site-footer {
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .site-header {
    flex-wrap: wrap;
    gap: 8px 12px;
    min-height: 0;
    padding-top: 12px;
  }

  .site-header .brand {
    order: 1;
    font-size: 23px;
  }

  .site-header .preview-badge {
    order: 2;
    margin-left: auto;
  }

  .site-header .main-nav {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 0;
  }

  .main-nav a,
  .main-nav button {
    flex: 1;
    min-width: 0;
    padding: 11px 8px;
    font-size: 13px;
  }

  /* Keep the return link in the existing navigation row on narrow screens. */
  .site-header .main-nav .site-home-link {
    flex: 0 0 auto;
    margin-left: 2px;
    padding-inline: 8px 4px;
    font-size: 12px;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
    padding-block: 22px;
  }

  .footer-links {
    gap: 2px 16px;
  }
}

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

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .wrap {
    width: 100%;
    max-width: none;
  }

  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }
}
