/* =========================================================
   기쁨을향한여정 · Journey Towards Joy
   Shared stylesheet for the homepage and legal pages.
   No external fonts, frameworks or scripts.
   ========================================================= */

:root {
  /* Palette */
  --cream: #faf6ee;
  --paper: #fffdf8;
  --sand: #f2ecdf;
  --line: #e4ddce;
  --sage-50: #eef4ec;
  --sage-100: #dde9dc;
  --sage-200: #c4d9c6;
  --sage: #84ae8e;
  --sage-deep: #659a72;
  --green-700: #3d6b4a;
  --green-800: #2f5a3c;
  --green-900: #234a2f;
  --forest: #1e3126;
  --ink-soft: #4a5a4f;
  --sun: #f6d989;

  /* Type */
  --font-sans: "Pretendard", "Pretendard Variable", "Apple SD Gothic Neo",
    "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", "맑은 고딕",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius-sm: 14px;
  --radius: 24px;
  --radius-lg: 36px;
  --header-h: 72px;

  --shadow-soft: 0 1px 2px rgba(30, 49, 38, 0.05),
    0 12px 32px -12px rgba(30, 49, 38, 0.16);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--forest);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--forest);
}

p {
  margin: 0;
}

a {
  color: var(--green-700);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--green-900);
}

:focus-visible {
  outline: 3px solid var(--green-800);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus {
  outline: none;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--paper);
  outline-color: var(--sun);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.94);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(228, 221, 206, 0.8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--forest);
  text-decoration: none;
  min-height: 44px;
}

.brand:hover {
  color: var(--forest);
}

.brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(30, 49, 38, 0.06);
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.brand__en {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--forest);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--sage-50);
  color: var(--green-900);
}

.site-nav .site-nav__contact {
  margin-left: 6px;
  background: var(--forest);
  color: var(--paper);
}

.site-nav .site-nav__contact:hover {
  background: var(--green-900);
  color: var(--paper);
}

/* Mobile: links drop to a second row of pills — no JS menu needed. */
@media (max-width: 639px) {
  :root {
    --header-h: 116px;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-block: 10px 10px;
  }

  .site-nav ul {
    gap: 6px;
  }

  .site-nav li {
    flex: 1 1 0;
  }

  .site-nav a {
    justify-content: center;
    width: 100%;
    padding: 0 10px;
    background: var(--paper);
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .site-nav .site-nav__contact {
    margin-left: 0;
    box-shadow: none;
  }
}

/* ---------- Buttons & pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1.2;
  border: 1.5px solid transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  background: var(--green-800);
  color: #fff;
}

.btn--primary:hover {
  background: var(--green-900);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--forest);
  color: var(--forest);
}

.btn--ghost:hover {
  background: var(--forest);
  color: var(--paper);
}

.btn--light {
  background: var(--paper);
  color: var(--forest);
}

.btn--light:hover {
  background: var(--sage-50);
  color: var(--forest);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--forest);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 4px var(--sage-100);
  flex: none;
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--green-700);
  letter-spacing: 0.01em;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(72px, 9vw, 128px);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  line-height: 1.32;
}

.section-head p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(40px, 6vw, 88px) clamp(64px, 8vw, 112px);
}

.hero__grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  }
}

.hero__copy {
  max-width: 600px;
}

.hero__en {
  display: block;
  margin-top: 28px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  color: var(--green-700);
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(1.85rem, 1.05rem + 3.4vw, 3.75rem);
  line-height: 1.24;
  letter-spacing: -0.035em;
}

.hero h1 span {
  display: block;
}

.hero h1 .hero__accent {
  color: var(--green-700);
}

.hero__lead {
  margin-top: 24px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(1.0313rem, 0.98rem + 0.25vw, 1.125rem);
  line-height: 1.85;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.9063rem;
}

.hero__note li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__note svg {
  width: 16px;
  height: 16px;
  color: var(--sage-deep);
  flex: none;
}

/* Illustration stage */

.hero-figure {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 580px;
  justify-self: center;
}

.hero-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 10 / 11;
  border-radius: var(--radius-lg);
  background: var(--sage-50);
  box-shadow: inset 0 0 0 1px rgba(101, 154, 114, 0.12);
}

