/* Content pages (guides, tool pages, the free invoice generator): the same
   tokens, header and footer as the landing (index.html), without its auth
   modal. Pages are generated by scripts/build-pages.mjs. */
/* Dark only since 22 Oct 2026, the landing's look: near-black ground with
   the page grid, hairline cards, electric-blue actions with a glow. */
:root {
  --desk: #08090A; --surface: #121316; --surface-2: #181A1E; --doc: #121316;
  --ink: #EDEEF0; --ink-2: #D9DCE1; --muted: #A1A6AE; --faint: #6B7079; --faint-2: #5E636B;
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.06); --chip: rgba(255,255,255,.05); --chip-2: rgba(255,255,255,.03);
  --accent: #4D7CFF; --accent-hover: #6E95FF; --on-accent: #FFFFFF; --stamp: #6E95FF; --accent-text: #A9BEFF;
  --fight-bg: rgba(248,113,113,.10); --fight-fg: #FCA5A5; --neg-bg: rgba(251,191,36,.10); --neg-fg: #FDE68A; --std-bg: rgba(255,255,255,.06); --std-fg: #B4B8BF;
  --ok: #34D399; --ok-soft: rgba(52,211,153,.09);
  --shadow: rgba(0,0,0,.5); --shadow-2: rgba(0,0,0,.6);
  --header-bg: rgba(8,9,10,.62);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse 50% 480px at 50% 100%, rgba(77,124,255,.34), rgba(77,124,255,.1) 55%, transparent 80%) no-repeat, var(--desk); color: var(--ink); font-family: 'Golos Text', system-ui, sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
