/* =========================
   KDAK Editorial Theme
   ========================= */

/* File map:
   1. Base tokens and resets
   2. Header / nav
   3. Shared page modules
   4. Portal form
   5. Footer
   6. Dark theme overrides
   7. Responsive adjustments */

:root {
  color-scheme: light;

  --bg: #FEFBF7;
  --surface: #fffdfb;
  --surface-strong: #fbf6ef;
  --surface-accent: #f4ece1;
  --border: rgba(42, 63, 89, 0.12);
  --border-strong: rgba(42, 63, 89, 0.18);
  --rule-accent: rgba(165, 114, 63, 0.64);
  --rule-line: rgba(42, 63, 89, 0.16);
  --rule-line-soft: rgba(42, 63, 89, 0.05);

  --text: #1b2d43;
  --muted: #5e6a7a;
  --accent: #a5723f;
  --accent-deep: #213854;
  --heading: #2A3F59;
  --heading-soft: #4b6078;
  --brand-ink: #2f4a68;
  --accent-soft: rgba(165, 114, 63, 0.16);
  --accent-soft-strong: rgba(42, 63, 89, 0.08);
  --portal-surface: linear-gradient(180deg, rgba(255, 253, 251, 0.86) 0%, rgba(251, 246, 239, 0.64) 100%);
  --portal-field: rgba(255, 253, 251, 0.88);
  --portal-shadow: 0 16px 38px rgba(42, 63, 89, 0.07);

  --font-sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;

  --radius-sm: 16px;
  --radius: 24px;
  --radius-lg: 30px;
  --container: 1160px;
  --module-max: 60rem;
  --prose-max: 62rem;
  --pad: 1.35rem;

  --shadow-sm: 0 14px 34px rgba(42, 63, 89, 0.08);
  --shadow: 0 26px 70px rgba(42, 63, 89, 0.12);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before,
body::after {
  content: none;
}

::selection {
  background: rgba(165, 114, 63, 0.2);
}

a {
  color: var(--accent-deep);
  text-decoration-color: rgba(42, 63, 89, 0.35);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: rgba(165, 114, 63, 0.65);
}

a:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 12px;
}

p,
ul,
ol {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 2 * var(--pad)));
  margin: 0 auto;
}

.page {
  padding: 2.5rem 0 4.5rem;
}

.page-content {
  display: grid;
  gap: 0;
}

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

.small {
  font-size: 0.94rem;
}

.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;
}

.site-shell {
  position: relative;
}

.site-shell > * {
  position: relative;
  z-index: 1;
}

.theme-dark {
  color-scheme: dark;
  --bg: #091018;
  --surface: #121b25;
  --surface-strong: #17222d;
  --surface-accent: #1b2733;
  --border: rgba(229, 236, 244, 0.1);
  --border-strong: rgba(229, 236, 244, 0.18);
  --rule-accent: rgba(199, 154, 104, 0.74);
  --rule-line: rgba(229, 236, 244, 0.18);
  --rule-line-soft: rgba(229, 236, 244, 0.05);
  --text: #e7edf4;
  --muted: #97a6b8;
  --accent: #c79a68;
  --accent-deep: #f4f7fb;
  --heading: #f0f4f8;
  --heading-soft: #d8e1ea;
  --brand-ink: #e7edf4;
  --accent-soft: rgba(199, 154, 104, 0.18);
  --accent-soft-strong: rgba(230, 236, 243, 0.08);
}

/* =========================
   Header / Navbar
   ========================= */

.site-header {
  position: relative;
  z-index: 10;
  padding-top: 1rem;
}

.site-header .container {
  width: min(calc(var(--container) + 0.9rem), calc(100% - 2 * var(--pad)));
}

.site-footer .container {
  width: min(calc(var(--container) + 0.9rem), calc(100% - 2 * var(--pad)));
}

.header-inner {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 1.5rem;
  padding: 0.55rem 0 0.9rem;
  border-bottom: 1px solid var(--border-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin-left: -0.2rem;
  color: inherit;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}


.brand-title {
  font-family: var(--font-sans);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand-ink);
  white-space: nowrap;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 1.35rem;
  padding: 0;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  text-decoration: none;
}

.nav-link.active,
.nav-link[aria-current='page'] {
  color: var(--accent-deep);
  font-weight: 600;
}

