/* nyc3d site — shared stylesheet
   One file, no build step, no external requests.
   Every product manual inherits this. Edit once, all pages follow. */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --rule: #e2e2e2;
  --accent: #b8410f;
  --warn-bg: #fff6ed;
  --warn-br: #e8a06a;
  --tbd-bg: #fff3b0;
  --tbd-fg: #4a3800;
  --code-bg: #f4f4f4;
  --table-alt: #fafafa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --fg: #e6e6e6;
    --muted: #a0a0a0;
    --rule: #2e3236;
    --accent: #ff8a4c;
    --warn-bg: #2b1f16;
    --warn-br: #7a4a22;
    --tbd-bg: #4a3f0d;
    --tbd-fg: #ffe98a;
    --code-bg: #22262a;
    --table-alt: #1c1f22;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  padding: 1.5rem 1.15rem 5rem;
  max-width: 42rem;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

/* --- headings --- */

h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  margin: 0 0 .3rem;
  letter-spacing: -.02em;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 2.75rem 0 .75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  letter-spacing: -.01em;
}

h3 {
  font-size: 1.08rem;
  margin: 1.75rem 0 .5rem;
}

.tagline {
  color: var(--muted);
  margin: 0 0 2rem;
  font-size: 1.02rem;
}

/* --- text --- */

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .4rem; }

a { color: var(--accent); }
a:hover { text-decoration: none; }

strong { font-weight: 650; }

code {
  background: var(--code-bg);
  padding: .12em .38em;
  border-radius: 4px;
  font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --- tables: must scroll, never push the page sideways --- */

.tablewrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 20rem;
  font-size: .95rem;
}

th, td {
  text-align: left;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-weight: 650;
  border-bottom: 2px solid var(--rule);
}

tbody tr:nth-child(even) { background: var(--table-alt); }

/* --- callouts --- */

.warn {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-br);
  padding: .85rem 1rem;
  margin: 0 0 1.25rem;
  border-radius: 0 6px 6px 0;
}

.warn > :last-child { margin-bottom: 0; }
.warn strong { color: var(--accent); }

/* --- draft markers: loud on purpose, must not survive to publish --- */

.tbd {
  background: var(--tbd-bg);
  color: var(--tbd-fg);
  padding: .1em .4em;
  border-radius: 4px;
  font-weight: 650;
  font-size: .9em;
}

.draftbar {
  background: var(--tbd-bg);
  color: var(--tbd-fg);
  padding: .8rem 1rem;
  border-radius: 6px;
  margin: 0 0 2rem;
  font-size: .95rem;
}

.draftbar > :last-child { margin-bottom: 0; }

/* --- images --- */

figure { margin: 1.5rem 0; }

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

figcaption {
  color: var(--muted);
  font-size: .9rem;
  margin-top: .5rem;
}

/* --- footer --- */

footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .9rem;
}

/* --- print: people will print this at the bench --- */

@media print {
  body { max-width: none; font-size: 11pt; }
  .draftbar, .tbd { background: none; color: inherit; }
  h2 { page-break-after: avoid; }
  .tablewrap { overflow: visible; }
}
