/* Foam Concrete Reference — luca-industries.com
   Single stylesheet, no build step, no external fonts. */

:root {
  --paper:      #faf9f6;
  --paper-2:    #f2efe8;
  --ink:        #17191c;
  --ink-2:      #4e545c;
  --ink-3:      #767c85;
  --rule:       #e3dfd6;
  --rule-2:     #cfcabd;
  --accent:     #17506e;
  --accent-2:   #0f3a51;
  --accent-bg:  #eaf1f5;
  --warn-bg:    #f7f1e4;
  --warn-rule:  #d9c79a;
  --measure:    68ch;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #14161a;
    --paper-2:   #1b1e23;
    --ink:       #e8e6e1;
    --ink-2:     #b0b5bd;
    --ink-3:     #878d96;
    --rule:      #2b2f36;
    --rule-2:    #3a3f47;
    --accent:    #7ec3e6;
    --accent-2:  #a6d8f2;
    --accent-bg: #172631;
    --warn-bg:   #262117;
    --warn-rule: #58492a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.65 var(--serif);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px; z-index: 10;
}
.skip:focus { left: 0; }

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

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 5;
}
.head-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; }
.brand-mark {
  width: 30px; height: 30px; flex: none; border: 1px solid var(--rule-2); border-radius: 3px;
  background-color: var(--paper-2);
  background-image:
    radial-gradient(circle at 25% 25%, var(--accent) 0 1.6px, transparent 1.7px),
    radial-gradient(circle at 75% 60%, var(--accent) 0 2.4px, transparent 2.5px),
    radial-gradient(circle at 35% 78%, var(--accent) 0 1.2px, transparent 1.3px),
    radial-gradient(circle at 82% 20%, var(--accent) 0 1.1px, transparent 1.2px);
  opacity: .95;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font: 600 15px/1.2 var(--sans); letter-spacing: -.01em; }
.brand-text i { font: 400 12px/1.3 var(--sans); font-style: normal; color: var(--ink-3); max-width: 44ch; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; font: 500 14px/1 var(--sans); }
.site-nav a {
  display: block; padding: 7px 10px; border-radius: 4px;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-bg); }
.site-nav .lang {
  margin-left: 6px; border: 1px solid var(--rule-2); color: var(--ink-3);
  font-size: 13px; padding: 6px 10px;
}

/* ---------- main ---------- */

main { padding: 40px 24px 72px; }
.crumbs { font: 400 13px/1.5 var(--sans); color: var(--ink-3); margin: 0 0 22px; }
.crumbs a { color: var(--ink-3); }
.crumbs span { margin: 0 2px; }

.prose { max-width: var(--measure); }

h1 {
  font: 600 clamp(30px, 4.4vw, 42px)/1.14 var(--sans);
  letter-spacing: -.022em; margin: 0 0 20px; text-wrap: balance;
}
.prose h2 {
  font: 600 25px/1.25 var(--sans); letter-spacing: -.015em;
  margin: 52px 0 14px; padding-top: 18px; border-top: 1px solid var(--rule);
  text-wrap: balance; scroll-margin-top: 90px;
}
.prose h3 {
  font: 600 18px/1.35 var(--sans); letter-spacing: -.008em;
  margin: 32px 0 8px; scroll-margin-top: 90px;
}
.prose h4 { font: 600 15px/1.4 var(--sans); margin: 22px 0 6px; color: var(--ink-2); }

.lead {
  font-size: 21px; line-height: 1.55; color: var(--ink-2);
  margin: 0 0 32px; text-wrap: pretty;
}
.is-home .lead { font-size: 22px; color: var(--ink); }

p, ul, ol, dl { margin: 0 0 18px; }
li { margin-bottom: 7px; }
ul, ol { padding-left: 22px; }
li > ul, li > ol { margin: 7px 0 0; }
strong { font-weight: 600; }

/* Superscripts (kg/m3, footnote marks) must not stretch the line box. */
sup, sub { font-size: .72em; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -.45em; }
sub { bottom: -.25em; }
abbr[title] { text-decoration: underline dotted; cursor: help; }

/* ---------- table of contents ---------- */