/* Sun halo, echoing the app icon */
.hero-stage::before {
  content: "";
  position: absolute;
  top: 6%;
  left: 50%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.55;
  transform: translateX(-50%);
}

/* Ground line */
.hero-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 12%;
  background: var(--sage-100);
}

.hero-stage img {
  position: absolute;
  left: 0;
  bottom: 2%;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

/* Conceptual routine card (decorative, not an app capture) */

.routine-card {
  position: absolute;
  z-index: 2;
  left: clamp(-36px, -2.5vw, -12px);
  bottom: 15%;
  width: 236px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.routine-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.routine-card__title {
  font-weight: 800;
  font-size: 0.9375rem;
}

.routine-card__tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink-soft);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.routine-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.routine-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--forest);
}

.routine-card .tick {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--sage);
  flex: none;
}

.routine-card .is-done .tick {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
}

.routine-card .is-done .tick::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.routine-card .is-done span:last-child {
  color: var(--ink-soft);
}

.routine-card__bar {
  height: 6px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--sage-50);
  overflow: hidden;
}

.routine-card__bar::before {
  content: "";
  display: block;
  width: 66%;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
}

.hero-figure figcaption {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  text-align: center;
}

@media (max-width: 599px) {
  .hero-stage {
    border-radius: 28px;
  }

  .routine-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(260px, 82%);
    margin: -56px 0 0 16px;
  }
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 30px 26px 32px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 26px;
  border-radius: 16px;
  background: var(--sage-50);
  color: var(--green-700);
}

.feature-card__icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-size: 1.1875rem;
}

.feature-card p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9688rem;
  line-height: 1.8;
}

/* ---------- Journey (3 steps) ---------- */

.journey {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }
}

.step {
  position: relative;
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--sage-50);
  counter-increment: step;
}

@media (min-width: 860px) {
  .step {
    padding: 8px 40px 8px 0;
    border-radius: 0;
    background: none;
  }

  .step + .step {
    padding-left: 40px;
    border-left: 1px solid var(--line);
  }
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 2.75rem;
  line-height: 1;
  color: var(--sage-deep);
}

.step h3 {
  font-size: 1.1875rem;
}

.step p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

/* ---------- Guide (이용 안내) ---------- */

.guide__grid {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
}

@media (min-width: 900px) {
  .guide__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .guide__grid .section-head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    margin-bottom: 0;
  }
}

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.guide-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.guide-item__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-50);
  color: var(--green-700);
}

.guide-item__icon svg {
  width: 22px;
  height: 22px;
}

.guide-item h3 {
  font-size: 1.125rem;
  line-height: 1.5;
  padding-top: 8px;
}

.guide-item p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

.guide__operator {
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 0.9063rem;
}

/* ---------- Support banner ---------- */

.support {
  padding-bottom: clamp(72px, 9vw, 112px);
}

.support__card {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: var(--paper);
}

@media (min-width: 820px) {
  .support__card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 36px;
  }
}

.support__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.support__card h2 {
  color: var(--paper);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
}

.support__card p {
  margin-top: 8px;
  color: #d7e3d8;
}

.support__card .eyebrow {
  color: var(--sage-200);
  margin-bottom: 8px;
}

.support__action {
  display: grid;
  gap: 10px;
  justify-items: start;
}

@media (min-width: 820px) {
  .support__action {
    justify-items: end;
  }
}

.support__email {
  color: #d7e3d8;
  font-size: 0.9063rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 48px 40px;
  border-top: 1px solid var(--line);
  background: var(--sand);
  color: var(--ink-soft);
  font-size: 0.9063rem;
}

.site-footer__grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 760px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

.site-footer__brand p {
  margin-top: 12px;
  max-width: 30em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  background: var(--paper);
  color: var(--green-900);
}

@media (max-width: 759px) {
  .footer-links a {
    padding-left: 0;
    margin-right: 12px;
  }
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8438rem;
}

/* ---------- Legal pages ---------- */

.legal {
  padding-block: clamp(28px, 4vw, 48px) clamp(64px, 8vw, 104px);
}

