:root {
  --bg: #f3efe6;
  --surface: #fffdf9;
  --surface-soft: #ebe6dc;
  --text: #141a24;
  --muted: #5c6478;
  --line: #d4cdc0;
  --primary: #1a5c4f;
  --primary-dark: #0f3d35;
  --primary-soft: #dceee9;
  --accent: #c45f28;
  --accent-soft: #f8e8dc;
  --signal: #2a9d8f;
  --signal-soft: #d4f0ec;
  --red: #9e3b52;
  --blue-soft: #dde8f0;
  --danger: #a83248;
  --success: #1a7a55;
  --shadow-sm: 0 10px 30px rgba(20, 26, 36, 0.07);
  --shadow-md: 0 28px 64px rgba(20, 26, 36, 0.12);
  --body-bg:
    radial-gradient(ellipse 90% 60% at 8% -10%, rgba(42, 157, 143, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 92% 4%, rgba(196, 95, 40, 0.12), transparent 50%),
    linear-gradient(180deg, #f8f4ec 0%, #f0ebe2 420px, #f3efe6 100%);
  --grid-line: rgba(26, 92, 79, 0.05);
  --header-bg: rgba(255, 253, 249, 0.82);
  --header-border: rgba(212, 205, 192, 0.9);
  --glass-bg: rgba(255, 253, 249, 0.72);
  --hero-bg:
    linear-gradient(155deg, rgba(255, 253, 249, 0.98) 0%, rgba(220, 238, 233, 0.55) 42%, rgba(248, 232, 220, 0.5) 100%);
  --tinted-bg: linear-gradient(180deg, #ebe6dc 0%, #f3efe6 100%);
  --portal-bg: linear-gradient(145deg, #fffdf9 0%, #e8f4f1 48%, #f8ebe2 100%);
  --footer-bg: linear-gradient(160deg, #0f161f 0%, #1a2e2a 55%, #142018 100%);
  --control-bg: #fffdf9;
  --control-hover: #8a939f;
  --control-border: #c8bfb0;
  --paragraph: #3d4556;
  --brand-glow: rgba(26, 92, 79, 0.28);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --max: 1180px;
}

[data-theme="dark"] {
  --bg: #0c1018;
  --surface: #141b26;
  --surface-soft: #1c2433;
  --text: #eef1f6;
  --muted: #9aa3b5;
  --line: #2a3448;
  --primary: #5ecfb8;
  --primary-dark: #b8f0e6;
  --primary-soft: #1a2f2c;
  --accent: #e8925a;
  --accent-soft: #3a2618;
  --signal: #5ecfb8;
  --signal-soft: #1a3330;
  --red: #f08aa8;
  --blue-soft: #1a2838;
  --danger: #ff8a9e;
  --success: #62d39b;
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 28px 72px rgba(0, 0, 0, 0.45);
  --body-bg:
    radial-gradient(ellipse 80% 55% at 0% 0%, rgba(94, 207, 184, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 45% at 100% 0%, rgba(232, 146, 90, 0.1), transparent 45%),
    linear-gradient(180deg, #0c1018 0%, #101620 520px, #0c1018 100%);
  --grid-line: rgba(94, 207, 184, 0.06);
  --header-bg: rgba(12, 16, 24, 0.88);
  --header-border: rgba(94, 207, 184, 0.14);
  --glass-bg: rgba(20, 27, 38, 0.78);
  --hero-bg:
    radial-gradient(circle at 88% 12%, rgba(232, 146, 90, 0.14), transparent 32%),
    linear-gradient(155deg, #101620 0%, #152028 48%, #1a1814 100%);
  --tinted-bg: linear-gradient(180deg, #101620 0%, #0c1018 100%);
  --portal-bg: linear-gradient(145deg, #141b26 0%, #152a28 52%, #221a14 100%);
  --footer-bg: linear-gradient(160deg, #06090e 0%, #122420 100%);
  --control-bg: #0f141e;
  --control-hover: #6b758a;
  --control-border: #354055;
  --paragraph: #b8c0d0;
  --brand-glow: rgba(94, 207, 184, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background 0.3s ease, color 0.3s ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0, transparent 680px);
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.45), transparent 30%),
    linear-gradient(145deg, var(--primary) 0%, #2a7d6e 52%, var(--accent) 100%);
  box-shadow: 0 14px 28px var(--brand-glow);
}

.brand-mark::before {
  position: absolute;
  inset: -4px;
  z-index: -1;
  content: "";
  border-radius: calc(var(--radius-md) + 4px);
  background: conic-gradient(from 200deg, transparent, var(--accent), var(--signal), transparent 70%);
  opacity: 0.75;
}

.brand-mark img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.15;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--paragraph);
  font-size: 14px;
  font-weight: 500;
}

.main-nav a {
  position: relative;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:not(.nav-cta)::after {
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 2px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.main-nav a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}

.main-nav a:hover {
  color: var(--primary-dark);
}

.main-nav .nav-cta {
  margin-left: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.main-nav .nav-cta:hover {
  background: var(--primary);
  color: #fff;
}

.main-nav .nav-cta::after {
  display: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-left: 4px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.theme-toggle-icon::before {
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 50%;
  background: #fff;
}

[data-theme="dark"] .theme-toggle-icon::before {
  width: 12px;
  height: 12px;
  background: transparent;
  box-shadow: inset -4px -2px 0 #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  min-height: calc(100vh - 78px);
  overflow: hidden;
  padding: 80px clamp(18px, 5vw, 72px) 72px;
  background: var(--hero-bg);
}

.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-ambient::before,
.hero-ambient::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  filter: blur(72px);
}

.hero-ambient::before {
  top: -8%;
  right: 18%;
  width: min(52vw, 480px);
  height: min(52vw, 480px);
  background: color-mix(in srgb, var(--signal) 42%, transparent);
}

.hero-ambient::after {
  bottom: 8%;
  left: -6%;
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 96px;
  content: "";
  background: var(--surface);
  clip-path: polygon(0 55%, 100% 0, 100% 100%, 0 100%);
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 8px 14px 8px 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 999px;
  background: var(--glass-bg);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

.hero-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 25%, transparent);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 14ch;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  line-height: 1.02;
  font-weight: 800;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.hero p:not(.eyebrow):not(.hero-badge) {
  max-width: 54ch;
  color: var(--paragraph);
  font-size: 1.125rem;
}

.hero-actions,
.button {
  display: inline-flex;
  align-items: center;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  justify-content: center;
  min-height: 50px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 32px color-mix(in srgb, var(--primary) 35%, transparent);
}

.button.primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 42%, transparent);
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.button.secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.button.danger {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  box-shadow: none;
}

.button.danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 640px;
  margin-top: 40px;
}

.hero-metrics div {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(6px);
}

.hero-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1;
  color: var(--primary);
}

.hero-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.hero-visual {
  justify-self: end;
  width: min(100%, 580px);
}

.hero-image {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.hero-note {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: min(78%, 280px);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.hero-note strong,
.hero-note span {
  display: block;
}

.hero-note span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.quick-links {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: var(--max);
  margin: -36px auto 0;
  padding: 0 clamp(18px, 5vw, 72px) 64px;
}

.quick-links a {
  position: relative;
  display: block;
  min-height: 140px;
  padding: 26px 24px 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-links a:nth-child(1) {
  border-top: 3px solid var(--primary);
}

.quick-links a:nth-child(2) {
  border-top: 3px solid var(--signal);
}

.quick-links a:nth-child(3) {
  border-top: 3px solid var(--accent);
}

.quick-links a:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.quick-number,
.quick-links strong,
.quick-links span {
  display: block;
}

.quick-number {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.quick-links strong {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.quick-links span:not(.quick-number) {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: 88px clamp(18px, 5vw, 72px);
  background: var(--surface);
}

.section.tinted {
  background: var(--tinted-bg);
}

.section-heading,
.two-column,
.service-grid,
.portal-layout,
.faq-list,
.steps,
.contact-layout {
  max-width: var(--max);
  margin-right: auto;
  margin-left: auto;
}

.section-heading {
  margin-bottom: 40px;
  padding-left: 18px;
  border-left: 4px solid var(--accent);
}

.section-heading > p:not(.eyebrow) {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.two-column,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.two-column p {
  color: var(--paragraph);
  font-size: 1.05rem;
}

.facts,
.steps,
.service-grid {
  display: grid;
  gap: 16px;
}

.facts {
  grid-template-columns: 1fr;
}

.facts div,
.service-grid article,
.steps article,
.form-panel,
.contact-card,
.contact-form,
.faq-list details,
.portal-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.facts div {
  position: relative;
  padding: 22px 22px 22px 68px;
  box-shadow: var(--shadow-sm);
}

.facts strong,
.facts span {
  display: block;
}

.facts span:not(.fact-mark) {
  color: var(--muted);
}

.fact-mark {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
}

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

.service-grid article {
  position: relative;
  min-height: 220px;
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-grid article:nth-child(odd) {
  background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft));
}

.service-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.service-grid p,
.steps p,
.faq-list p {
  color: var(--muted);
  font-size: 15px;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
}

.portal {
  background: var(--portal-bg);
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.portal-summary {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 14px;
  padding: 26px;
  color: var(--paragraph);
  box-shadow: var(--shadow-sm);
}

.portal-summary strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.portal-summary span {
  padding-left: 14px;
  border-left: 3px solid var(--signal);
  font-size: 15px;
}

.form-panel {
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--paragraph);
  font-size: 14px;
  font-weight: 600;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--control-bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input,
select {
  min-height: 48px;
  padding: 10px 14px;
}

textarea {
  min-height: 132px;
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.readonly-field {
  background: var(--surface-soft);
  color: var(--muted);
}

.error-message {
  display: none;
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
}

.invalid .error-message,
.consent.invalid + .consent-error {
  display: block;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 400;
}

.consent input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.submit-button {
  margin-top: 20px;
}

.form-status {
  display: block;
  margin-top: 14px;
  color: var(--success);
  font-weight: 600;
}

.form-status.error {
  color: var(--danger);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.faq-list details[open] {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.faq-list summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
}

.faq-list summary::marker {
  color: var(--accent);
}

.faq-list p {
  margin: 12px 0 0;
}

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

.steps article {
  padding: 24px;
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.steps article:nth-child(2) {
  border-top-color: var(--signal);
}

.steps article:nth-child(3) {
  border-top-color: var(--accent);
}

.steps article:nth-child(4) {
  border-top-color: var(--red);
}

.contact-card,
.contact-form {
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.contact-card {
  display: grid;
  gap: 8px;
  font-style: normal;
  background: color-mix(in srgb, var(--primary-soft) 40%, var(--surface));
}

.contact-card strong:not(:first-child) {
  margin-top: 14px;
  font-family: var(--font-display);
}

.contact-card span,
.contact-card a:not(.map-link) {
  color: var(--muted);
}

.map-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  color: var(--primary);
  font-weight: 700;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 36px clamp(18px, 5vw, 72px);
  background: var(--footer-bg);
  color: color-mix(in srgb, #fff 72%, transparent);
  font-size: 14px;
}

.site-footer span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
}

.app-page {
  min-height: 100vh;
  background: var(--hero-bg);
}

.auth-shell,
.dashboard-shell {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: 64px 0 88px;
}

.auth-panel {
  display: grid;
  gap: 32px;
}

.auth-panel > div:first-child {
  max-width: 720px;
  padding-left: 18px;
  border-left: 4px solid var(--signal);
}

.auth-panel h1,
.dashboard-heading h1 {
  font-size: clamp(2rem, 4vw, 2.65rem);
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.auth-grid .form-panel h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.small-button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}

.dashboard-heading {
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 4px solid var(--primary);
}

.requests-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-md);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  font-family: var(--font-display);
  font-weight: 700;
}

.request-list {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.request-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.request-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.request-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.request-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 0;
}

.stat-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text);
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.stat-card.stat-new strong {
  color: #2a5f7a;
}

.stat-card.stat-progress strong {
  color: var(--accent);
}

.stat-card.stat-done strong {
  color: var(--primary);
}

.stat-card.stat-cancelled strong {
  color: var(--danger);
}

.requests-filters {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.search-field input {
  width: 100%;
}

.inline-select {
  display: grid;
  gap: 6px;
  min-width: 200px;
}

.inline-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--paragraph);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.filter-chip:hover {
  border-color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.auto-refresh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auto-refresh-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.refresh-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.refresh-status.error {
  color: var(--danger);
}

.request-title-group {
  display: grid;
  gap: 4px;
}

.text-button {
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent);
}

.status-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.timeline-step {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.timeline-step.done .timeline-dot {
  border-color: var(--primary);
  background: var(--primary);
}

.timeline-step.active .timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.timeline-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.timeline-step.active .timeline-label,
.timeline-step.done .timeline-label {
  color: var(--text);
}

.timeline-cancelled {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.app-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--signal);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.app-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.request-card-head strong {
  font-family: var(--font-display);
}

.request-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.request-card dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.request-card dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.request-card p {
  margin: 0;
  color: var(--paragraph);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.priority-low {
  background: color-mix(in srgb, var(--muted) 16%, var(--surface));
  color: var(--muted);
}

.priority-normal {
  background: var(--blue-soft);
  color: #2a5f7a;
}

.priority-high {
  background: var(--accent-soft);
  color: #8a4a22;
}

.priority-urgent {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.status-new {
  background: var(--blue-soft);
  color: #2a5f7a;
}

.status-in_progress {
  background: var(--accent-soft);
  color: #8a4a22;
}

.status-done {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-cancelled {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.admin-comment {
  padding: 12px 14px;
  border-left: 3px solid var(--signal);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.admin-update-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.22fr) minmax(160px, 0.22fr) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-update-form textarea {
  min-height: 84px;
}

.empty-state {
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

@media (max-width: 1120px) {
  .main-nav {
    font-size: 13px;
  }

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

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

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

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

  .main-nav {
    position: absolute;
    top: 76px;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }

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

  .app-page .main-nav {
    position: static;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

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

  .main-nav .nav-cta {
    margin: 4px 0 0;
    text-align: center;
  }

  .hero,
  .two-column,
  .contact-layout,
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-visual {
    justify-self: stretch;
    width: 100%;
  }

  .quick-links,
  .form-grid,
  .service-grid,
  .steps,
  .hero-metrics,
  .auth-grid,
  .request-card dl,
  .admin-update-form {
    grid-template-columns: 1fr;
  }

  .quick-links {
    margin-top: 0;
    padding-bottom: 48px;
  }

  .portal-summary {
    position: static;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero,
  .section,
  .quick-links {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-note {
    position: static;
    width: 100%;
    margin-top: 14px;
  }

  .form-panel,
  .portal-summary,
  .contact-card,
  .contact-form,
  .request-card {
    padding: 20px;
  }

  .request-card-head,
  .table-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .status-timeline {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
