/* Situacii website. Everything is served from this folder: no external fonts,
   scripts, images or requests. Fonts and their licences are in fonts/. */

@font-face {
  font-family: "Sofia Sans";
  src: url("fonts/sofia-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia Sans Condensed";
  src: url("fonts/sofia-sans-condensed.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Situacii Mono";
  src: url("fonts/situacii-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Black ink is the contractor's claim; blue ink is the supervisor's decision. */
  --paper: #ffffff;
  --desk: #eceff1;
  --tint: #f1f3f5;
  --ink: #0f1419;
  --ink-2: #444d56;
  --hair: #c5ccd3;
  --blue: #1a47a8;
  --blue-tint: #e8eefb;
  --amber: #7a4300;
  --amber-tint: #fdf0dc;
  --sans: "Sofia Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cond: "Sofia Sans Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --mono: "Situacii Mono", ui-monospace, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  font-variant-numeric: lining-nums;
}
h1, h2, h3, p, figure, ol, ul, dl, dd, table { margin: 0; }
ol, ul { padding: 0; list-style: none; }
table { border-collapse: collapse; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(100% - 2rem, 75rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 2; padding: .6rem .8rem; background: var(--paper); border: 2px solid var(--ink); }
.skip:focus { top: .5rem; }

/* ---------- header: set like the title block of a drawing ---------- */
.top { border-bottom: 2px solid var(--ink); }
.top-in { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 3.25rem;
  color: var(--ink); text-decoration: none;
  font: 800 1.4375rem/1 var(--sans); letter-spacing: -.01em;
}
.brand svg { width: 1.75rem; height: 1.75rem; flex: none; }
.top nav {
  display: flex; flex: 1 0 100%; border-top: 1px solid var(--ink);
  font: 600 .9375rem/1 var(--cond); letter-spacing: .03em;
}
.top nav a {
  display: flex; flex: 1; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: 0 .5rem; color: var(--ink); text-decoration: none; border-left: 1px solid var(--hair);
}
.top nav a:first-child { border-left: 0; }
.top nav a:hover { background: var(--tint); }
.top nav .nav-demo { background: var(--ink); color: #fff; border-left-color: var(--ink); }
.top nav .nav-demo:hover { background: var(--blue); }

/* ---------- hero ---------- */
.hero-grid { display: grid; gap: 1.25rem; padding-block: 2rem 1.75rem; }
.kicker {
  margin-bottom: .9rem; color: var(--ink-2);
  font: 600 .8125rem/1.35 var(--cond); letter-spacing: .08em; text-transform: uppercase;
}
h1 {
  font: 800 clamp(2.5rem, 1.15rem + 5.3vw, 4.375rem)/1 var(--sans);
  letter-spacing: -.015em; text-wrap: balance;
}
.lead { font-size: 1.125rem; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: .65rem 1.1rem; background: var(--ink); color: #fff; border: 2px solid var(--ink);
  font: 600 1.0625rem/1.2 var(--sans); text-decoration: none;
}
.btn:hover { background: var(--blue); border-color: var(--blue); }
.more { display: inline-block; font-weight: 600; padding-block: .6rem; }
.fine { margin-top: .9rem; color: var(--ink-2); font-size: .9375rem; }

/* ---------- the claim sheet ---------- */
.desk { background: var(--desk); border-block: 1px solid var(--hair); padding-block: 1rem 1.25rem; }
.sheet {
  background: var(--paper); border: 1px solid var(--ink); padding: .6rem;
  font: 500 .75rem/1.3 var(--cond); font-variant-numeric: tabular-nums lining-nums;
}
.sheet-head { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .6rem; }
.sheet-title { order: -1; }
.sheet-title strong { display: block; font: 800 1.125rem/1.15 var(--sans); }
.sheet-title span { display: block; }
.sheet-title .mode { margin-block: .15rem; font-weight: 700; letter-spacing: .04em; }
.stamp {
  order: -2; align-self: flex-start; padding: .2rem .45rem; border: 2px solid var(--blue); color: var(--blue);
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.kv th { padding: 0 .6rem 0 0; color: var(--ink-2); font-weight: 500; text-align: left; vertical-align: top; white-space: nowrap; }
.kv td { font-weight: 700; }

.grid { width: 100%; }
.grid th, .grid td { border: 1px solid var(--ink); padding: .22rem .3rem; vertical-align: top; }
.grid thead th { background: var(--tint); font-weight: 700; line-height: 1.15; text-align: center; vertical-align: middle; }
.grid .grp { display: block; color: var(--ink-2); font-weight: 500; }
.grid .n { text-align: right; white-space: nowrap; }
.grid .c { text-align: center; }
.grid .ch td { background: var(--tint); font-weight: 700; }
.grid .sum td { font-weight: 700; }
.grid .sum .e { border-inline: 0; }
.grid .mark { color: var(--blue); font-weight: 700; box-shadow: inset 0 0 0 2px var(--blue); }
.desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

.settle { display: grid; gap: .6rem; margin-top: .6rem; }
.totals { width: 100%; }
.totals th { padding: .1rem .75rem .1rem 0; font-weight: 500; text-align: left; }
.totals td { padding: .1rem 0; text-align: right; white-space: nowrap; }
.totals .pay th, .totals .pay td { padding-top: .3rem; border-top: 2px solid var(--ink); font-size: .9375rem; font-weight: 700; }
.notes { color: var(--ink-2); }

.sheet-cap { margin-top: .75rem; color: var(--ink-2); font-size: .875rem; }
.callout { margin-top: .6rem; font-size: 1rem; line-height: 1.45; }
.key {
  display: inline-block; margin-right: .35rem; padding: .12rem .35rem; border: 2px solid var(--blue); color: var(--blue);
  font: 700 .875rem/1.1 var(--cond); font-variant-numeric: tabular-nums;
}

/* ---------- chapters: numbered like the chapters of a bill of quantities ---------- */
.chapter { padding-block: 2.5rem 1rem; }
.band {
  display: flex; gap: .75rem; padding: .4rem .6rem; background: var(--tint);
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
  font: 700 .875rem/1.25 var(--cond); letter-spacing: .08em; text-transform: uppercase;
}
h2 {
  max-width: 24ch; margin-top: 1.5rem;
  font: 800 clamp(1.75rem, 1.2rem + 2.3vw, 2.75rem)/1.08 var(--sans);
  letter-spacing: -.01em; text-wrap: balance;
}
.chapter-lead { max-width: 38rem; margin-top: 1rem; font-size: 1.125rem; line-height: 1.5; }
.legend { margin-top: 1.25rem; color: var(--ink-2); font: 600 .875rem/1.3 var(--cond); letter-spacing: .03em; }
.sw { display: inline-block; width: .75rem; height: .75rem; margin-right: .4rem; vertical-align: -.05rem; }
.sw-ink { background: var(--ink); }
.sw-blue { margin-left: 1.25rem; background: var(--blue); }

.trace { margin-top: 1.25rem; border-top: 1px solid var(--ink); counter-reset: step; }
.step { display: grid; gap: .9rem; padding-block: 1.5rem; border-bottom: 1px solid var(--hair); counter-increment: step; }
.when { color: var(--ink-2); font: 400 .8125rem/1.3 var(--mono); }
.when::before { content: counter(step, decimal-leading-zero); margin-right: .75rem; padding: .05rem .3rem; background: var(--ink); color: #fff; }
.step h3 { margin: .6rem 0 .35rem; font: 700 1.375rem/1.2 var(--sans); }
.step-text p:last-child { max-width: 34rem; }

.frag {
  align-self: start; background: var(--paper); border: 1px solid var(--ink);
  font: 500 .8125rem/1.3 var(--cond); font-variant-numeric: tabular-nums lining-nums;
}
.frag-cap { padding: .4rem .6rem; background: var(--tint); border-bottom: 1px solid var(--ink); font-weight: 700; }
.frag-cap span { font-weight: 500; }
.line > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .45rem .6rem; border-top: 1px solid var(--hair); }
.line > div:first-child { border-top: 0; }
.line dt { color: var(--ink-2); }
.line dd { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.line .sup dt, .line .sup dd { color: var(--blue); }
.frag.rv { border: 2px solid var(--blue); }
.frag.rv .frag-cap { background: var(--blue-tint); border-bottom-color: var(--blue); color: var(--blue); font-weight: 500; }
.frag-cap .status {
  display: inline-block; margin-right: .5rem; padding: .05rem .4rem; background: var(--amber-tint); color: var(--amber);
  border: 1px solid currentColor; font-weight: 700;
}
.comment { padding: .55rem .6rem; border-top: 1px solid var(--hair); color: var(--blue); font: 400 1rem/1.4 var(--sans); }

.book { width: 100%; }
.book .formula { font: 400 .75rem/1.4 var(--mono); }
.book .n { font-weight: 700; text-align: right; white-space: nowrap; }

@media (max-width: 47.99rem) {
  .w { display: none; }
  /* The measurement table becomes one block per measurement. */
  .book thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .book tbody, .book tfoot { display: block; }
  .book tr { display: grid; grid-template-columns: 1fr auto; column-gap: .75rem; padding: .5rem .6rem; border-top: 1px solid var(--hair); }
  .book tbody tr:first-child { border-top: 0; }
  .book td { display: block; }
  .book tbody td:nth-child(1) { color: var(--ink-2); }
  .book tbody td:nth-child(2) { font-weight: 700; }
  .book tbody td:nth-child(3) { margin-block: .2rem; overflow-wrap: anywhere; }
  .book tbody td:nth-child(4) { grid-area: 1 / 2 / span 3; align-self: end; font-size: 1rem; }
  .book tbody td:nth-child(5) { color: var(--ink-2); }
  .book tfoot tr { border-top: 1px solid var(--ink); font-weight: 700; }
  .book tfoot td:nth-child(2) { font-size: 1rem; }
  .book tfoot td:nth-child(3) { display: none; }
}

@media (min-width: 48rem) {
  .wrap { width: min(100% - 5rem, 75rem); }
  .top nav { flex: 0 1 auto; border-top: 0; }
  .top nav a { flex: none; padding: 0 1.15rem; min-height: 3.25rem; }
  .top nav a:first-child { border-left: 1px solid var(--hair); }

  .sheet { padding: 1rem; font-size: .8125rem; }
  .sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 1.5rem; margin-bottom: .9rem; }
  .sheet-title { order: 0; text-align: center; }
  .sheet-title strong { font-size: 1.375rem; }
  .stamp { order: 0; justify-self: end; }
  .desc { display: inline; }
  .grid th, .grid td { padding: .25rem .4rem; }
  .settle { grid-template-columns: 1fr minmax(22rem, 42%); align-items: start; gap: 2rem; margin-top: .9rem; }
  .totals { order: 1; }
  .totals .pay th, .totals .pay td { font-size: 1.0625rem; }

  .line { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .line > div { flex-direction: column; justify-content: flex-start; gap: .1rem; padding: .6rem .75rem; border-top: 0; border-left: 1px solid var(--hair); }
  .line > div:first-child { border-left: 0; }
  .line dd { font-size: 1.375rem; line-height: 1.2; }
  .book th, .book td { padding: .35rem .6rem; border-top: 1px solid var(--hair); text-align: left; vertical-align: top; }
  .book thead th { border-top: 0; color: var(--ink-2); font-weight: 500; }
  .book thead th:nth-child(4) { text-align: right; }
  .book tfoot td { border-top: 1px solid var(--ink); font-weight: 700; }
  .book td:first-child { white-space: nowrap; }
}

@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: 7fr 5fr; align-items: end; gap: 3.5rem; padding-block: 3.5rem 2.75rem; }
  .desk { padding-block: 1.75rem 2rem; }
  .sheet { padding: 1.25rem 1.5rem 1.5rem; font-size: .875rem; }
  .chapter { padding-block: 4rem 1.5rem; }
  .step { grid-template-columns: 4fr 8fr; gap: 3.5rem; padding-block: 2rem; }
}

/* ---------- later chapters ---------- */
.split { display: grid; gap: 1.5rem; }
.facts { max-width: 40rem; margin-top: 1.5rem; }
.facts li { position: relative; padding: .5rem 0 .5rem 1.4rem; border-top: 1px solid var(--hair); }
.facts li:last-child { border-bottom: 1px solid var(--hair); }
.facts li::before { content: ""; position: absolute; left: 0; top: 1.1rem; width: .5rem; height: .5rem; background: var(--ink); }
.caveat { max-width: 40rem; margin-top: 1.25rem; padding-left: .9rem; border-left: 3px solid var(--blue); }
.file { margin-top: .4rem; }
.file span { display: inline-block; margin-left: .5rem; color: var(--ink-2); font: 400 .8125rem/1.3 var(--mono); white-space: nowrap; }

.prints { padding: .6rem; background: var(--desk); border: 1px solid var(--hair); }
.prints a { display: block; }
.prints img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--ink); }
.prints a + img { margin-top: .6rem; }
.prints figcaption { margin-top: .6rem; color: var(--ink-2); font-size: .875rem; line-height: 1.4; }

.step-body { max-width: 38rem; }

/* A dimension line, as on a drawing: 48 hours between two events. */
.dim {
  display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; max-width: 46rem; margin-top: 2rem;
  color: var(--ink-2); font: 600 .8125rem/1.3 var(--cond); letter-spacing: .03em;
}
.dim-b { text-align: right; }
.dim-line { position: relative; grid-column: 1 / -1; height: 1.75rem; border-inline: 1px solid var(--ink); }
.dim-line::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px solid var(--ink); }
.dim-line b {
  position: absolute; left: 50%; top: 50%; padding: 0 .7rem; transform: translate(-50%, -50%);
  background: var(--paper); color: var(--ink); font: 400 .9375rem/1 var(--mono); white-space: nowrap;
}
.dim-line i { position: absolute; top: 50%; width: 1rem; border-top: 2px solid var(--ink); transform: translate(-50%, -50%) rotate(-45deg); }
.dim-line i:first-child { left: 0; }
.dim-line i:last-child { left: 100%; }
.dim + .actions { margin-top: 2rem; }
.actions .fine { margin-top: 0; }

.rows { margin-top: 2rem; border-top: 1px solid var(--ink); }
.rows li { display: grid; gap: .4rem; padding-block: 1.5rem; border-bottom: 1px solid var(--hair); }
.rows h3 { font: 700 1.375rem/1.2 var(--sans); }
.rows p { max-width: 40rem; }
.rows .file { margin-top: 0; }

.plans { width: 100%; margin-top: 2rem; border-top: 1px solid var(--ink); }
.plans thead th { color: var(--ink-2); font: 600 .8125rem/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; }
.plans tbody th { font: 700 1.375rem/1.2 var(--sans); text-align: left; }
.plans .n { font: 700 1.25rem/1.3 var(--cond); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

.qa { margin-top: 2rem; border-top: 1px solid var(--ink); }
.qa > div { display: grid; gap: .4rem; padding-block: 1.25rem; border-bottom: 1px solid var(--hair); }
.qa dt { font: 700 1.1875rem/1.3 var(--sans); }
.qa dd { max-width: 40rem; }

.prose { max-width: 40rem; }
.prose p + p { margin-top: .9rem; }

.foot { margin-top: 3.5rem; background: var(--tint); border-top: 2px solid var(--ink); }
.foot-in { display: grid; gap: 1.25rem; padding-block: 2rem 2.5rem; }
.foot .brand { min-height: 0; margin-bottom: .6rem; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; font-weight: 600; }
.foot ul a { display: inline-block; min-width: 2.75rem; padding-block: .55rem; }
.foot .fine { margin-top: 0; font-size: .875rem; }

@media (max-width: 47.99rem) {
  .plans thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .plans tbody, .plans tr, .plans th, .plans td { display: block; }
  .plans tr { padding-block: 1.1rem; border-bottom: 1px solid var(--hair); }
  .plans td[data-label] { display: flex; align-items: baseline; justify-content: space-between; margin-top: .3rem; }
  .plans td[data-label]::before { content: attr(data-label); color: var(--ink-2); font: 500 .9375rem/1.3 var(--cond); letter-spacing: .03em; }
  .plans td:last-child { margin-top: .6rem; }
}

@media (min-width: 48rem) {
  .plans th, .plans td { padding: .9rem 1.5rem .9rem 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
  .plans thead th { border-bottom-color: var(--ink); }
  .plans tbody th { white-space: nowrap; }
  .prints { padding: 1rem; }
  .prints a + img { margin-top: 1rem; }
}

@media (min-width: 64rem) {
  .split { grid-template-columns: 5fr 7fr; column-gap: 3.5rem; align-items: start; }
  .split .prints, .split .prose { margin-top: 1.5rem; }
  .step-body { padding-top: 1.9rem; }
  .rows li { grid-template-columns: 4fr 8fr; column-gap: 3.5rem; }
  .rows li > * { grid-column: 2; }
  .rows h3 { grid-column: 1; grid-row: 1 / span 2; }
  .qa > div { grid-template-columns: 4fr 8fr; column-gap: 3.5rem; }
  .foot-in { grid-template-columns: 5fr 7fr; column-gap: 3.5rem; }
  .foot .fine { grid-column: 1 / -1; }
}
