.page-shell .site-header {
  color: #fff;
}

.page-site-header {
  background: rgba(0, 20, 50, 0.9);
}

.page-hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  padding: 150px 0 78px;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(0, 20, 50, 0.86), rgba(0, 20, 50, 0.38)), var(--page-hero);
  background-position: center;
  background-size: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 96px 96px;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
}

.page-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
  font-weight: 900;
  text-transform: uppercase;
}

.page-hero p {
  max-width: 680px;
  margin: 20px auto 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.6;
}

body[data-page="contact"] .page-site-header {
  background: rgba(0, 20, 50, 0.55);
  box-shadow: none;
}

.contact-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: end;
  padding: 118px 0 48px;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(0, 20, 50, 0.78), rgba(0, 20, 50, 0.58)), var(--contact-hero);
  background-position: center;
  background-size: cover;
}

.contact-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 96px 96px;
}

.contact-hero-inner {
  position: relative;
  z-index: 1;
}

.contact-hero h1 {
  max-width: 460px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 5.4vw, 68px);
  line-height: 1.05;
  font-weight: 900;
}

.contact-hero h1 span {
  display: block;
  color: var(--orange);
  text-transform: uppercase;
}

.contact-quick-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 1.55fr 1fr;
  gap: 42px;
  margin-top: 48px;
  max-width: 1030px;
}

.contact-quick-item h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
}

.contact-quick-item a,
.contact-quick-item span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
}

.contact-quick-item a:hover {
  color: var(--orange);
}

.contact-main {
  padding: 54px 0 40px;
  background: #fff;
}

.contact-form-layout {
  width: min(1000px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.96fr);
  gap: 78px;
  align-items: start;
}

.contact-form-panel {
  padding-top: 28px;
}

.contact-form-panel h2 {
  margin: 0 0 16px;
  color: #4d535b;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 900;
}

.contact-form-panel > p {
  margin: 0 0 6px;
  color: #2f3742;
  font-size: 16px;
  line-height: 1.5;
}

.contact-form-panel label {
  display: block;
  margin-top: 14px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 900;
}

.contact-form-panel input,
.contact-form-panel textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d7dce2;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-panel input {
  height: 36px;
  padding: 0 12px;
}

.contact-form-panel textarea {
  min-height: 118px;
  padding: 10px 12px;
  resize: vertical;
}

.contact-form-panel input:focus,
.contact-form-panel textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 157, 0, 0.14);
}

.contact-form-panel .is-invalid {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}

.contact-submit {
  width: 100%;
  height: 40px;
  margin-top: 20px;
  border-radius: 9px;
  text-transform: uppercase;
}

.contact-response {
  margin: 14px 0 0;
  color: #3d4650;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
}

.contact-response.is-error {
  color: #b42318;
}

.contact-response.is-success {
  color: #027a48;
}

.contact-photo {
  overflow: hidden;
  background: #f4f6f8;
}

.contact-photo img {
  width: 100%;
  height: 526px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.contact-map-section {
  padding: 40px 0 0;
  background: #fff;
}

.contact-map-frame {
  width: min(1000px, calc(100% - 40px));
}

.contact-map-fallback {
  width: 100%;
  height: 450px;
  display: none;
  object-fit: cover;
  object-position: center;
}

.contact-map-frame iframe {
  width: 100%;
  height: 450px;
  display: block;
  border: 0;
}

.blog-filters {
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blog-filters a {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
}

.blog-filters a.active,
.blog-filters a:hover {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: start;
}

.blog-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 43, 54, 0.08);
}

.blog-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f4f6f8;
}

.blog-media img,
.service-mini-card img,
.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-card-body {
  padding: 22px;
}

