/* ==========================================================================
   Loresoft 2026: the site as a set of technical drawing sheets.
   Layers: tokens > base > band (blueprint) > sheets > documents > footer.
   Replaces the Bootstrap 2 / default.css stack; nothing in here depends on it.
   ========================================================================== */

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/grfx/fonts/barlowc-500.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/grfx/fonts/barlowc-600.woff2") format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/grfx/fonts/barlowc-700.woff2") format("woff2");
}

@font-face {
  font-family: Barlow;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/grfx/fonts/barlow-400.woff2") format("woff2");
}

@font-face {
  font-family: Barlow;
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("/grfx/fonts/barlow-400i.woff2") format("woff2");
}

@font-face {
  font-family: Barlow;
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/grfx/fonts/barlow-500.woff2") format("woff2");
}

@font-face {
  font-family: Barlow;
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/grfx/fonts/barlow-600.woff2") format("woff2");
}

:root {
  /* drafting paper, ink and the one blueprint blue */
  --paper: #e8ecf0;
  --sheet: #fbfcfd;
  --ink: #0f2540;
  --ink-2: #40546b;
  --hair: #0f254038;
  --hair-2: #0f25401a;
  --blue: #1b4ca0;
  --blue-2: #163f86;
  --blue-3: #2a5fb8;
  --red: #bd3526; /* Rotstift: active marks and corrections only */
  --white-line: #ffffffe0;
  --white-soft: #ffffff38;
  --f-draw: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-text: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(20px, 5vw, 64px);
  --max: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;
  --s9: 112px;
}

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

html {
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  scrollbar-color: var(--ink-2) var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-text);
  font-kerning: normal;
  text-rendering: optimizelegibility;
  caret-color: var(--red);
}

::selection {
  background: var(--red);
  color: #fff;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.band :focus-visible,
.foot :focus-visible {
  outline-color: #fff;
}

.skip {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 50;
  background: var(--sheet);
  color: var(--ink);
  padding: var(--s3) var(--s4);
  font-weight: 600;
  border: 1.5px solid var(--ink);
}

.skip:focus {
  top: var(--s4);
}

/* small lettering used in every title block */
.lab {
  display: block;
  font: 600 12px/1.2 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--s1);
}

/* ==========================================================================
   Band: the blueprint (Lichtpause) field with frame, zone marks and grid
   ========================================================================== */
.band,
.foot {
  position: relative;
  background-color: var(--blue);
  color: #fff;
  background-image: linear-gradient(var(--white-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-soft) 1px, transparent 1px),
    linear-gradient(#ffffff12 1px, transparent 1px),
    linear-gradient(90deg, #ffffff12 1px, transparent 1px);
  background-size:
    96px 96px,
    96px 96px,
    12px 12px,
    12px 12px;
  background-position: -1px -1px;
  overflow: hidden;
}

.band::after,
.foot::after {
  /* soft falloff so the grid does not compete with text */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    120% 90% at 25% 30%,
    #1b4ca000 0%,
    #1b4ca08c 100%
  );
}

.frame {
  position: absolute;
  inset: 14px;
  z-index: 1;
  pointer-events: none;
  border: 1.5px solid var(--white-line);
}

.zx,
.zy {
  margin: 0;
  padding: 0;
  list-style: none;
  position: absolute;
  display: flex;
  font: 600 11px/1 var(--f-draw);
  letter-spacing: 0.08em;
  color: #fffc;
}

.zx {
  left: 0;
  right: 0;
  top: -13px;
  justify-content: space-around;
}

.zy {
  top: 0;
  bottom: 0;
  left: -12px;
  flex-direction: column;
  justify-content: space-around;
}

.zx li,
.zy li {
  display: block;
}

@media (max-width: 720px) {
  .zx,
  .zy {
    display: none;
  }

  .frame {
    inset: 8px;
  }
}

.is-inner .zy {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .band .frame {
    animation: plot 1100ms var(--ease) both;
  }

  @keyframes plot {
    from {
      clip-path: inset(0 100% 100% 0);
    }

    to {
      clip-path: inset(-20px -20px -20px -20px);
    }
  }
}

.band-in {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--gut), var(--max));
  margin-inline: auto;
  padding-block: var(--s5) var(--s6);
}