.toc {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 5px; padding: 18px 22px 14px; margin: 0 0 36px;
}
.toc h2 {
  font: 600 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 10px; border: 0; padding: 0;
}
.toc ol { margin: 0; padding-left: 20px; font: 400 15px/1.55 var(--sans); }
.toc li { margin-bottom: 3px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- tables ---------- */

.tbl {
  overflow-x: auto; margin: 24px 0 26px;
  border: 1px solid var(--rule); border-radius: 5px;
  /* Shadows at the edges appear only while there is more table to scroll to.
     The two `local` layers mask the two `scroll` layers when fully scrolled. */
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--paper), var(--paper)),
    linear-gradient(to left,  var(--paper), var(--paper)),
    linear-gradient(to right, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0)),
    linear-gradient(to left,  rgba(0, 0, 0, .16), rgba(0, 0, 0, 0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 24px 100%, 24px 100%, 12px 100%, 12px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* Wide tables and diagrams may use the full column width, not just the
   reading measure, once the viewport is wide enough to give them room. */
@media (min-width: 1120px) {
  .prose > .tbl, .prose > figure { width: 1032px; max-width: none; }
}
table { border-collapse: collapse; width: 100%; font: 400 15px/1.45 var(--sans); font-variant-numeric: tabular-nums; }
caption {
  caption-side: bottom; text-align: left; font: 400 13px/1.5 var(--sans);
  color: var(--ink-3); padding: 10px 14px; border-top: 1px solid var(--rule);
}
th, td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th {
  background: var(--paper-2); font-weight: 600; font-size: 13px;
  letter-spacing: .02em; color: var(--ink-2); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* ---------- callouts ---------- */

.note, .caution {
  border: 1px solid var(--rule-2); border-left-width: 3px; border-left-color: var(--accent);
  background: var(--accent-bg); border-radius: 4px;
  padding: 16px 20px; margin: 26px 0; font-size: 17px;
}
.note > :last-child, .caution > :last-child { margin-bottom: 0; }
.note h3, .caution h3 {
  margin: 0 0 8px; font: 600 12px/1 var(--sans);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.caution { background: var(--warn-bg); border-left-color: var(--warn-rule); border-color: var(--warn-rule); }

.keyfact {
  border: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 18px 0 20px; margin: 30px 0;
}
.keyfact p { margin: 0; font-size: 19px; line-height: 1.5; }
.keyfact .label {
  display: block; font: 600 11px/1 var(--sans); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px;
}

/* ---------- figures / diagrams ---------- */

figure { margin: 30px 0; }
figure svg { display: block; width: 100%; height: auto; }
figcaption { font: 400 13px/1.55 var(--sans); color: var(--ink-3); margin-top: 10px; }

/* ---------- reference list ---------- */

.refs { font-size: 15px; line-height: 1.55; }
.refs ol { padding-left: 24px; }
.refs li { margin-bottom: 12px; color: var(--ink-2); }
.refs cite { font-style: italic; }

/* ---------- FAQ ---------- */

.qa { border-top: 1px solid var(--rule); padding: 20px 0 4px; }
.qa h3 { margin-top: 0; }

/* ---------- home grid ---------- */

.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2px; background: var(--rule); border: 1px solid var(--rule);
  border-radius: 5px; overflow: hidden; margin: 34px 0 40px; max-width: none;
}
.cards a {
  background: var(--paper); padding: 20px 22px 22px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 6px;
}
.cards a:hover { background: var(--paper-2); }
.cards b { font: 600 16px/1.3 var(--sans); color: var(--accent); }
.cards span { font: 400 14px/1.5 var(--sans); color: var(--ink-2); }
.is-home .prose { max-width: none; }
.is-home .prose > p, .is-home .prose > ul, .is-home .prose > ol,
.is-home .prose > h2, .is-home .prose > h3, .is-home .prose > .lead,
.is-home .prose > .note, .is-home .prose > .keyfact, .is-home .prose > .refs,
.is-home .prose > figure, .is-home .prose > .qa { max-width: var(--measure); }

.updated {
  margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--rule);
  font: 400 13px/1.5 var(--sans); color: var(--ink-3);
}

/* ---------- related ---------- */

.related { max-width: var(--measure); margin: 44px 0 0; }
.related h2 {
  font: 600 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px;
}
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related li { margin: 0; }
.related a {
  display: block; border: 1px solid var(--rule-2); border-radius: 4px;
  padding: 8px 14px; font: 500 14px/1 var(--sans); text-decoration: none;
}
.related a:hover { background: var(--paper-2); }

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--rule); background: var(--paper-2); padding: 44px 0 40px; }
.foot-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px; margin-bottom: 34px;
}
.foot-cols h2 {
  font: 600 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px;
}
.foot-cols ul { list-style: none; margin: 0; padding: 0; font: 400 14px/1.6 var(--sans); }
.foot-cols li { margin-bottom: 4px; }
.foot-cols a { color: var(--ink-2); text-decoration: none; }
.foot-cols a:hover { color: var(--accent); text-decoration: underline; }

.disclaimer {
  font: 400 13px/1.6 var(--sans); color: var(--ink-3);
  max-width: 82ch; padding-top: 22px; border-top: 1px solid var(--rule-2); margin-bottom: 12px;
}
.colophon { font: 400 13px/1.5 var(--sans); color: var(--ink-3); margin: 0; }

/* ---------- gone / error page ---------- */

.status-page { padding: 90px 24px; text-align: left; }
.status-page .code {
  font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  main { padding-top: 28px; }
  .site-head { position: static; }
  .head-inner { padding-bottom: 8px; }
  .brand-text i { display: none; }
  .site-nav { font-size: 13px; }
  .site-nav a { padding: 6px 8px; }
  .prose h2 { font-size: 22px; margin-top: 40px; }
  .lead, .is-home .lead { font-size: 19px; }
}

@media print {
  .site-head, .site-nav, .toc, .related, .foot-cols, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose { max-width: none; }
  a { color: #000; }
}

.oa {
  font: 600 11px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-bg); border: 1px solid var(--rule-2);
  border-radius: 3px; padding: 3px 6px; vertical-align: 2px; white-space: nowrap;
}
code {
  font: 400 .88em/1.4 var(--mono); background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 3px; padding: 1px 5px;
}