.blog-card h2 {
  margin: 6px 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.blog-card p {
  color: var(--muted);
  line-height: 1.6;
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7e0;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
}

.recent-posts {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid var(--line);
}

.recent-posts h2,
.category-block h2,
.related-posts h2 {
  margin: 0 0 18px;
}

.mini-post {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.mini-post img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  grid-row: span 2;
}

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

.mini-post strong {
  font-size: 14px;
  line-height: 1.3;
}

.category-blocks {
  display: grid;
  gap: 34px;
  margin-top: 46px;
}

.block-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.block-head a {
  color: var(--orange-dark);
  font-weight: 900;
}

.mini-grid,
.blog-grid,
.service-list-grid,
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.blog-grid {
  margin-top: 42px;
}

.article-page {
  padding-top: 88px;
}

.article-hero {
  padding: 78px 0 34px;
  background: #f7f9fc;
}

.article-head {
  max-width: 860px;
}

.article-head h1 {
  margin: 12px 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
}

.article-head p:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.article-image {
  margin-top: 28px;
  max-height: 520px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.article-layout,
.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 46px;
  padding: 58px 0;
}

.article-sidebar,
.legal-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.article-sidebar a,
.legal-toc a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.article-content,
.legal-content {
  max-width: 850px;
}

.article-content h2,
.legal-content h2,
.story-split h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.1;
}

.article-content p,
.article-content li,
.legal-content p,
.story-split p,
.values-grid p,
.milestone-list p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.article-content li {
  margin-bottom: 10px;
}

.legal-content section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.legal-note {
  margin-top: 28px;
  padding: 18px;
  border-left: 4px solid var(--orange);
  background: #fff7e0;
}

.story-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}

.story-split.reverse {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1fr);
}

.story-split img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.values-grid {
  margin-bottom: 56px;
}

.story-section-head {
  margin-bottom: 22px;
}

.story-section-head h2 {
  margin: 0;
  font-size: 34px;
}

.values-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 43, 54, 0.08);
}

.milestone-list {
  display: grid;
  gap: 14px;
}

.milestone-list div {
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  background: #fff7e0;
}

.service-index-grid {
  display: grid;
  gap: 44px;
}

.service-index-group {
  scroll-margin-top: 92px;
}

.service-index-group h2 {
  font-size: 32px;
}

.service-mini-card {
  overflow: hidden;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 43, 54, 0.08);
}

.service-mini-card img {
  aspect-ratio: 16 / 10;
}

.service-mini-card span {
  padding: 16px 16px 0;
  font-size: 20px;
  font-weight: 900;
}

.service-mini-card p {
  margin: 8px 0 0;
  padding: 0 16px 18px;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 980px) {
  .blog-layout,
  .article-layout,
  .legal-layout,
  .contact-form-layout,
  .story-split,
  .story-split.reverse {
    grid-template-columns: 1fr;
  }

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

  .contact-form-layout,
  .contact-map-frame {
    width: min(calc(100% - 40px), var(--container));
  }

  .contact-photo img {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .recent-posts,
  .article-sidebar,
  .legal-toc {
    position: static;
  }

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

@media (max-width: 640px) {
  .page-hero {
    min-height: 460px;
    padding: 128px 0 58px;
  }

  .page-hero h1 {
    font-size: 42px;
  }

  .page-hero p {
    font-size: 16px;
  }

  .contact-hero {
    min-height: 620px;
    padding: 118px 0 42px;
  }

  .contact-hero h1 {
    font-size: 46px;
  }

  .contact-quick-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 34px;
  }

  .contact-quick-item a,
  .contact-quick-item span {
    font-size: 15px;
  }

  .contact-main {
    padding-top: 36px;
  }

  .contact-form-layout {
    gap: 34px;
  }

  .contact-form-panel {
    padding-top: 0;
  }

  .contact-map-frame iframe {
    display: none;
  }

  .contact-map-fallback {
    height: 360px;
    display: block;
  }

  .mini-grid,
  .blog-grid,
  .service-list-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .blog-card h2,
  .article-content h2,
  .legal-content h2,
  .story-split h2 {
    font-size: 28px;
  }
}

/* Design refresh for secondary pages */
.page-hero,
.contact-hero {
  background-image:
    linear-gradient(90deg, rgba(6, 19, 36, 0.92), rgba(6, 19, 36, 0.6)),
    var(--page-hero);
}

.contact-hero {
  background-image:
    linear-gradient(90deg, rgba(6, 19, 36, 0.88), rgba(6, 19, 36, 0.5)),
    var(--contact-hero);
}

.page-hero::after,
.contact-hero::after {
  opacity: 0.6;
  background-size: 128px 128px;
}

.page-hero-inner {
  width: min(840px, calc(100% - 48px));
}

.page-eyebrow {
  padding: 7px 12px;
  border: 1px solid rgba(255, 157, 0, 0.28);
  border-radius: 999px;
  background: rgba(255, 157, 0, 0.1);
}

.page-hero h1 {
  font-size: 66px;
  line-height: 1.02;
  letter-spacing: 0;
}

.page-hero p,
.contact-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.contact-hero h1 {
  max-width: 680px;
  font-size: 62px;
  line-height: 1.04;
}

.contact-hero h1 span {
  color: var(--orange);
}

.contact-quick-grid {
  gap: 24px;
}

.contact-quick-item {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.contact-main {
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 157, 0, 0.08), transparent 32%),
    #fff;
}