.is-home .band-in {
  padding-bottom: calc(var(--s9) + var(--s4));
}

.topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--s5);
  flex-wrap: wrap;
}

.logo-cell {
  display: block;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
  padding: var(--s2) var(--s4);
  box-shadow:
    0 0 0 4px var(--blue),
    0 0 0 5.5px var(--white-line);
}

.logo-cell img {
  width: 188px;
  height: auto;
}

.index {
  display: flex;
  align-items: center;
  gap: var(--s5);
  flex-wrap: wrap;
}

.index ul {
  display: flex;
  gap: var(--s1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.index a {
  text-decoration: none;
  padding: var(--s2) var(--s4);
  font: 600 19px/1.2 var(--f-draw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease),
    border-color 160ms var(--ease);
}

.index a:hover {
  border-color: var(--white-line);
}

.index a[aria-current="page"] {
  background: var(--sheet);
  color: var(--ink);
  border-color: var(--sheet);
}

.lang {
  display: flex;
  border: 1.5px solid var(--white-line);
}

.lang a {
  padding: var(--s2) var(--s3);
  min-width: 46px;
  justify-content: center;
  border: 0;
  font-size: 17px;
}

.lang a + a {
  border-left: 1.5px solid var(--white-line);
}

.lang a[aria-current="true"] {
  background: #fff;
  color: var(--ink);
}

/* home hero inside the band */
.hero {
  margin-top: var(--s5);
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.hero h1 {
  margin: 0;
  font: 700 clamp(2.9rem, 6vw, 5.2rem) / 0.94 var(--f-draw);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
  hyphens: manual;
}

.hero .lead {
  margin: var(--s5) 0 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: #fffffff0;
}

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: var(--s8);
    align-items: end;
  }

  .hero .lead {
    margin: 0 0 var(--s2);
    border-left: 1.5px solid var(--white-line);
    padding-left: var(--s5);
  }

  .hero .dim,
  .hero .filter {
    grid-column: 1 / -1;
  }
}

/* dimension chain: the line that counts the projects */
.dim {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
  color: #fff;
}

.dim-line {
  flex: 1;
  height: 1px;
  background: var(--white-line);
  position: relative;
  min-width: 24px;
}

.dim-line::before {
  content: "";
  position: absolute;
  top: -9px;
  bottom: -9px;
  width: 1.5px;
  background: var(--white-line);
}

.dim-line.l::before {
  left: 0;
}

.dim-line.r::before {
  right: 0;
}

.dim-line.l::after,
.dim-line.r::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 12px;
  height: 9px;
  background: var(--white-line);
}

