/* itemlift.app shared styles: the Workpaper world (see DESIGN.md).
   Every page loads this file: the font, the tokens, the ruled pad, the
   workpaper header box, pencil marks, the footer, and reading pages.
   The home page adds home.css on top. All colors are tokens. Light only. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --pad: #e9f0e3;          /* columnar pad */
  --pad-paper: #f4f8ef;    /* boxed areas on the pad */
  --sheet: #ffffff;        /* a pinned screenshot's own white */
  --rule-row: #c9dbbf;
  --rule-col: #b2cba6;
  --ink: #17291e;          /* ledger green-black */
  --ink-soft: #3b5244;
  --graphite: #5d6b62;
  --pencil-red: #b3261c;
  --pencil-green: #1b6e35;
  --action: #17291e;
  --action-hover: #24402e;
  --action-text: #f4f8ef;
  --focus: #b3261c;
  --row: 36px;             /* the pad's row pitch */
  color-scheme: light;
  accent-color: var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule-col) var(--pad); }
body {
  margin: 0;
  color: var(--ink);
  font: 400 18px/1.55 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
  /* The pad's ruling shows in the margins; text columns sit on plain pad. */
  background-color: var(--pad);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 59px, var(--rule-col) 59px 60px),
    repeating-linear-gradient(0deg, transparent 0 calc(var(--row) - 1px), var(--rule-row) calc(var(--row) - 1px) var(--row));
}
::selection { background: var(--ink); color: var(--pad); }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }

h1, h2, h3 { font-stretch: 87%; letter-spacing: -0.01em; text-wrap: balance; color: var(--ink); }
h1 { font-weight: 760; font-size: clamp(38px, 4.4vw, 60px); line-height: 1.06; margin: 0 0 22px; }
h2 { font-weight: 720; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; margin: 0 0 14px; }
h3 { font-weight: 680; font-size: 20px; line-height: 1.25; margin: 0 0 4px; }
small, th, figcaption, .legend dt span, .wp-box small, .sign-line span, .updated {
  font-stretch: 75%; font-weight: 640; letter-spacing: 0.07em; text-transform: uppercase;
}

/* Pencil marks: filled tapered strokes, never glyphs.
   Tick code: red = agreed to preview, green = protected, circled cross = undone,
   ink tick = included, graphite cross = missing. */
.mark { width: 28px; height: 24px; flex: none; fill: currentColor; stroke: none; }
.mark.red { color: var(--pencil-red); }
.mark.green { color: var(--pencil-green); }
.mark.ink { color: var(--ink); }
.mark.graphite { color: var(--graphite); }
@media (prefers-reduced-motion: no-preference) {
  /* The clip exists only while drawing ("backwards" holds the first frame during
     the delay); afterwards the mark is a plain shape, so nothing can stay clipped. */
  .draw { animation: pencil 560ms cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .d1 { animation-delay: 300ms; } .d2 { animation-delay: 480ms; } .d3 { animation-delay: 660ms; }
  .d4 { animation-delay: 900ms; } .d5 { animation-delay: 1060ms; } .d6 { animation-delay: 1220ms; }
}
@keyframes pencil { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Workpaper header box: the navigation, captioned with workpaper fields. */
.wp-head { padding-top: 28px; }
.wp-box { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; border: 2px solid var(--ink); background: var(--pad-paper); }
.wp-box .cell {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 76px; padding: 12px 18px; border-left: 1px solid var(--ink);
  text-decoration: none; font-weight: 600; font-size: 19px;
}
.wp-box .cell:first-child { border-left: 0; }
.wp-box small { font-size: 12px; color: var(--ink-soft); }
.wp-box .name { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 720; font-stretch: 87%; }
.wp-box .name img { width: 28px; height: 28px; }
.wp-box .cell:hover { background: var(--pad); }
.wp-box .cell[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--ink); }
.wp-box .action { background: var(--action); color: var(--action-text); }
.wp-box .action small { color: var(--rule-row); }
.wp-box .action:hover { background: var(--action-hover); }

.button {
  display: inline-block; background: var(--action); color: var(--action-text);
  font-weight: 680; font-size: 19px; text-decoration: none; padding: 15px 26px;
  border: 2px solid var(--action);
}
.button:hover { background: var(--action-hover); }
button.button { font-family: inherit; cursor: pointer; line-height: inherit; }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--pad-paper); }

/* Join the free beta: one email field and the button, posting to /beta/join
   (src/worker.js emails the sign-up to the support inbox). */