.contact-form-layout {
  gap: 54px;
}

.contact-form-panel {
  padding: 28px;
  border: 1px solid rgba(6, 19, 36, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.contact-form-panel h2 {
  color: var(--ink);
  font-size: 30px;
  line-height: 1.16;
}

.contact-form-panel input,
.contact-form-panel textarea {
  border-color: rgba(6, 19, 36, 0.12);
  border-radius: 9px;
  background: #fffdf8;
}

.contact-photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-map-frame iframe,
.contact-map-fallback {
  border-radius: var(--radius);
}

.blog-layout {
  gap: 30px;
}

.blog-card,
.mini-post,
.service-mini-card,
.legal-content,
.legal-toc,
.story-split img,
.values-grid article {
  border-radius: var(--radius);
  border-color: rgba(6, 19, 36, 0.08);
  box-shadow: var(--shadow-soft);
}

.blog-card {
  overflow: hidden;
  background: #fff;
}

.blog-card h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
}

.blog-card p,
.mini-post strong,
.legal-content p,
.story-split p,
.service-mini-card p {
  color: var(--muted);
}

.category-block {
  padding: 20px 0;
  border-top: 1px solid rgba(6, 19, 36, 0.08);
}

.category-block h2 {
  color: var(--ink);
}

.legal-content,
.legal-toc {
  background: #fff;
}

.story-split {
  gap: 56px;
}

.service-mini-card {
  background: #fff;
}

@media (max-width: 900px) {
  .page-hero h1,
  .contact-hero h1 {
    font-size: 48px;
  }
}

@media (max-width: 640px) {
  .page-hero h1,
  .contact-hero h1 {
    font-size: 38px;
  }

  .contact-hero {
    min-height: auto;
    padding-bottom: 54px;
  }

  .contact-form-panel {
    padding: 20px;
  }

  .contact-quick-item {
    padding: 16px;
  }
}

/* Compact Contact Us refinement */
body[data-page="contact"] .contact-hero {
  min-height: 365px;
  padding: 104px 0 34px;
  align-items: end;
}

body[data-page="contact"] .contact-hero h1 {
  max-width: 560px;
  font-size: 52px;
  line-height: 1.02;
}

body[data-page="contact"] .contact-quick-grid {
  grid-template-columns: 1.18fr 0.78fr 1.28fr 0.82fr;
  gap: 14px;
  max-width: 1040px;
  margin-top: 26px;
}

body[data-page="contact"] .contact-quick-item {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 14px;
}

body[data-page="contact"] .contact-quick-item h2 {
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0;
}

body[data-page="contact"] .contact-quick-item a,
body[data-page="contact"] .contact-quick-item span {
  margin-top: 5px;
  font-size: 13.5px;
  line-height: 1.38;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body[data-page="contact"] .contact-main {
  padding: 34px 0 28px;
}

body[data-page="contact"] .contact-form-layout {
  width: min(1040px, calc(100% - 48px));
  grid-template-columns: minmax(0, 0.96fr) minmax(310px, 0.82fr);
  gap: 32px;
  align-items: stretch;
}

body[data-page="contact"] .contact-form-panel {
  padding: 22px;
}

body[data-page="contact"] .contact-form-panel h2 {
  margin-bottom: 9px;
  font-size: 26px;
}

body[data-page="contact"] .contact-form-panel > p {
  max-width: 560px;
  font-size: 14px;
  line-height: 1.45;
}

body[data-page="contact"] .contact-form-panel label {
  margin-top: 10px;
  font-size: 12.5px;
}

body[data-page="contact"] .contact-form-panel input {
  height: 34px;
}

body[data-page="contact"] .contact-form-panel textarea {
  min-height: 92px;
}

body[data-page="contact"] .contact-submit {
  height: 38px;
  margin-top: 16px;
  font-size: 13px;
}

body[data-page="contact"] .contact-photo {
  min-height: 100%;
}

body[data-page="contact"] .contact-photo img {
  height: 100%;
  min-height: 420px;
  max-height: 488px;
}

body[data-page="contact"] .contact-map-section {
  padding-top: 22px;
}

body[data-page="contact"] .contact-map-frame {
  width: min(1040px, calc(100% - 48px));
}

body[data-page="contact"] .contact-map-frame iframe,
body[data-page="contact"] .contact-map-fallback {
  height: 330px;
}

/* Compact legal pages */
body[data-page="legal"] .legal-page {
  padding: 34px 0 52px;
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 157, 0, 0.08), transparent 30%),
    linear-gradient(180deg, #fff 0%, #fbfaf7 100%);
}

body[data-page="legal"] .legal-layout {
  width: min(1180px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 24px;
  padding: 0;
}

body[data-page="legal"] .legal-toc {
  top: 92px;
  gap: 6px;
  max-height: calc(100vh - 118px);
  padding: 16px;
  overflow: auto;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 248, 0.96));
  box-shadow: 0 14px 34px rgba(6, 19, 36, 0.08);
  scrollbar-width: thin;
}