.dim-line.l::after {
  left: 0;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.dim-line.r::after {
  right: 0;
  clip-path: polygon(100% 50%, 0 0, 0 100%);
}

.dim-text {
  font: 600 17px/1 var(--f-draw);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .dim-text {
    white-space: normal;
    text-align: center;
    max-width: 12em;
    line-height: 1.2;
  }
}

/* filter: group buttons as index tabs */
.filter {
  margin: var(--s4) 0 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.filter legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.filter button {
  font: 600 16px/1 var(--f-draw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  color: #fff;
  background: transparent;
  border: 1.5px solid var(--white-line);
  padding: 0 var(--s4);
  min-height: 44px;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.filter button:hover {
  background: #ffffff24;
}

.filter button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
}

.filter .n {
  margin-left: var(--s2);
  opacity: 0.7;
  font-weight: 500;
}

/* compact band on inner pages */
.is-inner .band-in {
  padding-block: var(--s6) var(--s6);
}

.is-inner .band::after {
  background: none;
}

/* ==========================================================================
   Sheets: one project per drawing sheet
   ========================================================================== */
.main {
  position: relative;
}

.projects {
  width: min(100% - 2 * var(--gut), var(--max));
  margin: calc(-1 * var(--s9)) auto 0;
  position: relative;
  z-index: 3;
  scroll-margin-top: 0;
}

.sheets {
  display: grid;
  gap: var(--s6);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 1060px) {
  .sheets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .sheets {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s5);
  }
}

.sheet {
  display: flex;
  min-width: 0;
  background: var(--sheet);
  padding: 8px;
  border: 1px solid var(--hair);
  box-shadow:
    0 1px 0 var(--hair),
    0 26px 40px -30px #0f25408c;
}

.sheet[hidden] {
  display: none;
}

.sheet.l {
  grid-column: 1 / -1;
}

@media (min-width: 761px) {
  .sheet.l .sheet-in {
    flex-direction: row;
  }

  .sheet.l .draw {
    flex: 1.5 1 0;
    border-bottom: 0;
    border-right: 1.5px solid var(--ink);
  }

  .sheet.l .tb {
    flex: 1 1 0;
    min-width: 340px;
  }
}

.sheet-in {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1.5px solid var(--ink);
  min-width: 0;
}

/* drawing area: faint millimetre grid, screenshot pasted in with room for dimension lines */
.draw {
  position: relative;
  display: block;
  text-decoration: none;
  padding: 34px 22px 22px 40px;
  background-color: var(--sheet);
  background-image: linear-gradient(var(--hair-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-2) 1px, transparent 1px);
  background-size: 10px 10px;
  border-bottom: 1.5px solid var(--ink);
}

.draw .pic {
  display: block;
  border: 1px solid var(--ink);
  background: #fff;
  aspect-ratio: 1440 / 900;
  overflow: hidden;
}

.draw img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* dimension lines (top and left) with the real capture size; muted at rest, red-pencil on hover/focus */
.dm {
  position: absolute;
  color: var(--ink-2);
  font: 600 11px/1 var(--f-draw);
  letter-spacing: 0.1em;
  transition: color 200ms var(--ease);
  pointer-events: none;
}

.dm::before,
.dm::after {
  content: "";
  position: absolute;
  background: currentcolor;
}

.dm span {
  position: absolute;
  background: var(--sheet);
  padding: 0 6px;
  white-space: nowrap;
}

.dm.x {
  top: 10px;
  left: 40px;
  right: 22px;
  height: 12px;
  border-left: 1.5px solid currentcolor;
  border-right: 1.5px solid currentcolor;
}

.dm.x::before {
  left: 0;
  right: 0;
  top: 5px;
  height: 1px;
}

.dm.x span {
  left: 50%;
  top: -1px;
  transform: translateX(-50%);
}

.dm.y {
  left: 12px;
  top: 34px;
  bottom: 22px;
  width: 12px;
  border-top: 1.5px solid currentcolor;
  border-bottom: 1.5px solid currentcolor;
}

.dm.y::before {
  top: 0;
  bottom: 0;
  left: 5px;
  width: 1px;
}

.dm.y span {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.sheet:hover .dm,
.sheet:focus-within .dm {
  color: var(--red);
}

.draw:focus-visible {
  outline-offset: -6px;
}

.tb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto auto;
  flex: 1;
  min-width: 0;
}

.tb > * {
  padding: var(--s3) var(--s4);
  min-width: 0;
}

.tb-name {
  border-bottom: 1.5px solid var(--ink);
}

.tb-name h3 {
  margin: 0;
  font: 700 clamp(1.5rem, 2.1vw, 1.95rem) / 1 var(--f-draw);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: manual;
}

.tb-nr {
  border-bottom: 1.5px solid var(--ink);
  border-left: 1.5px solid var(--ink);
  text-align: center;
  min-width: 88px;
}

.tb-nr b {
  font: 600 22px/1 var(--f-draw);
  letter-spacing: 0.04em;
}

.tb-desc {
  grid-column: 1 / -1;
  border-bottom: 1.5px solid var(--ink);
  padding-block: var(--s3);
}

.tb-desc .purpose {
  margin: 0 0 var(--s2);
  font: 600 18px/1.35 var(--f-text);
  text-wrap: balance;
}

.tb-desc .text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
}

.tb-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  border-bottom: 1.5px solid var(--ink);
}