.join { margin: 0; }
.join label { display: block; font-stretch: 75%; font-weight: 640; letter-spacing: 0.07em; text-transform: uppercase; font-size: 12px; color: var(--ink-soft); margin-bottom: 6px; }
.join-row { display: flex; flex-wrap: wrap; gap: 10px; }
.join input[type="email"] {
  flex: 1 1 260px; min-width: 0; font: inherit; font-size: 18px; color: var(--ink);
  background: var(--pad-paper); border: 2px solid var(--ink); padding: 13px 14px; border-radius: 0;
}
.join input[type="email"]::placeholder { color: var(--graphite); }
.join input[type="email"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.join .button { flex: none; }
.join-note { margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Questions, with a drawn pencil chevron instead of the browser's triangle */
.faq details, .doc details { border-bottom: 1px solid var(--rule-col); padding: 16px 0; }
.faq details:first-of-type, .doc details:first-of-type { border-top: 2px solid var(--ink); }
.faq details:first-of-type { margin-top: 24px; }
.faq summary, .doc summary { cursor: pointer; font-weight: 640; font-size: 19px; font-stretch: 87%; list-style: none; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker, .doc summary::-webkit-details-marker { display: none; }
.faq summary::before, .doc summary::before {
  content: ""; flex: none; width: 14px; height: 14px; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%2317291e' d='M3.4 1.2c3 1.6 5.6 3.5 8 5.4.4.3.4.8 0 1.1-2.5 1.9-5 3.8-8 5.3-.6.2-1-.4-.6-.8 2.3-1.6 4.5-3.2 6.6-5C7.3 5.5 5.1 4 2.8 2.2c-.4-.5.1-1.2.6-1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.faq details[open] summary::before, .doc details[open] summary::before { transform: rotate(90deg); }
.faq details p, .doc details p { color: var(--ink-soft); margin: 10px 0 0 26px; max-width: 68ch; }

/* Reading pages (help, privacy, terms, launch, disconnected): one workpaper
   sheet of plain pad, headed by a ruled title block. */
.page { padding: 56px 0 80px; }
.page .wrap { background: var(--pad); }
.doc h1 { font-size: clamp(34px, 4vw, 52px); padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 18px; }
.doc h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 44px 0 10px; }
.doc h3 { margin-top: 24px; }
.doc p, .doc li { max-width: 68ch; }
.doc p { margin: 0 0 14px; }
.doc .lead { font-size: 21px; color: var(--ink-soft); margin-bottom: 24px; }
.doc .updated { display: block; font-size: 12px; color: var(--ink-soft); margin: -6px 0 28px; }
.doc ul { padding-left: 22px; margin: 0 0 16px; }
.doc ul li { margin: 6px 0; }
.doc ul li::marker { color: var(--graphite); }
.doc ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 8px 0 20px; border-top: 2px solid var(--ink); }
.doc ol.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--rule-col); }
.doc ol.steps li::before { content: counter(step); font-stretch: 75%; font-weight: 760; font-size: 30px; line-height: 1; }
.doc .small { font-size: 15px; color: var(--ink-soft); }
.doc .send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 4px 0 8px; }
.doc .send .link { font-weight: 600; }
.doc .address { font-size: clamp(24px, 3vw, 32px); font-weight: 720; font-stretch: 87%; padding: 10px 0; margin: 0 0 10px; border-top: 1px solid var(--rule-col); border-bottom: 1px solid var(--rule-col); user-select: all; }
.doc .note { border: 1px solid var(--ink); background: var(--pad-paper); padding: 14px 18px; margin: 20px 0; }
.doc kbd, .doc code { font: inherit; font-size: 0.92em; background: var(--pad-paper); border: 1px solid var(--rule-col); padding: 0 6px; }

/* Footer */
.site-foot { padding: 32px 0 48px; color: var(--ink-soft); font-size: 15px; border-top: 1px solid var(--ink); background: var(--pad-paper); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.site-foot p { margin: 6px 0; }
.site-foot a { color: var(--ink-soft); }

@media (max-width: 640px) {
  /* No margins to rule on a phone: the pad is plain. */
  body { background-image: none; }
  .wrap { padding: 0 16px; }
  .wp-box { grid-template-columns: 1fr 1fr; }
  .wp-box .cell { min-height: 64px; padding: 10px 14px; font-size: 17px; }
  .wp-box .name { font-size: 19px; }
  .wp-box .cell:nth-child(3) { border-left: 0; }
  .wp-box .cell:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .page { padding: 40px 0 56px; }
}
