/* ============================================================
   Nanocal — shared styles for the legal pages
   Used by legal.html plus the six documents, so they don't each
   carry a copy of the same rules.
   NOTE: index.html styles itself inline and has its own copy of
   these tokens. Changing a colour, font or spacing value here does
   NOT reach the landing page — update both.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root{
  --ink:   #000;
  --ink-2: rgba(60,60,67,.60);
  --ink-3: rgba(60,60,67,.30);
  --line:  rgba(60,60,67,.18);
  --bg:    #fff;
  --pad:   clamp(20px, 5vw, 48px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

html{ -webkit-text-size-adjust: 100%; }

/* These pages are short — most documents are still just a placeholder box.
   Without pinning the footer to the bottom, it would sit right under a short
   page's content instead of at the bottom of the screen, leaving a slab of
   empty white space below it. min-height + flex column holds it down there;
   `main.wrap{ flex: 1 }` is what actually pushes it — see below. */
html, body{ height: 100%; }
body{
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img{ display:block; max-width:100%; }
a{ color: inherit; }

.wrap{ max-width: 760px; margin: 0 auto; padding: 0 var(--pad); flex: 1; }

/* ============================================================
   HEADER
   ============================================================ */
/* Fixed height so the brand row and <h1> land in the same place whether this
   holds one crumb (the hub, back to Home) or two (every document, back to
   Home AND to the hub) — otherwise the second link's own height plus the gap
   push everything below it down on documents but not on the hub.
   box-sizing is border-box, so padding-top counts toward min-height: 30px
   padding + 46px for two stacked crumbs (each renders at 18px tall — line-
   height, not the 15px font-size — plus the 10px gap) = 76px. */
.top{
  padding-top: 30px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-height: 76px;
  justify-content: center;
}

.top .crumb-sep{ display: none; }

.back{
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  font-size: 15px; font-weight: 500;
  color: var(--ink-2);
  transition: color .2s ease;
}
.back:hover{ color: var(--ink); }
.back svg{
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.brand{ display:flex; align-items:center; gap: 11px; margin-top: 46px; }
.brand img{ width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.brand span{ font-size: 16px; font-weight: 600; letter-spacing: -.01em; }

h1{
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05; letter-spacing: -.032em; font-weight: 700;
  margin: 20px 0 0;
}
.lede{
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5;
  color: var(--ink-2);
  margin: 14px 0 0; max-width: 46ch;
}

/* ============================================================
   DOCUMENT LIST (legal.html)
   Rows rather than buttons — the same top-border rhythm the
   privacy section on the home page uses.
   ============================================================ */
.docs{ list-style: none; margin: clamp(32px, 6vh, 54px) 0 0; padding: 0; }
.docs li{ border-top: 1px solid var(--line); }

.docs a{
  display: flex; align-items: center; gap: 16px;
  padding: 21px 2px;
  text-decoration: none;
  transition: padding .22s cubic-bezier(.2,.8,.2,1);
}
.docs a:hover{ padding-left: 10px; padding-right: 0; }

.docs .name{
  flex: 1 1 auto;
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 600; letter-spacing: -.015em;
}
/* language sits under the title, so a long localised name never has to
   compete with it for room on a narrow screen */
.docs .name small{
  display: block;
  font-size: 14px; font-weight: 400; letter-spacing: 0;
  color: var(--ink-2);
  margin-top: 3px;
}
.docs .chev{
  flex: 0 0 auto; width: 8px; height: 14px;
  fill: none; stroke: var(--ink-3); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .22s ease;
}
.docs a:hover .chev{ stroke: var(--ink); }

/* ============================================================
   DOCUMENT BODY (the five documents)
   ============================================================ */
.doc-meta{ font-size: 14px; color: var(--ink-2); margin: 16px 0 0; }

.doc-body{
  margin: clamp(32px, 6vh, 54px) 0 0;
  font-size: 16.5px; line-height: 1.62;
}
.doc-body h2{
  font-size: clamp(20px, 2.2vw, 25px);
  letter-spacing: -.02em; font-weight: 700;
  margin: 40px 0 10px;
}
.doc-body h2:first-child{ margin-top: 0; }
.doc-body p{ margin: 0 0 16px; }
.doc-body ul{ margin: 0 0 16px; padding-left: 22px; }
.doc-body li{ margin-bottom: 6px; }

/* Body text otherwise inherits plain black with no underline (see the global
   `a{ color: inherit }` reset), which is right for the nav/back/footer links
   but leaves an inline link sitting in a paragraph indistinguishable from the
   text around it. This is the one place prose needs to visibly say "tap me". */
.doc-body a{
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 2px;
  transition: text-decoration-color .2s ease;
}
.doc-body a:hover{ text-decoration-color: var(--ink); }

/* Placeholder for the documents that haven't been written yet.
   Delete the .placeholder block and write into .doc-body instead. */
.placeholder{
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 38px 26px;
  text-align: center;
  color: var(--ink-2);
  font-size: 15px; line-height: 1.55;
}

/* ============================================================
   FOOTER
   ============================================================ */
/* The footer sits OUTSIDE .wrap in the markup, on purpose. Inside it, the rule
   could only ever be as wide as the 760px reading column and read as a short
   line floating in the middle of a wide screen. Out here the border spans the
   full viewport and only the content is contained. */
.foot{
  margin-top: clamp(56px, 10vh, 104px);
  border-top: 1px solid var(--line);
}
.foot-inner{
  max-width: 1240px; margin: 0 auto;
  padding: 26px var(--pad) 44px;
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--ink-2);
}
.foot nav{ display: flex; flex-wrap: wrap; gap: 24px; }
.foot a{ text-decoration: none; transition: color .2s ease; }
.foot a:hover{ color: var(--ink); }

@media (max-width: 600px){
  .foot-inner{ flex-direction: column; align-items: flex-start; }
  .brand{ margin-top: 34px; }
}