.tb-meta > div {
  padding: var(--s3) var(--s4);
  min-width: 0;
}

.tb-meta > div + div {
  border-left: 1.5px solid var(--ink);
}

.tb-meta > div:nth-child(3) {
  grid-column: 1 / -1;
  border-left: 0;
  border-top: 1.5px solid var(--ink);
}

.tb-meta .v {
  display: block;
  font: 500 16px/1.3 var(--f-text);
  overflow-wrap: break-word;
}

.tb-meta .host {
  font-feature-settings: "tnum";
  overflow-wrap: anywhere;
}

.tb-open {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: var(--s4) var(--s4);
  min-height: 56px;
  font: 600 19px/1.2 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 180ms var(--ease);
}

.tb-open:hover {
  background: var(--blue-2);
}

.tb-open svg {
  width: 26px;
  height: 14px;
  flex: none;
  transition: transform 220ms var(--ease);
}

.tb-open:hover svg {
  transform: translateX(6px);
}

.tb-open:focus-visible {
  outline-color: var(--red);
  outline-offset: -5px;
}

.sheet.l .tb-desc .text {
  font-size: 16px;
}

/* ==========================================================================
   Sections below the sheets
   ========================================================================== */
.section {
  width: min(100% - 2 * var(--gut), var(--max));
  margin: var(--s9) auto 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--s6);
  align-items: end;
  margin-bottom: var(--s6);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: var(--s5);
}

@media (max-width: 800px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }
}

