/* CaelbertChae.com — Shared Legal Center V2.11 */
:root {
  --bg-a: #ffffff;
  --bg-b: #fbfbfd;
  --panel: rgba(255, 255, 255, .88);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #86868b;
  --line: rgba(29, 29, 31, .12);
  --accent: #0066cc;
  --success: #1b7f43;
  --focus: #0071e3;
}

html[data-period="morning"] { --bg-a:#fffaf2; --bg-b:#f8f3ea; }
html[data-period="day"] { --bg-a:#fff; --bg-b:#fbfbfd; }
html[data-period="evening"] { --bg-a:#faedd8; --bg-b:#e9cb94; }
html[data-period="night"] {
  color-scheme: dark;
  --bg-a:#000;
  --bg-b:#1c1c1e;
  --panel:rgba(28,28,30,.9);
  --ink:#f5f5f7;
  --muted:#a1a1a6;
  --soft:#86868b;
  --line:rgba(245,245,247,.15);
  --accent:#2997ff;
  --success:#43a866;
  --focus:#2997ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-a), var(--bg-b));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  transition: background .35s ease, color .35s ease;
}

a, button, input { font: inherit; }
a { color: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: #0071e3;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(100% - 48px, 1184px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
}

.brand:hover { color: var(--ink); }
.brand-logo { width: 24px; height: 24px; }

.header-nav,
.language-switch,
.legal-footer-links {
  display: flex;
  align-items: center;
}

.header-nav { gap: 26px; }

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] { color: var(--ink); }

.language-switch {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.language-switch button {
  position: relative;
  padding: 2px 8px;
  border: 0;
  color: var(--soft);
  background: none;
  cursor: pointer;
  font-size: 12px;
}

.language-switch button + button::before,
.legal-footer-links a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 11px;
  background: var(--line);
  transform: translateY(-50%);
}

.language-switch button.active {
  color: var(--ink);
  font-weight: 600;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  justify-content: center;
  gap: 72px;
  padding-top: 76px;
  padding-bottom: 112px;
}

.legal-rail {
  align-self: start;
  position: sticky;
  top: 78px;
}

.legal-rail-title {
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-rail nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legal-rail a {
  padding: 7px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.legal-rail a:hover,
.legal-rail a[aria-current="page"] { color: var(--ink); }
.legal-rail a[aria-current="page"] { font-weight: 600; }

.legal-article { min-width: 0; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
}

.legal-article h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 650;
}

.effective-date {
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.legal-summary {
  margin: 42px 0 58px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.legal-section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.22;
  letter-spacing: -.02em;
}

.legal-section h3 {
  margin: 26px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.legal-section p { margin: 0 0 14px; color: var(--muted); }
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.legal-section li { margin: 8px 0; }
.legal-section strong { color: var(--ink); font-weight: 600; }
.legal-section a { color: var(--accent); text-underline-offset: 3px; }

.legal-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.legal-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

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

.legal-table tr:last-child td { border-bottom: 0; }
.legal-table th { color: var(--ink); font-weight: 600; }
.legal-table td { color: var(--muted); }

.settings-panel {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-of-type { border-bottom: 0; }
.setting-copy strong { display: block; margin-bottom: 3px; }
.setting-copy span { color: var(--muted); font-size: 14px; }

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #b9b9bd;
  cursor: pointer;
  transition: background .18s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  transition: transform .18s ease;
}

.switch input:checked + .switch-track { background: #34c759; }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid color-mix(in srgb, var(--focus) 36%, transparent); }
.switch input:disabled + .switch-track { opacity: .52; cursor: not-allowed; }

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}

.settings-actions button {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.settings-actions .primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.settings-actions button:hover { filter: brightness(.96); }

.settings-status {
  min-height: 24px;
  margin: 14px 22px 20px;
  color: var(--success);
  font-size: 14px;
}

.site-footer {
  padding: 0 0 20px;
  color: var(--soft);
  font-size: 12px;
}

.footer-inner {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
}

.legal-footer-links { flex-wrap: wrap; }

.legal-footer-links a {
  position: relative;
  padding-inline: 10px;
  color: var(--soft);
  text-decoration: none;
}

.legal-footer-links a:first-child { padding-left: 0; }
.legal-footer-links a:hover,
.legal-footer-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.footer-language { margin-left: auto; }

@media (max-width: 820px) {
  .shell { width: min(100% - 32px, 720px); }
  .site-header { min-height: 52px; }
  .header-nav > a:not([aria-current="page"]) { display: none; }
  .header-nav { gap: 12px; }
  .language-switch { padding-left: 10px; }
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 48px;
    padding-bottom: 80px;
  }
  .legal-rail { position: static; }
  .legal-rail nav { flex-direction: row; flex-wrap: wrap; gap: 6px 20px; }
  .legal-rail a { padding: 3px 0; }
  .legal-article h1 { font-size: clamp(40px, 12vw, 58px); }
  .legal-summary { margin: 34px 0 46px; padding: 20px; }
  .legal-section { padding: 28px 0; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-language { margin-left: 0; }
}

@media (max-width: 520px) {
  .brand span { display: none; }
  .setting-row { grid-template-columns: 1fr auto; padding: 18px; }
  .settings-actions { padding: 18px; }
}

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