/* Legal pages for RARE Labs. Same palette and type as the main site, but a normal scrolling page. */
:root {
  --page: #E6EDEF;
  --stage: #EEF3F4;
  --panel: #F8FAFA;
  --white: #FFFFFF;
  --ink: #142F38;
  --muted: #54666C;
  --rule: #C6D3D7;
  --soft: #DFE7EA;
  --orange: #D66A30;
  --orange-text: #A9461A;
  --teal: #17414E;
  --sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gut: clamp(8px, 1.4vw, 18px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; padding: var(--gut); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--teal); }

.frame { max-width: 1200px; margin: 0 auto; border: 1px solid var(--ink); background: var(--stage); min-height: calc(100vh - 2 * var(--gut)); display: flex; flex-direction: column; }

.top { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--ink); background: var(--panel); min-height: 56px; position: sticky; top: 0; z-index: 5; }
.logo { display: flex; align-items: center; padding: 0 18px; }
.logo img { height: 32px; width: auto; display: block; }
.top nav { display: flex; }
.top nav a { display: flex; align-items: center; border-left: 1px solid var(--ink); padding: 0 clamp(12px, 2vw, 24px); font-size: 0.92rem; text-decoration: none; color: var(--ink); }
.top nav a:hover { background: var(--soft); }

.wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); flex: 1; }
.wrap > * { min-width: 0; }
.side { border-right: 1px solid var(--ink); background: var(--panel); padding: 24px 0; }
.side p { margin: 0 18px 10px; font-size: 0.8rem; color: var(--orange-text); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 9px 18px; text-decoration: none; font-size: 0.93rem; border-left: 3px solid transparent; }
.side a:hover { background: var(--soft); }
.side a[aria-current="page"] { border-left-color: var(--orange); background: var(--white); font-weight: 500; }

main { padding: clamp(24px, 4vw, 56px) clamp(18px, 5vw, 72px) 64px; max-width: 820px; }
.eyebrow { font-size: 0.8rem; color: var(--orange-text); margin: 0 0 8px; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 0.88rem; margin: 0 0 28px; }
.summary { background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--orange); padding: 16px 20px; margin: 0 0 32px; }
.summary p { margin: 0 0 8px; font-weight: 500; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 4px 0; }
h2 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.015em; font-weight: 500; margin: 40px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
h3 { font-size: 1.02rem; font-weight: 600; margin: 22px 0 6px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 5px 0; }
.caps { text-transform: uppercase; font-size: 0.88rem; letter-spacing: 0.01em; }
table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); padding: 9px 10px 9px 0; }
th { font-weight: 500; border-bottom-color: var(--ink); }
.contact { background: var(--white); border: 1px solid var(--rule); padding: 14px 18px; }
.contact p { margin: 4px 0; }

.foot { border-top: 1px solid var(--ink); background: var(--panel); padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.foot a { color: var(--ink); }
.foot .sp { margin-left: auto; }

@media (max-width: 820px) {
  .wrap { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--ink); padding: 12px 0; }
  .side p { display: none; }
  .side ul { display: flex; overflow-x: auto; }
  .side a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; padding: 8px 14px; }
  .side a[aria-current="page"] { border-bottom-color: var(--orange); }
  .foot .sp { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .logo { padding: 0 12px; }
  .logo img { height: 24px; }
  .top nav a { padding: 0 12px; font-size: 0.85rem; }
  .top nav a.hide-sm { display: none; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { border-bottom: 0; padding: 2px 0; }
  tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  td:first-child { font-weight: 500; }
}
@media print {
  body { background: #fff; padding: 0; }
  .top, .side, .foot { display: none; }
  .frame { border: 0; }
  .wrap { display: block; }
}
