:root {
  --bg: #faf7f2;
  --surface: #fffdfa;
  --surface-muted: #f3eee7;
  --text: #171412;
  --muted: #6a5e57;
  --line: rgba(70, 49, 38, 0.14);
  --accent: #d7643a;
  --accent-deep: #a93820;
  --focus: rgba(215, 100, 58, 0.22);
  --container: min(1080px, calc(100vw - 32px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
}

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

.legal-shell {
  width: var(--container);
  margin: 0 auto;
}

.legal-header,
.legal-footer {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 247, 242, 0.92);
}

.legal-header__inner,
.legal-footer__inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.legal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  margin-top: 64px;
}

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

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  font-weight: 800;
}

.brand__text {
  display: grid;
  gap: 1px;
}

.brand__name {
  font-weight: 800;
}

.brand__tagline,
.legal-muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-nav,
.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 700;
}

.legal-hero {
  padding: 64px 0 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-hero h1,
.legal-section h2,
.policy-body h2 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

.legal-hero h1 {
  max-width: 820px;
  margin-top: 18px;
  font-size: clamp(2.25rem, 6vw, 4rem);
}

.legal-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
}

.legal-card,
.policy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.legal-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
  color: var(--text);
}

.legal-card:hover {
  border-color: rgba(169, 56, 32, 0.35);
}

.legal-card strong {
  line-height: 1.35;
}

.legal-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-card small {
  color: var(--accent-deep);
  font-weight: 800;
}

.legal-section {
  padding-top: 36px;
}

.legal-section h2 {
  margin-bottom: 16px;
  font-size: 1.45rem;
}

.policy-card {
  padding: clamp(18px, 4vw, 34px);
}

.policy-body {
  display: grid;
  gap: 26px;
  max-width: 860px;
}

.policy-body h2 {
  font-size: 1.35rem;
}

.policy-body h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
}

.policy-body p,
.policy-body ul {
  margin: 8px 0 0;
}

.policy-body li + li {
  margin-top: 6px;
}

.metadata-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

.metadata-table th {
  width: 34%;
  color: var(--muted);
  font-weight: 800;
}

.metadata-table tr:last-child th,
.metadata-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 700px) {
  .legal-header__inner,
  .legal-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .metadata-table th,
  .metadata-table td {
    display: block;
    width: 100%;
  }

  .metadata-table th {
    border-bottom: 0;
    padding-bottom: 2px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #221d1a;
    --surface-muted: #2b2420;
    --text: #fff8f2;
    --muted: #d1c3ba;
    --line: rgba(255, 238, 224, 0.14);
    --accent-deep: #ffb08b;
  }

  .legal-header,
  .legal-footer {
    background: rgba(23, 20, 18, 0.94);
  }
}