body[data-page="legal"] .legal-toc strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

body[data-page="legal"] .legal-toc a {
  position: relative;
  padding: 8px 10px 8px 22px;
  border-radius: 8px;
  color: #536071;
  font-size: 12.5px;
  line-height: 1.22;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

body[data-page="legal"] .legal-toc a::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  transform: translateY(-50%);
  opacity: 0.76;
}

body[data-page="legal"] .legal-toc a:hover {
  background: #fff7e0;
  color: var(--orange);
  transform: translateX(2px);
}

body[data-page="legal"] .legal-content {
  max-width: none;
  min-width: 0;
}

body[data-page="legal"] .legal-content-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body[data-page="legal"] .legal-content-head .post-meta {
  margin: 0;
  color: #344054;
  font-size: 14px;
  font-weight: 900;
}

body[data-page="legal"] .legal-quick-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

body[data-page="legal"] .legal-quick-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 157, 0, 0.28);
  border-radius: 999px;
  background: #fff7e0;
  color: #8a5200;
  font-size: 12px;
  font-weight: 900;
}

body[data-page="legal"] .legal-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="legal"] .legal-card {
  position: relative;
  min-height: 188px;
  padding: 18px 18px 18px 58px;
  overflow: hidden;
  border: 1px solid rgba(6, 19, 36, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(6, 19, 36, 0.07);
}

body[data-page="legal"] .legal-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 0 58px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--orange), transparent);
  opacity: 0.55;
}

