/*
  Draftwork's website. The colours are the app icon's: the deep navy of
  its ground, the white of the set square and the amber of the line being
  drawn, on a drafting grid. Light or dark follows the visitor's system.

  Author: Alexius Academia
  Date: 2026-10-20
*/

:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --ink: #10263b;
  --ink-soft: #4f6274;
  --line: #d8e0e8;
  --grid: rgba(16, 51, 79, 0.06);
  --grid-major: rgba(16, 51, 79, 0.10);
  --navy: #12334f;
  --navy-ink: #ffffff;
  --amber: #f0b429;
  --amber-ink: #8a5a00;
  --link: #1d5f96;
  --code-bg: #eef2f6;
  --shadow: 0 18px 50px rgba(16, 38, 59, 0.18);
  --radius: 10px;
  --wide: 1140px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1724;
    --surface: #12233a;
    --ink: #e4ebf2;
    --ink-soft: #9fb0c0;
    --line: #23384f;
    --grid: rgba(150, 190, 230, 0.05);
    --grid-major: rgba(150, 190, 230, 0.09);
    --navy: #f0b429;
    --navy-ink: #10263b;
    --amber: #f2b632;
    --amber-ink: #f2b632;
    --link: #8cc4f5;
    --code-bg: #1a2e46;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.12rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

.sub { color: var(--ink-soft); margin: 0 0 2rem; max-width: 46rem; }

/* The bar along the top */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bar { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 7px; }

nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--ink); }
nav .pill { color: var(--navy-ink); background: var(--navy); padding: 6px 14px; border-radius: 999px; font-weight: 600; }
nav .pill:hover { color: var(--navy-ink); }

@media (max-width: 760px) {
  nav a:not(.pill) { display: none; }
}

/* The drafting grid behind the hero and the tour */

.grid-bg {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

/* Hero */

.hero { padding: 64px 0 40px; text-align: center; }
.hero-icon { margin: 0 auto 22px; border-radius: 24px; box-shadow: var(--shadow); }
.hero h1 { max-width: 18ch; margin: 0 auto 0.4em; }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 40rem; margin: 0 auto 1.6rem; }

.prompt {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 0 1.8rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.prompt b { color: var(--ink); font-weight: 600; }
.prompt .opt { color: var(--amber-ink); }
.prompt .caret { display: inline-block; width: 0.55em; height: 1.05em; vertical-align: -0.18em; background: var(--amber); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prompt .caret { animation: none; } }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 0.8rem; }

.button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.25;
}
.button small { font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }
.button.primary { background: var(--navy); border-color: var(--navy); color: var(--navy-ink); }
.button.primary small { color: color-mix(in srgb, var(--navy-ink) 75%, transparent); }
.button:hover { filter: brightness(1.06); }

.fine { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 2.4rem; }
.installs { font-size: 0.88rem; color: var(--ink-soft); text-align: center; margin: 0 0 0.6rem; }
.cards + .installs { margin: -1rem 0 1.6rem; }

.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.hero .shot { max-width: 1100px; margin: 0 auto; }

/* Sections */

section { padding: 72px 0; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.features article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  border-top: 3px solid var(--amber);
}
.features p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.features ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); font-size: 0.95rem; }
.features li { margin: 0.15em 0; }

/* Tour */

.step { display: grid; grid-template-columns: 1fr 2fr; gap: 36px; align-items: center; margin: 0 0 64px; }
.step:last-child { margin-bottom: 0; }
.step.flip { grid-template-columns: 2fr 1fr; }
.step.flip .words { order: 2; }
.num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  color: var(--amber-ink);
  font: 700 0.9rem var(--mono);
  margin-bottom: 10px;
}
.words p { color: var(--ink-soft); margin: 0; }

@media (max-width: 860px) {
  .step, .step.flip { grid-template-columns: 1fr; gap: 18px; margin-bottom: 48px; }
  .step.flip .words { order: 0; }
}

/* Tables */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; }
td small { display: block; color: var(--ink-soft); font-size: 0.85rem; }
td code { white-space: nowrap; }
.yes { color: #2a9a62; font-weight: 600; }

/* Limits */

.limits ul { padding-left: 1.2em; }
.limits li { margin: 0.4em 0; }
.note { color: var(--ink-soft); font-size: 0.95rem; }

/* Downloads */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 2rem; }
.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.card strong { font-size: 1.25rem; }
.card .meta { color: var(--ink-soft); font-size: 0.92rem; }
.card .get {
  align-self: flex-start;
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--navy-ink);
  font-weight: 600;
  text-decoration: none;
}
.card .soon {
  align-self: flex-start;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  font-weight: 600;
}
.card .sum { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-soft); overflow-wrap: anywhere; margin-top: 4px; }