.section-head h2 {
  margin: 0;
  font: 700 clamp(2.2rem, 4.6vw, 3.6rem) / 0.95 var(--f-draw);
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

.section-head p {
  margin: 0;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 18px;
}

/* parts list (Stueckliste) for the software archive */
.bom {
  width: 100%;
  border-collapse: collapse;
  background: var(--sheet);
  border: 1.5px solid var(--ink);
}

.bom caption {
  text-align: left;
}

.bom th {
  text-align: left;
  font: 600 13px/1.2 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: var(--s3) var(--s4);
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
}

.bom td {
  padding: var(--s4);
  border-top: 1px solid var(--hair);
  vertical-align: top;
}

.bom tr:first-child td {
  border-top: 0;
}

.bom .nm {
  font: 700 22px/1.1 var(--f-draw);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bom .nm a {
  text-decoration: none;
}

.bom .nm a:hover {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.bom .cat {
  color: var(--ink-2);
  width: 15%;
}

.bom .ds {
  max-width: 70ch;
}

@media (max-width: 820px) {
  .bom,
  .bom tbody,
  .bom tr,
  .bom td {
    display: block;
  }

  .bom thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .bom tr {
    padding: var(--s4);
    border-top: 1px solid var(--hair);
  }

  .bom tr:first-child {
    border-top: 0;
  }

  .bom td {
    border: 0;
    padding: 0;
    width: auto;
  }

  .bom .nm {
    white-space: normal;
  }

  .bom .cat {
    margin: var(--s1) 0 var(--s2);
    width: auto;
  }
}

.more {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
  font: 600 19px/1.2 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  padding: 0 var(--s5);
  min-height: 52px;
  background: var(--sheet);
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.more:hover {
  background: var(--ink);
  color: #fff;
}

.more svg {
  width: 26px;
  height: 14px;
}

.two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s6);
}

@media (max-width: 900px) {
  .two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.guides {
  list-style: none;
  margin: var(--s5) 0 0;
  padding: 0;
  border: 1.5px solid var(--ink);
  background: var(--sheet);
}

.guides li + li {
  border-top: 1px solid var(--hair);
}

.guides a {
  display: block;
  padding: var(--s4);
  text-decoration: none;
  font: 600 19px/1.3 var(--f-text);
}

.guides a:hover {
  background: var(--paper);
}

.guides small {
  display: block;
  font-weight: 400;
  font-size: 15px;
  color: var(--ink-2);
  margin-top: 2px;
}

/* ==========================================================================
   Documents (inner pages): software, articles, imprint, 404
   ========================================================================== */
.paper {
  width: min(100% - 2 * var(--gut), var(--max));
  margin: var(--s7) auto 0;
}

.doc {
  background: var(--sheet);
  border: 1px solid var(--hair);
  padding: calc(8px + var(--pad));
  box-shadow: 0 26px 40px -34px #0f254080;
  outline: 1.5px solid var(--ink);
  outline-offset: -9px;
}

.doc > * {
  position: relative;
}

.doc-in,
.doc {
  --pad: clamp(20px, 4vw, 56px);
}

.doc > :first-child {
  margin-top: 0;
}

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

.doc h1 {
  font: 700 clamp(2.2rem, 5vw, 3.8rem) / 0.98 var(--f-draw);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  margin: 0 0 var(--s5);
  max-width: 24ch;
  text-wrap: balance;
}

.doc h2,
.doc h3,
.doc h4 {
  font-family: var(--f-draw);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: var(--s7) 0 var(--s3);
}

.doc h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-transform: uppercase;
  font-weight: 700;
  padding-top: var(--s4);
  border-top: 1.5px solid var(--ink);
  max-width: none;
}

.doc h3 {
  font-size: 1.5rem;
  font-weight: 700;
}

.doc h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc p,
.doc ul,
.doc ol,
.doc dl,
.doc address {
  max-width: 72ch;
  margin: 0 0 var(--s4);
}

.doc li {
  margin-bottom: var(--s2);
}

.doc a {
  color: var(--blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.doc a:hover {
  color: var(--red);
}

/* E-mail address (App\Supports\Mailbox): shown backwards in a right-to-left override, the at sign comes from here */
.mailbox__text {
  unicode-bidi: bidi-override;
  direction: rtl;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.mailbox__at::before {
  content: "@";
}

.doc img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--hair);
}

.doc .logo img {
  border: 0;
}

.doc address {
  font-style: normal;
  border: 1.5px solid var(--ink);
  padding: var(--s4) var(--s5);
  display: inline-block;
  min-width: min(100%, 28ch);
}

.doc pre,
.doc code,
.doc kbd,
.doc samp {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.doc pre {
  max-width: 100%;
  overflow: auto;
  background: #f1f4f7;
  border: 1px solid var(--hair);
  padding: var(--s4);
  margin: 0 0 var(--s5);
  line-height: 1.5;
  tab-size: 4;
}

.doc code {
  background: #eef2f6;
  padding: 1px 5px;
}

.doc pre code {
  background: none;
  padding: 0;
}

.doc table {
  border-collapse: collapse;
  max-width: 100%;
  margin: 0 0 var(--s5);
}

.doc table:not(.bom) th,
.doc table:not(.bom) td {
  border: 1px solid var(--hair);
  padding: var(--s2) var(--s3);
  text-align: left;
  vertical-align: top;
}

.doc table:not(.bom) th {
  background: var(--paper);
  font: 600 14px/1.2 var(--f-draw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc .table {
  width: 100%;
}

.doc blockquote {
  margin: 0 0 var(--s5);
  padding: var(--s3) var(--s5);
  background: var(--paper);
  max-width: 72ch;
}

.doc hr {
  border: 0;
  border-top: 1.5px solid var(--ink);
  margin: var(--s6) 0;
}

.doc .btn,
.doc a.btn,
.doc button.btn,
.doc input[type="submit"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s5);
  background: var(--blue);
  color: #fff;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font: 600 17px/1 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc .btn:hover {
  background: var(--blue-2);
  color: #fff;
}

.doc .alert,
.doc .alert-block {
  border: 1.5px solid var(--ink);
  padding: var(--s4) var(--s5);
  background: var(--sheet);
  max-width: 72ch;
  margin: 0 0 var(--s5);
}

.doc .alert h4,
.doc .alert .alert-heading {
  margin: 0 0 var(--s2);
  padding: 0;
  color: var(--red);
}

.doc .alert-error,
.doc .alert-danger,
.doc .alert-warning {
  border-color: var(--red);
}

.doc .label,
.doc .badge {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--hair);
  padding: 0 var(--s2);
  font-size: 13px;
}

.doc .row,
.doc .row-fluid {
  display: block;
}

.doc [class*="span"] {
  float: none;
  width: auto;
  margin: 0;
}

.doc .pull-right {
  float: right;
  margin-left: var(--s4);
}

.doc .pull-left {
  float: left;
  margin-right: var(--s4);
}

.doc::after {
  content: "";
  display: block;
  clear: both;
}

.doc input[type="text"],
.doc input[type="search"],
.doc select,
.doc textarea {
  font: 400 17px/1.4 var(--f-text);
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--ink);
  padding: var(--s2) var(--s3);
  min-height: 44px;
  border-radius: 0;
}

.doc .note {
  color: var(--ink-2);
  max-width: 72ch;
}

/* article index: search + table */
.finder {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--s4);
  margin: 0 0 var(--s4);
  max-width: 880px;
}

@media (max-width: 640px) {
  .finder {
    grid-template-columns: minmax(0, 1fr);
  }
}

.finder label {
  display: block;
}

.finder input,
.finder select {
  width: 100%;
}

.finder-count {
  font: 600 15px/1 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 var(--s4);
}

.artlist {
  width: 100%;
  border: 1.5px solid var(--ink);
}

.artlist th {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink) !important;
}

.artlist td:first-child,
.artlist th:first-child {
  width: 56px;
  color: var(--ink-2);
  font-feature-settings: "tnum";
}

.artlist td a {
  font-weight: 600;
}

.artlist tr[hidden] {
  display: none;
}

@media (max-width: 820px) {
  .artlist thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .artlist,
  .artlist tbody,
  .artlist tr,
  .artlist td {
    display: block;
    width: auto !important;
  }

  .artlist tr {
    padding: var(--s3) var(--s4);
    border-top: 1px solid var(--hair);
  }

  .artlist tr:first-child {
    border-top: 0;
  }

  .artlist td {
    border: 0 !important;
    padding: 0 !important;
  }

  .artlist td:first-child {
    display: none;
  }

  .artlist td:nth-child(3) {
    color: var(--ink-2);
    font-size: 15px;
  }

  .artlist td:nth-child(n + 4) {
    display: inline;
    font: 600 12px/1 var(--f-draw);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
    margin-right: var(--s3);
  }
}

/* ==========================================================================
   Footer: the title block of the whole set
   ========================================================================== */
.foot {
  margin-top: var(--s9);
}

.foot .frame {
  inset: 14px;
}

.foot-in {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--gut), var(--max));
  margin-inline: auto;
  padding-block: var(--s8);
}