body[data-page="legal"] .legal-card-index {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff7e0;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="legal"] .legal-card h2 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: 0;
}

body[data-page="legal"] .legal-card p {
  margin: 0;
  color: #5b6472;
  font-size: 14px;
  line-height: 1.58;
}

body[data-page="legal"] .legal-note {
  margin-top: 16px;
  border-radius: 12px;
  border-left: 0;
}

@media (max-width: 980px) {
  body[data-page="contact"] .contact-hero {
    min-height: auto;
    padding: 112px 0 34px;
  }

  body[data-page="contact"] .contact-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body[data-page="contact"] .contact-form-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body[data-page="contact"] .contact-photo img {
    min-height: 300px;
    max-height: 360px;
  }

  body[data-page="legal"] .legal-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body[data-page="legal"] .legal-toc {
    position: relative;
    top: auto;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body[data-page="legal"] .legal-toc strong {
    flex: 0 0 100%;
    margin-bottom: 2px;
  }

  body[data-page="legal"] .legal-toc a {
    padding: 8px 10px 8px 22px;
    border: 1px solid rgba(6, 19, 36, 0.08);
    background: #fff;
  }

  body[data-page="legal"] .legal-card-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="legal"] .legal-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  body[data-page="contact"] .contact-hero {
    padding: 104px 0 28px;
  }

  body[data-page="contact"] .contact-hero-inner {
    width: min(calc(100% - 28px), var(--container));
  }

  body[data-page="contact"] .contact-hero h1 {
    max-width: 100%;
    font-size: 34px;
  }

  body[data-page="contact"] .contact-quick-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  body[data-page="contact"] .contact-quick-item {
    padding: 12px;
  }

  body[data-page="contact"] .contact-quick-item a,
  body[data-page="contact"] .contact-quick-item span {
    font-size: 13px;
  }

  body[data-page="contact"] .contact-main {
    padding: 26px 0 20px;
  }

  body[data-page="contact"] .contact-form-layout,
  body[data-page="contact"] .contact-map-frame {
    width: min(calc(100% - 28px), 1040px);
  }

  body[data-page="contact"] .contact-form-panel {
    min-width: 0;
    padding: 18px;
  }

  body[data-page="contact"] .contact-form-panel h2 {
    font-size: 23px;
  }

  body[data-page="contact"] .contact-form-panel > p {
    max-width: 292px;
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body[data-page="contact"] .contact-photo img {
    min-height: 240px;
    max-height: 280px;
  }

  body[data-page="contact"] .contact-map-frame iframe,
  body[data-page="contact"] .contact-map-fallback {
    height: 260px;
  }

  body[data-page="legal"] .legal-page {
    padding: 24px 0 38px;
  }

  body[data-page="legal"] .page-hero {
    min-height: 390px;
    padding: 112px 0 46px;
    overflow: hidden;
  }

  body[data-page="legal"] .page-hero-inner {
    width: min(calc(100% - 28px), var(--container));
    overflow: hidden;
  }

  body[data-page="legal"] .page-hero h1 {
    max-width: 100%;
    font-size: 28px !important;
    line-height: 1.14;
    text-transform: none;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  body[data-page="legal"] .page-hero p {
    width: min(320px, 100%);
    max-width: 100%;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: normal;
  }

  body[data-page="legal"] .legal-layout {
    width: min(calc(100% - 28px), 1180px);
  }

  body[data-page="legal"] .legal-toc {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-page="legal"] .legal-toc a {
    min-width: 0;
    width: 100%;
    overflow-wrap: anywhere;
  }

  body[data-page="legal"] .legal-content-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body[data-page="legal"] .legal-quick-meta {
    justify-content: flex-start;
  }

  body[data-page="legal"] .legal-card {
    padding: 16px 15px 16px 50px;
  }

  body[data-page="legal"] .legal-card h2 {
    font-size: 19px;
  }

body[data-page="legal"] .legal-card p {
    font-size: 13.5px;
  }
}
