:root { --ink:#20241f; --paper:#f1efe9; --green:#afc7ac; --deep-green:#557b58; --coral:#ed9c84; --red:#d54d3d; }
* { box-sizing:border-box; }
html,body { margin:0;min-height:100%;background:var(--paper);color:var(--ink);touch-action:manipulation; }
body { font-family:"Nunito Sans",sans-serif; }
.brand { position:relative;width:58px;height:31px; }
.brand-tile { position:absolute;width:24px;height:24px;display:grid;place-items:center;border:1px solid var(--ink);border-radius:5px;font-weight:900;font-size:16px;box-shadow:0 1px 0 rgba(0,0,0,.12); }
.brand-tile:first-child { left:3px;top:4px;background:var(--green);transform:rotate(-10deg); }
.brand-tile:last-child { left:28px;top:2px;background:var(--coral);transform:rotate(10deg); }

.legal-page {
  --document-color: var(--green);
  width: min(100%, 760px);
  margin: auto;
  padding: 18px 17px max(24px, env(safe-area-inset-bottom));
}
.legal-page.agreement { --document-color: var(--coral); }
.legal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 4px 6px;
  border: 1px solid var(--ink);
  border-radius: 11px;
}
.legal-bar .brand { flex-shrink: 0; }
.legal-bar a { color: inherit; text-decoration: none; }
.legal-nav { display: flex; gap: 4px; }
.legal-nav a {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 4px clamp(5px, 2vw, 12px);
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 800;
}
.legal-nav a[aria-current="page"] { background: var(--document-color); border-color: var(--ink); }
.legal-nav a:hover { text-decoration: underline; }
.legal-page a:focus-visible { outline: 2px solid var(--deep-green); outline-offset: 2px; }
.legal-intro,
.legal-content {
  margin-top: 12px;
  padding: clamp(14px, 4.5vw, 30px);
  border: 1px solid var(--ink);
  border-radius: 15px;
  overflow-wrap: anywhere;
}
.legal-intro { background: var(--document-color); }
.legal-intro h1 { margin: 0; font-size: clamp(1.55rem, 5.8vw, 2.35rem); line-height: 1.08; font-weight: 900; }
.legal-intro p { margin: 10px 0 0; font-size: 0.875rem; font-weight: 700; }
.legal-content { background: #fbfaf5; line-height: 1.55; }
.legal-content section + section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #d6d5ca; }
.legal-content h2 { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.2; font-weight: 900; }
.legal-clause { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 5px; margin: 0; }
.legal-clause + .legal-clause { margin-top: 8px; }
.legal-content a { color: inherit; text-underline-offset: 0.16em; }
