/* Cicada Clock — the legal documents.
 *
 * These pages used to carry a night-yard palette of their own, which made
 * them read as a different product from the site they hang off. They now
 * share the marketing page's warm paper, its ink, and its accent, in both
 * light and dark. Theme follows the OS unless data-theme is set on <html>.
 */
:root {
  color-scheme: light;
  --paper: #f5eee4;
  --paper-2: #ece0d0;
  --surface: #fdf9f3;
  --ink: #6d302b;
  --ink-soft: #85645a;
  --faint: #7d5e52;
  --accent: #a84734;
  --accent-soft: #eac8b1;
  --leaf: #5c7a4a;
  --line: #6d302b25;
  --line-soft: #6d302b14;
  --shadow: #6d302b1f;
  /* The cicada mark's body; ivory in the dark palettes below. */
  --mark-body: #221c18;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #17110d;
  --paper-2: #1e1711;
  --surface: #241d16;
  --ink: #f2e2d4;
  --ink-soft: #bda595;
  --faint: #93796b;
  --accent: #e08a6a;
  --accent-soft: #8a5233;
  --leaf: #9ac184;
  --line: #f2e2d422;
  --line-soft: #f2e2d412;
  --shadow: #00000066;
  --mark-body: #efe6d2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #17110d;
    --paper-2: #1e1711;
    --surface: #241d16;
    --ink: #f2e2d4;
    --ink-soft: #bda595;
    --faint: #93796b;
    --accent: #e08a6a;
    --accent-soft: #8a5233;
    --leaf: #9ac184;
    --line: #f2e2d422;
    --line-soft: #f2e2d412;
    --shadow: #00000066;
    --mark-body: #efe6d2;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a {
  color: inherit;
}
a:hover {
  color: var(--accent);
}
em {
  font-family: var(--serif);
}
.wrap {
  width: min(1180px, calc(100% - 112px));
  margin-inline: auto;
}

/* A soft wash rather than the old night sky. */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 18% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(50% 40% at 100% 8%, var(--paper-2), transparent 72%);
  opacity: 0.5;
}
.grain {
  display: none;
}

/* Header */
.shell {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(9px);
}
.shell-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
}
.mark img {
  /* The app's cicada is 2.51:1; 56 x 22 keeps it. */
  width: 56px;
  height: auto;
  flex: none;
}
/* Plum-lined cicada on the light page, the app's pale one on the dark. */
.mark .mark-dark { display: none; }
:root[data-theme="dark"] .mark .mark-light { display: none; }
:root[data-theme="dark"] .mark .mark-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark .mark-light { display: none; }
  :root:not([data-theme="light"]) .mark .mark-dark { display: block; }
}
.cc-mark-body {
  fill: var(--mark-body);
}
.menu {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12px;
}
.menu a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.menu a:hover {
  color: var(--accent);
}

/* Document body */
.doc {
  padding-block: 70px 90px;
}
.doc-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 30px;
  margin-bottom: 44px;
}
.doc-head h1,
.title {
  font-size: clamp(42px, 5.4vw, 74px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.02;
  margin: 0;
}
.meta {
  margin: 16px 0 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.doc article {
  max-width: 760px;
}
.doc article h2 {
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 52px 0 14px;
}
.doc article p,
.doc article li {
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.doc article strong {
  color: var(--ink);
  font-weight: 600;
}
.doc article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc article ul {
  padding-left: 0;
  list-style: none;
}
.doc article li {
  position: relative;
  padding-left: 22px;
}
.doc article li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 8px !important;
  box-shadow: 0 16px 34px -28px var(--shadow);
}
.doc article table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0 26px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.doc article th,
.doc article td {
  text-align: left;
  vertical-align: top;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.doc article th {
  font-weight: 500;
  background: var(--paper-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc article tr:last-child td {
  border-bottom: 0;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 30px 0 40px;
  padding: 0;
  list-style: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 56px;
  font-size: 12px;
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
}
.foot-grid p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.foot-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}
.foot-nav a:hover {
  color: var(--accent);
}
.legal {
  margin: 30px 0 0;
  font-size: 10px;
  line-height: 1.85;
  color: var(--faint);
  max-width: 860px;
}

/* Theme toggle — same control as the marketing page. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 7px 13px 7px 10px;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
}
.theme-toggle-icon {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  flex: none;
}
.theme-toggle[aria-pressed="true"] .theme-toggle-icon {
  background: linear-gradient(90deg, transparent 50%, currentColor 50%);
}

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

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 48px);
  }
  .hide-sm {
    display: none;
  }
}
@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .hide-xs {
    display: none;
  }
  .doc {
    padding-block: 44px 60px;
  }
  .doc article h2 {
    font-size: 22px;
    margin-top: 40px;
  }
  .notice {
    padding: 18px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Keep the brand and every legal navigation control reachable on phones. */
@media (max-width: 700px) {
  .shell-in { height: auto; min-height: 78px; flex-wrap: wrap; gap: 12px; padding-block: 16px; }
  .menu { flex-wrap: wrap; gap: 18px; }
  .doc article { overflow-wrap: anywhere; }
}