.tbf {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr 0.8fr;
  border: 1.5px solid var(--white-line);
}

@media (max-width: 960px) {
  .tbf {
    grid-template-columns: 1fr 1fr;
  }

  .tbf-cell:nth-child(n + 3) {
    border-top: 1.5px solid var(--white-line);
  }

  .tbf-cell:nth-child(3) {
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .tbf {
    grid-template-columns: 1fr;
  }

  .tbf-cell {
    border-left: 0 !important;
  }

  .tbf-cell + .tbf-cell {
    border-top: 1.5px solid var(--white-line);
  }
}

.tbf-cell {
  padding: var(--s4) var(--s5);
  min-width: 0;
}

.tbf-cell + .tbf-cell {
  border-left: 1.5px solid var(--white-line);
}

.tbf .lab {
  color: #ffffffdb;
}

.tbf p {
  margin: 0;
}

.tbf ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tbf .cols {
  columns: 2;
  column-gap: var(--s5);
}

.tbf li {
  break-inside: avoid;
}

.tbf a {
  display: inline-block;
  padding: var(--s1) 0;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tbf a:hover {
  text-decoration-color: #fff;
  text-decoration-thickness: 2px;
}

.totop {
  margin-top: var(--s2);
  font: 600 15px/1 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
   Open source: repository parts list with download buttons
   ========================================================================== */
.repos .nm {
  white-space: normal;
  min-width: 11ch;
}

.nm-in {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.logo {
  flex: none;
  display: block;
  width: 48px;
  height: 48px;
}

.logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 0;
}

.logo.ph {
  display: grid;
  place-items: center;
  border: 1.5px solid var(--hair);
  color: var(--ink-2);
  font: 700 24px/1 var(--f-draw);
}

.repos .nm a {
  overflow-wrap: anywhere;
}

.lang-tag {
  display: block;
  margin-top: var(--s1);
  font: 600 12px/1.2 var(--f-draw);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.plat {
  display: block;
  margin-top: var(--s2);
  font: 600 13px/1.2 var(--f-draw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.repos .get {
  width: 1%;
  white-space: nowrap;
}

.dl {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  min-width: 150px;
  padding: var(--s2) var(--s4);
  margin: 0 0 var(--s2);
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}

.dl:last-child {
  margin-bottom: 0;
}

.dl:hover {
  background: var(--blue-2);
}

.dl:focus-visible {
  outline-offset: 2px;
}

.dl-os {
  font: 600 18px/1.1 var(--f-draw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dl small {
  font-size: 13px;
  opacity: 0.9;
}

.dlnote {
  display: block;
  margin-top: var(--s2);
  max-width: 24ch;
  white-space: normal;
  font: 400 13px/1.35 var(--f-text);
  color: var(--ink-2);
}

.src {
  font: 600 15px/1.2 var(--f-draw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-underline-offset: 4px;
}

.doc .dl,
.doc .dl:hover {
  color: #fff;
}

@media (max-width: 820px) {
  .repos .get {
    width: auto;
    white-space: normal;
    margin-top: var(--s3);
  }

  .repos td.get {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s2);
  }

  .dl {
    margin: 0;
    flex: 1 1 150px;
  }
}

/* ==========================================================================
   Phone refinements
   ========================================================================== */
@media (max-width: 640px) {
  .band-in {
    padding-block: var(--s5) var(--s5);
  }

  .is-home .band-in {
    padding-bottom: calc(var(--s8) + var(--s5));
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "logo lang" "nav nav";
    align-items: center;
    gap: var(--s4);
  }

  .logo-cell {
    grid-area: logo;
    justify-self: start;
    padding: var(--s2) var(--s3);
  }

  .logo-cell img {
    width: 132px;
  }

  .index {
    display: contents;
  }

  .lang {
    grid-area: lang;
  }

  .index ul {
    grid-area: nav;
    flex-wrap: nowrap;
    gap: 0;
    border: 1.5px solid var(--white-line);
  }

  .index ul li {
    flex: 1 1 auto;
  }

  .index ul li + li {
    border-left: 1.5px solid var(--white-line);
  }

  .index a {
    width: 100%;
    justify-content: center;
    padding: var(--s2) 6px;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-align: center;
  }

  .hero {
    margin-top: var(--s6);
  }

  .dim {
    margin-top: var(--s6);
  }

  .filter {
    gap: 6px;
  }

  .filter button {
    min-height: 40px;
    padding: 0 var(--s3);
    font-size: 15px;
  }

  .projects {
    margin-top: calc(-1 * var(--s8));
  }

  .section {
    margin-top: var(--s8);
  }

  .draw {
    padding: 30px 14px 14px 32px;
  }

  .dm.x {
    left: 32px;
    right: 14px;
    top: 8px;
  }

  .dm.y {
    top: 30px;
    bottom: 14px;
    left: 9px;
  }

  .foot {
    margin-top: var(--s8);
  }
}

/* printing: sheets as plain pages */
@media print {
  .band,
  .foot {
    background: none;
    color: #000;
  }

  .band::after,
  .foot::after,
  .frame,
  .filter,
  .skip {
    display: none;
  }

  .projects {
    margin-top: 0;
  }

  .sheet {
    break-inside: avoid;
    box-shadow: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.mailbox[role="link"] {
  cursor: pointer;
}