.legal__wrap {
  max-width: 860px;
  margin-inline: auto;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 8px 0 4px;
  border: solid var(--sage-deep);
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.breadcrumb [aria-current="page"] {
  color: var(--forest);
}

.legal-card {
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.legal-card__head {
  padding: clamp(28px, 5vw, 52px) clamp(22px, 5vw, 56px) clamp(24px, 4vw, 40px);
  background: var(--sage-50);
  border-bottom: 1px solid var(--line);
}

.legal-card__head h1 {
  margin-top: 4px;
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem);
  line-height: 1.3;
}

.legal-card__summary {
  margin-top: 14px;
  max-width: 40em;
  color: var(--ink-soft);
  font-size: 1.0313rem;
}

.legal-card__meta {
  margin-top: 22px;
}

.legal-body {
  padding: clamp(24px, 5vw, 52px) clamp(22px, 5vw, 56px) clamp(32px, 5vw, 56px);
  font-size: 1rem;
  line-height: 1.85;
}

.legal-body > * + * {
  margin-top: 1em;
}

.legal-body h2 {
  margin-top: 2.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
}

.legal-body > h2:first-child,
.legal-body > section:first-child > h2:first-child,
.legal-body > .legal-toc + h2,
.legal-body > .legal-toc + section > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-body section + section {
  margin-top: 2.6em;
}

.legal-body section > * + * {
  margin-top: 1em;
}

.legal-body section + section > h2:first-child {
  margin-top: 0;
}

.legal-body h3 {
  margin-top: 1.8em;
  font-size: 1.0625rem;
}

.legal-body h2 + *,
.legal-body h3 + * {
  margin-top: 0.6em;
}

.legal-body ul,
.legal-body ol {
  padding-left: 1.4em;
}

.legal-body li + li {
  margin-top: 0.35em;
}

.legal-body li::marker {
  color: var(--sage-deep);
}

.legal-body strong {
  font-weight: 700;
  color: var(--forest);
}

.legal-body a {
  font-weight: 600;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.legal-body blockquote,
.legal-body .note {
  margin-inline: 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--sage-50);
  border-left: 4px solid var(--sage);
  color: var(--forest);
}

.legal-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2em;
}

/* Table of contents */

.legal-toc {
  margin-bottom: 2.4em;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legal-toc h2,
.legal-toc .legal-toc__title {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--forest);
}

.legal-toc ol,
.legal-toc ul {
  display: grid;
  gap: 2px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

@media (min-width: 640px) {
  .legal-toc ol,
  .legal-toc ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.legal-toc li {
  margin: 0;
  counter-increment: toc;
}

.legal-toc li + li {
  margin-top: 0;
}

.legal-toc a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--forest);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: none;
}

.legal-toc ol > li > a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--sage-deep);
  flex: none;
}

.legal-toc a:hover {
  background: var(--sage-50);
  color: var(--green-900);
}

/* Responsive tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legal-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Fallback when a table is not wrapped */
.legal-body > table,
.legal-body section > table {
  display: block;
  overflow-x: auto;
  min-width: 0;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line);
}

.legal-body caption {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--forest);
}

.legal-body th,
.legal-body td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-body thead th {
  background: var(--sage-50);
  font-weight: 700;
  color: var(--forest);
  white-space: nowrap;
}

.legal-body tbody tr:last-child th,
.legal-body tbody tr:last-child td {
  border-bottom: 0;
}

.legal-body tbody th {
  font-weight: 700;
  background: var(--cream);
}

.legal-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 clamp(22px, 5vw, 56px) clamp(22px, 5vw, 48px);
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--sage-50);
  font-size: 0.9375rem;
}

.legal-contact p {
  color: var(--ink-soft);
}

.legal-contact strong {
  color: var(--forest);
}

.legal__back {
  margin-top: 28px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn,
  .site-nav a,
  .footer-links a,
  .legal-toc a {
    transition: background-color 0.2s ease, color 0.2s ease,
      border-color 0.2s ease;
  }

  .skip-link {
    transition: transform 0.15s ease;
  }
}

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

/* ---------- Print ---------- */

@media print {
  .site-header,
  .skip-link,
  .support,
  .site-nav {
    display: none;
  }

  body {
    background: #fff;
  }

  .legal-card {
    box-shadow: none;
  }
}
