:root {
  color-scheme: light;
  --paper: #fffaf5;
  --surface: #fff;
  --ink: #382722;
  --muted: #78645d;
  --line: #eaded5;
  --accent: #8d352f;
  --accent-dark: #69231f;
  --soft: #f7eae2;
  font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 90% 0, #f6e2d6 0, transparent 28rem), var(--paper); }
a { color: var(--accent-dark); text-underline-offset: .18em; }
button, input { font: inherit; }

.legal-skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: #111;
  transform: translateY(-170%);
}
.legal-skip-link:focus { transform: none; }

.legal-site-header {
  width: min(1120px, calc(100% - 32px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.legal-brand img { width: 42px; height: 42px; }
.legal-brand strong, .legal-brand small { display: block; }
.legal-brand strong { letter-spacing: -.035em; }
.legal-brand strong span { color: var(--accent); }
.legal-brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.legal-site-header nav { display: flex; align-items: center; gap: 18px; }
.legal-site-header nav a { font-size: 14px; font-weight: 750; text-decoration: none; }
.legal-site-header .legal-create { padding: 10px 15px; border-radius: 999px; color: #fff; background: var(--accent); }

.legal-shell { width: min(880px, calc(100% - 32px)); margin: 52px auto 70px; }
.legal-hero { max-width: 720px; margin-bottom: 28px; }
.legal-hero > p { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.legal-hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 7vw, 62px); font-weight: 500; letter-spacing: -.045em; line-height: 1.02; }
.legal-intro { max-width: 680px; margin-top: 18px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.legal-card { padding: clamp(24px, 5vw, 52px); border: 1px solid var(--line); border-radius: 28px; background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 24px 70px rgba(72, 44, 34, .08); }
.legal-card h2 { margin: 2.2em 0 .55em; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; letter-spacing: -.02em; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 { margin: 1.8em 0 .45em; font-size: 17px; }
.legal-card p, .legal-card li { color: #58443d; font-size: 15.5px; line-height: 1.75; }
.legal-card ul { padding-left: 1.3em; }
.legal-card li + li { margin-top: .5em; }
.legal-updated { padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px !important; }
.legal-note { padding: 16px 18px; border-radius: 16px; background: var(--soft); }
.legal-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.legal-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid var(--accent); border-radius: 12px; color: #fff; background: var(--accent); font-weight: 800; cursor: pointer; text-align: center; text-decoration: none; }
.legal-button:hover { background: var(--accent-dark); }
.legal-button:disabled { cursor: not-allowed; opacity: .55; }
.legal-button-secondary { color: var(--accent-dark); background: #fff; }
.legal-button-danger { border-color: #a11f24; background: #a11f24; }
.legal-field { display: grid; gap: 7px; margin: 20px 0; }
.legal-field span { font-size: 13px; font-weight: 800; }
.legal-field input { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #cdbdb4; border-radius: 11px; color: var(--ink); background: #fff; }
.legal-check { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0; color: #58443d; font-size: 14px; line-height: 1.55; }
.legal-check input { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 0; accent-color: var(--accent); }
.account-status { min-height: 24px; color: var(--muted); }
.account-status.is-error { color: #9d2024; }
.account-status.is-success { color: #28653d; }
.account-pass-card { margin: 24px 0; padding: 19px 20px; border: 1px solid #dfc8bf; border-radius: 17px; background: linear-gradient(135deg, #fff8f6, #f8eee8); }
.account-pass-card > p:first-child { margin: 0 0 3px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.legal-card .account-pass-card h3 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.account-pass-card .account-pass-status { margin: 12px 0 4px; color: #3e5f48; font-weight: 850; }
.account-pass-card #accountPassDetail { margin: 0; font-size: 14px; }
.danger-zone { border-color: #e6c5c5; }

.legal-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--muted);
  font-size: 12px;
}
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legal-footer a { display: inline-flex; min-height: 28px; align-items: center; color: inherit; }
.legal-footer span { margin-left: auto; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #075fbd;
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .legal-button,
  .legal-site-header .legal-create,
  .legal-card,
  .account-pass-card,
  .legal-field input {
    border: 1px solid ButtonText;
  }
  .legal-skip-link { border: 1px solid CanvasText; }
}

@media (max-width: 640px) {
  .legal-site-header { min-height: 68px; }
  .legal-brand small, .legal-site-header nav > a:first-child { display: none; }
  .legal-brand img { width: 36px; height: 36px; }
  .legal-site-header nav { gap: 8px; }
  .legal-shell { margin-top: 34px; }
  .legal-card { border-radius: 20px; }
  .legal-footer span { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
