/* Clipping Studio – public pages. Colors match brand_logo.py (INK, PAPER, SIGNAL). */

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

:root {
  --ink: #0b0b0b;
  --paper: #f2f2ee;
  --signal: #ff4a1c;
  --bg: var(--paper);
  --text: var(--ink);
  --muted: #55554f;
  --line: #d6d6cf;
  --card: #fafaf7;
  --todo-bg: #ffe08a;
  --todo-text: #3d2e00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --text: var(--paper);
    --muted: #a9a9a2;
    --line: #2b2b29;
    --card: #151514;
    --todo-bg: #5c4500;
    --todo-text: #ffe9a8;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
a:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand b { font-weight: 900; font-stretch: 112%; font-size: 1.6rem; letter-spacing: -0.02em; }
.brand span { font-weight: 600; font-size: 0.62rem; letter-spacing: 0.42em; margin-top: 0.3rem; border-top: 2px solid var(--signal); padding-top: 0.25rem; }
.brand:hover { color: inherit; }
.lang { font-size: 0.9rem; font-weight: 600; }

/* content */
main { padding: 2.5rem 0 4rem; }
h1 { font-weight: 800; font-stretch: 108%; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h2 { font-weight: 750; font-size: 1.35rem; line-height: 1.25; margin: 2.75rem 0 0.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
h3 { font-weight: 700; font-size: 1.08rem; margin: 1.75rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.3em; overflow-wrap: anywhere; }
.meta { color: var(--muted); margin-bottom: 2rem; }
.lead { font-size: 1.2rem; line-height: 1.55; }
address { font-style: normal; }

.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--signal); border-radius: 6px; padding: 1rem 1.15rem; margin: 1.5rem 0; }
.note > :last-child { margin-bottom: 0; }

mark.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 0.2em; border-radius: 3px; }

/* tables scroll inside themselves on phones instead of widening the page */
.table { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.95rem; }
td code { white-space: nowrap; overflow-wrap: normal; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
th { background: var(--card); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 9rem; }

/* start page */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 0.75rem; margin: 1.5rem 0 2rem; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1rem 1rem 3.4rem; position: relative; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 1rem; top: 0.95rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--signal); color: var(--ink); font-weight: 800; display: grid; place-items: center; font-size: 0.9rem; }
.steps b { display: block; }
.button { display: inline-block; background: var(--text); color: var(--bg); font-weight: 700; text-decoration: none; padding: 0.7rem 1.1rem; border-radius: 6px; }
.button:hover { color: var(--bg); background: var(--signal); }

/* footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; padding: 1.5rem 0 2.5rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-bottom: 0.5rem; }
.foot a { color: var(--text); }