.callout {
  border-left: 4px solid var(--amber);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 0 0 2rem;
}
.callout p { margin: 0.3em 0; }

.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.reqs h3 { margin-bottom: 0.3em; }
.reqs ul { margin: 0; padding-left: 1.2em; color: var(--ink-soft); }

/* Privacy page */

.privacy h2 { margin-top: 2rem; font-size: 1.4rem; }

/* Footer */

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--ink-soft); font-size: 0.92rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
footer a { color: var(--ink-soft); }

/* The user guide (guide.html) */

kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.guide-head { padding: 56px 0 36px; border-bottom: 1px solid var(--line); }
.guide-head .lead { margin: 0 0 0.8rem; text-align: left; max-width: 44rem; }
.guide-head .fine { margin: 0; }

.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }

.toc { position: sticky; top: 76px; padding: 32px 0; max-height: calc(100vh - 76px); overflow-y: auto; }
.toc summary { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; cursor: pointer; list-style: none; margin-bottom: 8px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 5px 10px; border-left: 2px solid var(--line); color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; }
.toc a::before { content: counter(toc) ". "; font-family: var(--mono); font-size: 0.8em; color: var(--ink-soft); }
.toc a:hover { color: var(--ink); }
.toc a[aria-current] { color: var(--ink); border-left-color: var(--amber); font-weight: 600; }

.doc { min-width: 0; padding: 32px 0 72px; }
.doc > section { padding: 0 0 56px; scroll-margin-top: 76px; }
.doc > section + section { padding-top: 48px; border-top: 1px solid var(--line); }
.doc h2 { display: flex; align-items: center; gap: 12px; }
.doc h2 .num { margin: 0; flex: none; }
.doc h3 { margin-top: 1.8em; }
.doc p, .doc li, .doc dd { color: var(--ink-soft); }
.doc strong { color: var(--ink); }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin: 0.3em 0; }
.doc .shot { margin: 1.6rem 0; box-shadow: none; }
.doc figcaption { padding: 10px 16px; font-size: 0.9rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.doc .prompt { display: block; margin: 0 0 1rem; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }

.parts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 1rem 0; }
.parts dt { font-weight: 600; color: var(--ink); }
.parts dd { margin: 0; }
@media (max-width: 600px) {
  .parts { grid-template-columns: 1fr; gap: 2px; }
  .parts dd { margin-bottom: 10px; }
}

.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; }
.keys h3 { margin-top: 1.2em; }
table.compact td { padding: 7px 10px 7px 0; color: var(--ink-soft); }
table.compact td:first-child { white-space: nowrap; color: var(--ink); width: 1%; padding-right: 18px; }

.finder { display: flex; flex-direction: column; gap: 12px; margin: 1.2rem 0 0.4rem; }
.finder input {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  width: 100%;
  max-width: 28rem;
}
.finder input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--navy-ink); font-weight: 600; }
.count { font-size: 0.88rem; margin: 0.6rem 0; }
table.ref td { color: var(--ink-soft); font-size: 0.93rem; }
table.ref td:first-child { white-space: nowrap; }
table.ref td small { margin-top: 2px; }

.faq dt { font-weight: 600; color: var(--ink); margin-top: 1rem; }
.faq dd { margin: 0.2rem 0 0; }
.doc .callout { margin-top: 2rem; }

@media (max-width: 960px) {
  .guide-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; max-height: none; padding: 20px 0 0; }
  .toc details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; }
  .toc summary { margin: 0; }
  .toc details[open] summary { margin-bottom: 8px; }
}
.alias { white-space: nowrap; }
@media (max-width: 600px) {
  table.ref thead { display: none; }
  table.ref tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.ref td { display: block; padding: 0; border: 0; }
  table.ref td:nth-child(3) { grid-row: 1; grid-column: 2; text-align: right; font-size: 0.82rem; }
  table.ref td:nth-child(2), table.ref td:nth-child(4) { grid-column: 1 / -1; }
  table.ref td:nth-child(2):empty { display: none; }
}