.nav-link.active::after,
.nav-link[aria-current='page']::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.65rem;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.theme-toggle,
.portal-link {
  padding: 0.65rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 253, 250, 0.75);
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: none;
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover,
.portal-link:hover {
  background: rgba(42, 63, 89, 0.04);
  box-shadow: none;
  transform: none;
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.portal-link,
.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #fffdfb 0%, #fbf6ef 100%);
  color: var(--accent-deep);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}

.cta-link {
  padding: 0.62rem 0.9rem;
}

.portal-link {
  padding: 0.62rem 0.9rem;
  border-radius: 10px;
  border-color: rgba(42, 63, 89, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(251, 246, 239, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 1px 2px rgba(42, 63, 89, 0.05);
  transition:
    color 0.16s ease,
    text-decoration-color 0.16s ease,
    background-color 0.16s ease;
}

.portal-link:hover,
.cta-link:hover {
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, #fdf8f1 0%, #f6ede2 100%);
  transform: none;
  box-shadow: none;
}

.portal-link:hover {
  border-color: rgba(42, 63, 89, 0.22);
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.98) 0%, rgba(248, 240, 230, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 1px 2px rgba(42, 63, 89, 0.06);
}

/* =========================
   Page Modules
   ========================= */

.hero,
.section,
.prose {
  width: min(100%, var(--module-max));
  margin-inline: auto;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero {
  position: relative;
  padding: 1.3rem 0 1.2rem;
}

.hero::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 1.6rem;
  background: linear-gradient(90deg, var(--rule-accent) 0%, var(--rule-line) 18%, var(--rule-line-soft) 100%);
}

.hero h1,
.prose h1,
.section h2 {
  font-family: var(--font-sans);
  color: var(--heading);
  letter-spacing: -0.02em;
}

.hero h1 {
  margin: 0 0 0.85rem;
  max-width: none;
  font-size: clamp(1.65rem, 2.35vw, 2.2rem);
  line-height: 1.1;
}

.hero--wide-title h1 {
  max-width: none;
  white-space: normal;
  font-size: clamp(1.65rem, 2.35vw, 2.2rem);
}

.hero p {
  margin-top: 0.65rem;
  max-width: 54rem;
  font-size: 1rem;
}

.hero .muted {
  color: var(--muted);
  font-weight: 400;
}

.hero-service-area {
  color: #946843;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section {
  position: relative;
  padding: 2rem 0 0;
}

.section::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-bottom: 1.3rem;
  background: linear-gradient(90deg, var(--rule-line) 0%, var(--rule-line) 42%, var(--rule-line-soft) 100%);
}

.hero + .section {
  padding-top: 1.3rem;
}

.hero + .section::before {
  content: none;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.12rem, 1.45vw, 1.3rem);
  line-height: 1.2;
}

.section > :not(h2) {
  margin-left: 0.65rem;
}

.section h3 {
  margin: 1.2rem 0 0.55rem;
  color: var(--heading-soft);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.section p + p,
.prose p + p {
  margin-top: 0.85rem;
}

.section p,
.prose p {
  max-width: 56rem;
}

.section ul,
.section ol,
.prose ul,
.prose ol {
  display: block;
  margin-top: 1rem;
  margin-left: 0.85rem;
  max-width: 54rem;
}

.section ul,
.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.section ul li,
.prose ul li {
  padding-left: 0;
  margin: 0.45rem 0;
}

.section ul.tenant-services-list {
  margin-left: 1.2rem;
}

.section ol,
.prose ol {
  list-style: decimal;
  padding-left: 1.4rem;
}

.section ol li,
.prose ol li {
  padding-left: 0;
  margin: 0.45rem 0;
}

.availability-status {
  display: inline-block;
  width: fit-content;
  max-width: min(100%, 56rem);
  margin-top: 0.7rem;
  margin-left: 0.65rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(245, 243, 239, 0.96) 0%,
    rgba(252, 249, 246, 0.99) 100%
  );
  border-color: rgba(42, 63, 89, 0.14);
  color: rgba(27, 45, 67, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 1px rgba(27, 45, 67, 0.04),
    0 4px 12px rgba(27, 45, 67, 0.05);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.hero .availability-status,
.section .availability-status {
  max-width: min(100%, 56rem);
  margin-top: 0.7rem;
  font-size: 0.95rem;
}

.portal-shell {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0;
  width: min(100%, var(--module-max));
  margin-inline: auto;
}

.portal-page {
  gap: 1.2rem;
}

.portal-panel {
  width: min(100%, 30rem);
  text-align: left;
}

.portal-panel.section > *,
.portal-help.section > * {
  margin-left: 0;
}

.portal-panel.section {
  padding: 1.65rem 1.5rem 1.5rem;
  background: var(--portal-surface);
  border: 1px solid rgba(42, 63, 89, 0.1);
  border-radius: 12px;
  box-shadow: var(--portal-shadow);
}

.portal-panel.section::before {
  content: none;
}

.portal-panel h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.portal-panel > .muted {
  margin-top: 0;
}

.portal-form {
  margin-top: 1.25rem;
}

.portal-help {
  width: min(100%, 30rem);
  margin: 0 auto;
}

.form-row + .form-row {
  margin-top: 0.95rem;
}

.form-label {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--portal-field);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.form-input:focus {
  outline: none;
  border-color: rgba(42, 63, 89, 0.3);
  box-shadow: 0 0 0 3px rgba(42, 63, 89, 0.08);
}

.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px #fffdfb inset;
  transition: background-color 9999s ease-out 0s;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.form-actions {
  margin-top: 1rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #1b2d43;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button-primary:hover {
  background: #2A3F59;
}

.button-primary:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.alert-error {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(136, 54, 54, 0.22);
  border-radius: 8px;
  background: #fbf1f1;
  color: #7b2f2f;
}

.prose {
  width: min(100%, var(--prose-max));
  padding: 0.3rem 0 0;
}

.prose h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  line-height: 1.15;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  padding-top: 0;
  color: var(--heading);
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 1.35vw, 1.26rem);
  line-height: 1.2;
}

