/* License page (license/index.html). Fonts, colours and the page background come
   from css/base.css; this file only lays the text out. */
html{ scroll-snap-type: none; scroll-behavior: smooth; }
body.legal-page{ min-height: 100vh; }
/* base.css sets overflow-x:hidden on html/body, which turns body into a scroll container
   and stops position:sticky from working; clip hides the overflow without that side effect. */
html, body.legal-page{ overflow-x: clip; }

.legal-top{
  display: flex; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto; padding: 24px 24px 0;
}
.legal-logo img{ height: 44px; width: auto; display: block; }
.legal-back{
  font-size: 13px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.legal-back:hover{ border-bottom-color: var(--ink); }

.legal-wrap{
  max-width: 760px; margin: 0 auto;
  padding: 24px 24px 40px;
  font-size: 14px; line-height: 1.75; color: #444440;
}
.legal-wrap h1{ font-size: 26px; margin: 18px 0 12px; color: var(--ink); font-weight: 400; }
.legal-lead{ margin: 0 0 22px; }

/* The tabs stay at the top of the screen while the long texts scroll, so switching
   between the licenses never means scrolling back up first. */
.legal-tabs{
  display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px;
  position: sticky; top: 0; z-index: 5;
  padding: 12px 0; background: var(--bg);
  border-bottom: 1px solid rgba(28,28,26,.12);
}
.legal-tabs a{
  font-size: 13px; padding: 8px 20px; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; background: var(--bg);
}
.legal-tabs a:hover{ background: var(--ink); color: var(--bg); }

.legal-doc{
  margin: 0 0 56px;
  scroll-margin-top: 72px;   /* clears the sticky tabs */
}
.legal-doc + .legal-doc{ padding-top: 36px; border-top: 1.5px solid var(--ink); }
.legal-doc-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal-doc h2{ font-size: 22px; margin: 0 0 14px; color: var(--ink); font-weight: 400; }
.legal-download{
  font-size: 12px; color: #77756c; text-decoration: none; border-bottom: 1px solid #c9c6bb;
  white-space: nowrap;
}
.legal-download:hover{ color: var(--ink); border-bottom-color: var(--ink); }
.legal-doc h3{
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: #77756c; font-weight: 400;
  margin: 30px 0 8px; padding-top: 14px; border-top: 1px solid rgba(28,28,26,.1);
}
.legal-doc p{ margin: 0 0 12px; }
.legal-loading{ color: #8a8a82; }

.legal-meta{
  display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px;
  margin: 0 0 8px; font-size: 13px;
}
.legal-meta dt{ color: #77756c; }
.legal-meta dd{ margin: 0; color: var(--ink); }
.legal-meta dd.legal-meta-wide{ grid-column: 1 / -1; color: #77756c; }

.legal-list{ list-style: none; margin: 0 0 12px; padding: 0; }
.legal-list li{ position: relative; padding-left: 26px; margin: 0 0 10px; }
.legal-list li::before{ content: '—'; position: absolute; left: 0; color: #77756c; }

.legal-wrap a{ color: var(--ink); }
.legal-page footer{ padding-top: 24px; }

@media (max-width: 600px){
  .legal-top{ padding: 18px 20px 0; }
  .legal-wrap{ padding: 18px 20px 24px; font-size: 14px; }
  .legal-wrap h1{ font-size: 22px; }
  .legal-meta{ grid-template-columns: 1fr; gap: 0; }
  .legal-meta dd{ margin-bottom: 6px; }
}