/* The page grid and a soft light at the top, as on the landing. */
body { position: relative; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
body::after { content: ""; position: absolute; left: 50%; top: -260px; width: min(1000px, 100%); height: 600px; transform: translateX(-50%); z-index: -1; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(77,124,255,.28), transparent); filter: blur(30px); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.016em; color: var(--ink); }
p { margin: 0; }
svg { display: block; }
button, input, select, textarea { font-family: inherit; }
.show-xs { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1.2 'Golos Text', system-ui, sans-serif; border: 1px solid transparent; border-radius: 11px; padding: 12px 18px; min-height: 44px; cursor: pointer; text-decoration: none; transition: box-shadow .25s, transform .25s, background .2s, border-color .2s; }
.btn-sm { min-height: 40px; padding: 9px 14px; font-size: 14px; }
.btn-lg { min-height: 50px; padding: 14px 22px; font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1px rgba(140,168,255,.3), 0 8px 26px rgba(77,124,255,.3); }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(140,168,255,.7), 0 0 36px rgba(77,124,255,.6); transform: translateY(-1px); }
.btn-soft { background: rgba(255,255,255,.03); color: var(--ink); border-color: rgba(255,255,255,.12); }
.btn-soft:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.22); }
.btn-ghost { background: transparent; color: #B4B8BF; padding: 9px 8px; }
.btn-ghost:hover { color: var(--ink); }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; flex: 0 0 auto; }
.icon-btn:hover { color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line-2); }
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 26px; height: 26px; color: var(--ink); flex: 0 0 auto; }
.logo-mark .logo-fold { color: var(--accent-hover); }
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: -0.005em; }
.logo-text span { color: var(--accent-text); font-weight: 500; }
.main-nav { display: flex; gap: 26px; font-size: 15px; }
.main-nav a { color: var(--muted); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.mobile-nav { display: none; }
.header-right { display: flex; align-items: center; gap: 10px; }

/* Article */
.page { max-width: 760px; margin: 0 auto; padding: 40px 32px 72px; }
.page-wide { max-width: 1100px; }
.crumbs { font-size: 14px; color: var(--faint); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.page h1 { font-size: clamp(34px, 4.8vw, 52px); line-height: 1.08; font-weight: 600; letter-spacing: -0.022em; }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); margin-top: 18px; }
.meta { font-size: 13.5px; color: var(--faint); margin-top: 14px; }
.page h2 { font-size: 26px; line-height: 1.2; margin: 44px 0 14px; }
.page h3 { font-size: 19px; margin: 28px 0 8px; }
.page p { margin: 0 0 14px; }
.page ul, .page ol { padding-left: 22px; margin: 0 0 16px; }
.page li { margin-bottom: 8px; }
.page li::marker { color: var(--faint); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 14.5px; color: var(--muted); margin: 22px 0; }
.clause { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); background: rgba(248,113,113,.05); border: 1px solid rgba(248,113,113,.35); border-radius: 10px; padding: 14px 16px; margin: 14px 0; box-shadow: 0 0 24px rgba(248,113,113,.08); }
.clause.better { background: rgba(52,211,153,.05); border-color: rgba(52,211,153,.35); box-shadow: 0 0 24px rgba(52,211,153,.07); color: #A7F3D0; }
.clause-label { display: block; font-family: 'Golos Text', system-ui, sans-serif; font-size: 12.5px; font-weight: 600; color: var(--faint); margin-bottom: 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: border-color .3s, box-shadow .3s; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 15px; color: var(--muted); }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: rgba(110,149,255,.6); box-shadow: 0 0 30px rgba(77,124,255,.18); }
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: rgba(77,124,255,.14); color: #D3DDFF; box-shadow: inset 0 0 0 1px rgba(110,149,255,.5), 0 0 12px rgba(77,124,255,.3); font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 500; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 100px; vertical-align: 2px; }
.tag-fight { background: var(--fight-bg); color: var(--fight-fg); border: 1px solid rgba(248,113,113,.45); }
.tag-neg { background: var(--neg-bg); color: var(--neg-fg); border: 1px solid rgba(251,191,36,.45); }
.tag-std { background: var(--std-bg); color: var(--std-fg); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.cta-box { background: radial-gradient(420px 220px at 50% 0%, rgba(77,124,255,.16), var(--surface) 70%); border: 1px solid var(--accent); border-radius: 16px; padding: 28px; margin-top: 48px; box-shadow: 0 0 0 1px rgba(77,124,255,.25), 0 0 56px rgba(77,124,255,.28); }
.cta-box h2 { margin: 0 0 8px; font-size: 24px; }
.cta-box p { color: var(--muted); margin: 0 0 18px; }
.related { margin-top: 44px; }
.related h2 { font-size: 20px; margin: 0 0 12px; }

/* Free invoice generator */
.inv-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 28px; }
.inv-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.inv-form fieldset { min-width: 0; border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.inv-form legend { font-weight: 700; font-size: 15px; margin-bottom: 4px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; color: var(--faint); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; font-size: 15px; color: var(--ink); background: var(--desk); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; padding: 9px 11px; }
.field input:focus, .field select:focus, .field textarea:focus, .item-row input:focus { outline: none; border-color: var(--accent-hover); box-shadow: 0 0 0 3px rgba(77,124,255,.18); }
.field textarea { resize: vertical; min-height: 64px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.items-head, .item-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 96px 36px; gap: 8px; align-items: center; }
.items-head { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.item-row input { width: 100%; font-size: 14.5px; color: var(--ink); background: var(--desk); border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; }
.item-remove { width: 36px; height: 36px; border: none; background: transparent; color: var(--faint); cursor: pointer; border-radius: 8px; }
.item-remove:hover { color: var(--fight-fg); background: var(--chip-2); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.inv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inv-preview-col { position: sticky; top: 88px; }
.inv-doc { background: var(--surface); color: var(--ink); border: 1px solid var(--accent); border-radius: 16px; padding: 34px 32px; box-shadow: 0 0 0 1px rgba(77,124,255,.25), 0 0 56px rgba(77,124,255,.22); font-size: 13.5px; line-height: 1.5; }
.inv-doc h2 { color: var(--ink); font-size: 26px; margin: 0; letter-spacing: 0; }
.inv-doc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.inv-doc-meta { text-align: right; color: var(--muted); }
.inv-doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 26px 0; }
.inv-doc .label { font-size: 11.5px; font-weight: 700; color: var(--faint); margin-bottom: 4px; }
.inv-doc .pre { white-space: pre-line; }
.inv-doc table { width: 100%; border-collapse: collapse; }
.inv-doc th { text-align: left; font-size: 11.5px; color: var(--faint); border-bottom: 1px solid var(--line); padding: 6px 4px; }
.inv-doc td { border-bottom: 1px solid var(--line-2); padding: 8px 4px; vertical-align: top; }
.inv-doc .num { text-align: right; white-space: nowrap; }
.inv-doc-totals { margin-left: auto; width: 60%; margin-top: 12px; }
.inv-doc-totals td { border: none; padding: 4px; }
.inv-doc-totals .total td { font-weight: 700; font-size: 16px; border-top: 1px solid rgba(255,255,255,.3); padding-top: 8px; }
.inv-doc-notes { margin-top: 22px; color: var(--muted); white-space: pre-line; }
.inv-empty { color: var(--faint-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line-2); background: transparent; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 36px; }
.footer-tagline { font-size: 14px; color: var(--muted); max-width: 320px; margin-top: 12px; }
.footer-col-title { font-size: 13px; font-weight: 600; color: var(--faint); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 14px; color: #B4B8BF; text-decoration: none; margin-bottom: 10px; }
.footer-col a:hover { color: var(--ink); }
.lang-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; font-size: 13.5px; }
.lang-links a { color: var(--muted); text-decoration: none; }
.lang-links a:hover { color: var(--ink); }
.lang-links [aria-current] { color: var(--ink); font-weight: 600; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 20px; text-align: center; font-size: 12.5px; color: var(--faint); }

/* Tablets and small laptops: the five links do not fit beside the buttons
   (German and French wrapped and pushed the button off the screen), so they
   move to the scrolling row under the header. */
@media (max-width: 1100px) {
  .main-nav { display: none; }
  .mobile-nav { display: flex; gap: 18px; overflow-x: auto; padding: 0 16px 10px; font-size: 14px; white-space: nowrap; scrollbar-width: none; }
  .mobile-nav a { color: var(--muted); text-decoration: none; }
  .mobile-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
}
.header-right .btn { white-space: nowrap; }
@media (max-width: 960px) {
  .inv-layout { grid-template-columns: minmax(0, 1fr); }
  .inv-preview-col { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .page { padding: 28px 16px 56px; }
  .hide-sm { display: none; }
  .lead { font-size: 17px; }
  .page h2 { font-size: 23px; }
  .inv-doc { padding: 22px 16px; }
  .inv-doc-parties { grid-template-columns: 1fr; }
  .inv-doc-totals { width: 100%; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .items-head, .item-row { grid-template-columns: minmax(0, 1fr) 54px 80px 32px; gap: 6px; }
}
@media (max-width: 520px) {
  .hide-xs { display: none; }
  .show-xs { display: inline; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .row-2 { grid-template-columns: 1fr; }
}

/* Printing the invoice: only the document, on white paper. */
@media print {
  @page { margin: 14mm; }
  body { background: #FFFFFF; }
  body > *:not(main), .no-print, .invoice-page .page > *:not(.inv-layout) { display: none !important; }
  .page { padding: 0; max-width: none; }
  .inv-layout { display: block; margin: 0; }
  .inv-preview-col { position: static; }
  .inv-doc { border: none; box-shadow: none; padding: 0; background: #FFFFFF; color: #17191C; }
  .inv-doc h2, .inv-doc td, .inv-doc-meta, .inv-doc-notes { color: #17191C; }
  .inv-doc .label, .inv-doc th { color: #6A6F76; }
  .inv-doc th { border-bottom-color: #E4E1D8; }
  .inv-doc td { border-bottom-color: #EEEBE3; }
  .inv-doc-totals .total td { border-top: 2px solid #17191C; }
  body::before, body::after { display: none; }
}