.prose h2::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin: 0 0 1rem;
  background: linear-gradient(90deg, var(--rule-line) 0%, var(--rule-line) 42%, var(--rule-line-soft) 100%);
}

.prose > :first-child {
  margin-top: 0;
}

/* =========================
   Footer
   ========================= */

.site-footer {
  margin-top: 2.5rem;
  padding: 0 0 3rem;
}

.footer-panel {
  padding-top: 2rem;
  border-top: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: none;
}

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

.footer-col strong {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer p {
  max-width: 40ch;
}

.site-footer a {
  color: var(--accent-deep);
  text-decoration-color: rgba(42, 63, 89, 0.24);
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration-color: rgba(165, 114, 63, 0.42);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.site-footer .muted {
  color: var(--muted);
}

.theme-dark .theme-toggle,
.theme-dark .portal-link,
.theme-dark .cta-link {
  background: linear-gradient(180deg, #202d3c 0%, #192431 52%, #141d28 100%);
  border-color: rgba(229, 236, 244, 0.18);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 6px 14px rgba(0, 0, 0, 0.14);
}

.theme-dark .theme-toggle:hover,
.theme-dark .portal-link:hover,
.theme-dark .cta-link:hover {
  background: linear-gradient(180deg, #263548 0%, #1d2b3b 52%, #16202c 100%);
  color: #ffffff;
}

.theme-dark body {
  background:
    radial-gradient(circle at top, rgba(199, 154, 104, 0.13), transparent 24rem),
    radial-gradient(circle at 18% 78%, rgba(102, 125, 149, 0.12), transparent 30rem),
    linear-gradient(180deg, #091018 0%, #0b121a 40%, #081019 100%);
}

.theme-dark ::selection {
  background: rgba(199, 154, 104, 0.28);
}

.theme-dark a {
  text-decoration-color: rgba(244, 247, 251, 0.44);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.24em;
}

.theme-dark a:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.62);
}

.theme-dark .header-inner {
  padding: 0.55rem 0 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.theme-dark .brand-title {
  letter-spacing: 0.015em;
}

.theme-dark .nav-link {
  color: #a6b4c3;
}

.theme-dark .nav-link:hover,
.theme-dark .nav-link:focus-visible {
  color: #ffffff;
}

.theme-dark .nav-link.active,
.theme-dark .nav-link[aria-current='page'] {
  color: #ffffff;
}

.theme-dark .hero,
.theme-dark .section,
.theme-dark .prose {
  position: relative;
  background: none;
  border-color: transparent;
  box-shadow: none;
}

.theme-dark .hero,
.theme-dark .prose,
.theme-dark .portal-shell {
  position: relative;
}

.theme-dark .hero::before,
.theme-dark .prose::before,
.theme-dark .portal-shell::before {
  content: none;
}

.theme-dark .hero .muted,
.theme-dark .section .muted,
.theme-dark .prose .muted,
.theme-dark .portal-panel > .muted {
  color: #a8b5c4;
}

.theme-dark .hero h1,
.theme-dark .prose h1,
.theme-dark .section h2,
.theme-dark .portal-panel h1 {
  color: #f0f4f8;
}

.theme-dark .hero-service-area {
  color: #f0f4f8;
}

.theme-dark .section h3 {
  color: #d8e1ea;
}

.theme-dark .section strong,
.theme-dark .prose strong {
  color: #f1f4f8;
}

.theme-dark .section ul li::marker,
.theme-dark .section ol li::marker,
.theme-dark .prose ul li::marker,
.theme-dark .prose ol li::marker {
  color: rgba(255, 255, 255, 0.88);
}

.theme-dark .availability-status {
  background: rgba(210, 214, 219, 0.04);
  border-color: rgba(214, 218, 223, 0.14);
  color: #edf2f7;
  box-shadow: none;
}

.theme-dark .portal-panel {
  width: min(100%, 30rem);
}

.theme-dark .portal-panel.section {
  background:
    linear-gradient(180deg, rgba(24, 34, 46, 0.96) 0%, rgba(16, 23, 32, 0.98) 100%);
  border-color: rgba(229, 236, 244, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 34px rgba(0, 0, 0, 0.2);
}

.theme-dark .form-label {
  color: #dce3eb;
}

.theme-dark .form-input {
  background: #0f161f;
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.theme-dark .form-input:focus {
  border-color: rgba(199, 154, 104, 0.5);
  box-shadow: 0 0 0 3px rgba(199, 154, 104, 0.12);
}

.theme-dark .form-input:-webkit-autofill,
.theme-dark .form-input:-webkit-autofill:hover,
.theme-dark .form-input:-webkit-autofill:focus,
.theme-dark .form-input:autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px #0f161f inset;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.theme-dark .button-primary {
  background: linear-gradient(180deg, #eef3f8 0%, #cfd8e3 100%);
  border-color: rgba(229, 236, 244, 0.42);
  color: #12202e;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.theme-dark .button-primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #d9e2ec 100%);
}

.theme-dark .alert-error {
  background: rgba(92, 35, 39, 0.34);
  border-color: rgba(244, 199, 199, 0.18);
  color: #f3cdcd;
}

.theme-dark .footer-panel {
  background: none;
  box-shadow: none;
}

.theme-dark .footer-col strong {
  color: rgba(231, 237, 244, 0.58);
}

.theme-dark .footer-bottom {
  border-top-color: rgba(229, 236, 244, 0.08);
}

.theme-dark .site-footer a {
  color: #dbe4ee;
  text-decoration-color: rgba(219, 228, 238, 0.28);
}

.theme-dark .site-footer a:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.52);
}

.theme-dark .site-footer .muted {
  color: rgba(231, 237, 244, 0.68);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 0.9rem 1rem;
  }

  .nav {
    grid-column: 1 / -1;
    justify-self: center;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .hero h1 {
    max-width: none;
  }

  .hero--wide-title h1 {
    max-width: none;
    white-space: normal;
    font-size: clamp(1.55rem, 3.8vw, 1.95rem);
  }

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

@media (max-width: 720px) {
  :root {
    --pad: 1rem;
  }

  .site-header {
    padding-top: 0.75rem;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.4rem 0 0.8rem;
  }

  .brand {
    margin-left: 0;
  }

   .brand-icon {
    width: 1.76rem;
    height: 1.76rem;
  }

  .brand-title {
    font-size: 1.08rem;
  }

  .nav {
    gap: 1rem;
  }

  .nav-link {
    padding: 0.25rem 0;
  }

  .nav-link.active::after,
  .nav-link[aria-current='page']::after {
    bottom: -0.55rem;
  }

  .portal-link {
    width: auto;
    max-width: 100%;
    padding: 0.55rem 0.8rem;
  }

  .theme-toggle {
    width: auto;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0;
  }

  .cta-link {
    width: 100%;
  }

  .hero {
    padding: 1rem 0 1rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.45rem, 6vw, 1.8rem);
  }

  .hero--wide-title h1 {
    font-size: clamp(1.45rem, 6vw, 1.8rem);
  }

  .section,
  .prose {
    padding-left: 0;
    padding-right: 0;
  }

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

  .footer-bottom {
    margin-top: 1.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
