/* PirtoCAD website. Fonts are served from this site only (SIL OFL, see /assets/fonts/). */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-extra-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-extra-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/fira-sans-extra-condensed-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Extra Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/fira-sans-extra-condensed-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-code-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-code-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #131312;
  --night: #1c1b18;
  --charcoal: #272521;
  --charcoal-2: #34312c;
  --sheet: #ffffff;
  --sheet-2: #f6f4f0;
  --rule: #ddd6cb;
  --rule-dark: #4a463f;
  --text: #131312;
  --text-2: #4a443b;
  --text-on-dark: #f3efe8;
  --text-2-on-dark: #c9c1b4;
  --orange: #e95f08;
  --orange-hover: #ff7a1f;
  --orange-text: #a3420a;
  --orange-light: #f28c4b;
  --t-rakennus: #8a8378;
  --t-iv: #2f7fd1;
  --t-putki: #9a6432;
  --t-sahko: #c2416b;
  --t-kaavio: #3c8c5a;
  --radius: 6px;
  --measure: 68ch;
  --gutter: 24px;
  --header-h: 72px;
  --z-sticky: 10;
  --font-display: "Fira Sans Extra Condensed", "Fira Sans", system-ui, sans-serif;
  --font-body: "Fira Sans", system-ui, sans-serif;
  --font-mono: "Fira Code", ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--sheet); color: var(--text); font: 400 17px/1.6 var(--font-body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-text); text-underline-offset: 3px; }
a:hover { color: #7a3107; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--orange); color: var(--ink); padding: 10px 14px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }

h1, h2, h3 {
  font-family: var(--font-display); line-height: 1.08; font-weight: 700; letter-spacing: 0.005em;
  text-wrap: balance; margin: 0 0 0.45em; overflow-wrap: break-word; hyphens: manual;
}
h1 { font-size: clamp(2.4rem, 4.6vw, 4.1rem); }
h1.h1-long { font-size: clamp(2.2rem, 3.7vw, 3.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-top: 0; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
.lede { font-size: 1.2rem; color: var(--text-2); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; }
.section.tight { padding: 64px 0; }
.section-head { margin-bottom: 40px; }
.section-head .lede { margin-bottom: 0; }
.dark { background: var(--charcoal); color: var(--text-on-dark); }
.night { background: var(--night); color: var(--text-on-dark); }
.dark p, .dark .lede, .night p, .night .lede { color: var(--text-2-on-dark); }
.dark a, .night a { color: var(--orange-light); }
.alt { background: var(--sheet-2); }
.muted { color: var(--text-2); }
.small { font-size: 15px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 16px; } .mt-2 { margin-top: 28px; } .mt-3 { margin-top: 40px; } .mt-4 { margin-top: 56px; } .mt-5 { margin-top: 72px; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }

/* header */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(28, 27, 24, 0.97); color: var(--text-on-dark); border-bottom: 1px solid var(--rule-dark); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text-on-dark); text-decoration: none; flex: none; }
.brand img { width: 42px; height: 42px; border-radius: 9px; }
.brand-text { display: grid; line-height: 1; }
.brand-co { font: 600 11px/1 var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2-on-dark); margin-bottom: 4px; }
.brand-product { font: 800 22px/1 var(--font-display); letter-spacing: 0.01em; color: #fff; }
.nav { display: flex; align-items: center; gap: 4px 24px; flex: 1; font-size: 15px; }
.nav > a, .menu > summary { color: var(--text-2-on-dark); text-decoration: none; padding: 8px 0; cursor: pointer; }
.nav > a:hover, .nav > a[aria-current="page"], .menu > summary:hover, .menu.current > summary { color: #fff; box-shadow: inset 0 -2px 0 var(--orange); }
.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; flex: none; margin-right: 3px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.menu ul { position: absolute; left: -14px; top: calc(100% + 10px); list-style: none; margin: 0; padding: 8px; min-width: 210px; background: var(--charcoal); border: 1px solid var(--rule-dark); border-radius: var(--radius); box-shadow: 0 18px 40px -18px rgba(0,0,0,0.7); }
.menu li a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: var(--text-on-dark); text-decoration: none; border-radius: 4px; }
.menu li a::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--thread, var(--orange)); flex: none; }
.menu li a:hover, .menu li a[aria-current="page"] { background: var(--charcoal-2); }
.header-cta { flex: none; }
.lang-link { flex: none; color: var(--text-2-on-dark); text-decoration: none; font: 600 13px/1 var(--font-body); letter-spacing: 0.08em; padding: 9px 8px; border: 1px solid var(--rule-dark); border-radius: var(--radius); }
.lang-link:hover { color: #fff; border-color: var(--text-2-on-dark); }

.th-rakennus { --thread: var(--t-rakennus); } .th-ilmanvaihto { --thread: var(--t-iv); } .th-putkisto { --thread: var(--t-putki); } .th-sahko { --thread: var(--t-sahko); } .th-kaaviot { --thread: var(--t-kaavio); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 16px/1.2 var(--font-body); text-decoration: none; padding: 13px 20px; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color 160ms cubic-bezier(.16,1,.3,1), color 160ms cubic-bezier(.16,1,.3,1); }
.btn.btn-primary { background: var(--orange); color: var(--ink); }
.btn.btn-primary:hover { background: var(--orange-hover); color: var(--ink); }
.btn.btn-ghost { border-color: currentColor; color: var(--text); background: transparent; }
.dark .btn.btn-ghost, .night .btn.btn-ghost { color: var(--text-on-dark); }
.btn.btn-ghost:hover { background: rgba(127,127,127,0.12); }
.btn.btn-small { padding: 9px 14px; font-size: 14px; }
.btn[aria-disabled="true"] { background: transparent; border-color: currentColor; color: inherit; opacity: 0.75; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 28px; }

/* hero */
.hero { padding: 80px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--text-2-on-dark); }
.facts li { display: flex; gap: 8px; align-items: center; }
.facts svg { width: 16px; height: 16px; color: var(--orange-light); flex: none; }
.crumbs { font-size: 14px; margin: 0 0 18px; color: var(--text-2); }
.crumbs a { color: var(--text-2); }
.dark .crumbs, .night .crumbs, .dark .crumbs a, .night .crumbs a { color: var(--text-2-on-dark); }

/* app window frame */
.window { border-radius: 10px; overflow: hidden; background: #0f0f0e; border: 1px solid #3a3731; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.3); }
.window-bar { display: flex; gap: 7px; padding: 10px 12px; background: #1f1e1b; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #45413a; display: block; }
.window .ph { border-radius: 0; border-width: 0; }

/* placeholder for a coming video or image: never looks like a product image */
.ph { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 240px; padding: 48px 24px 24px; border: 2px dashed #8f877b; border-radius: var(--radius); background: linear-gradient(135deg, transparent 49.7%, rgba(143,135,123,0.22) 50%, transparent 50.3%), var(--sheet-2); color: var(--text-2); font-size: 15px; line-height: 1.45; }
.dark .ph, .night .ph { background: linear-gradient(135deg, transparent 49.7%, rgba(201,193,180,0.16) 50%, transparent 50.3%), #2e2b27; color: var(--text-2-on-dark); border-color: #6d665b; }
.ph .ph-tag { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--font-mono); padding: 6px 8px; border-radius: 4px; background: rgba(0,0,0,0.07); color: var(--text-2); }
.dark .ph .ph-tag, .night .ph .ph-tag { background: rgba(255,255,255,0.1); color: var(--text-2-on-dark); }
.ph .ph-tag svg { width: 13px; height: 13px; }
.ph .ph-title { font-size: 17px; font-weight: 600; color: var(--text); max-width: 46ch; }
.dark .ph .ph-title, .night .ph .ph-title { color: var(--text-on-dark); }
.ph .ph-text { max-width: 60ch; }
.ph.ph-video { aspect-ratio: 16 / 9; min-height: auto; } /* auto: a fixed min-height would widen the box through the ratio */
.ph.ph-tall { min-height: 380px; }
.ph.ph-paper { background: linear-gradient(135deg, transparent 49.7%, rgba(143,135,123,0.22) 50%, transparent 50.3%), #fff; }
.ph.ph-mt { margin-top: 24px; }
.card[class*="th-"] .ph { box-shadow: inset 0 4px 0 var(--thread); }
.caption { font-size: 14px; color: var(--text-2); margin: 10px 0 0; }
.dark .caption, .night .caption { color: var(--text-2-on-dark); }

/* woven thread band */
.weave { display: block; width: 100%; height: 56px; margin-top: 56px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px; margin-top: 40px; counter-reset: step; }
.step .ph:not(.ph-video) { min-height: 200px; }
.step h3 { display: flex; gap: 12px; align-items: baseline; margin-top: 20px; }
.step h3::before { counter-increment: step; content: counter(step); font: 500 15px/1 var(--font-mono); color: var(--orange-text); }

/* two columns */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split > * { min-width: 0; }
.split.top { align-items: start; }
.split.flip > :first-child { order: 2; }
.rows > .split + .split { margin-top: 64px; }

/* points */
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.points li { padding-left: 24px; position: relative; max-width: 62ch; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 12px; height: 2px; background: var(--orange); }

/* command sample */
pre.cmd { white-space: pre-wrap; overflow-wrap: anywhere; font: 500 14px/1.65 var(--font-mono); background: #0f0f0e; color: #e8e2d6; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; border: 1px solid #3a3731; margin: 0; tab-size: 2; }
pre.cmd .c { color: #9a9284; }
pre.cmd .k { color: var(--orange-light); }
code { font: 500 0.9em var(--font-mono); }

/* disciplines as woven rows */
.trades { border-top: 1px solid var(--rule); margin-top: 36px; }
.trade { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); position: relative; }
.trade::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--thread); transform: scaleX(0.18); transform-origin: left; transition: transform 260ms cubic-bezier(.16,1,.3,1); }
.trade:hover::before { transform: scaleX(1); }
.trade h3 { margin: 0; }
.trade p { margin: 0; color: var(--text-2); }
.trade h3 a { color: inherit; text-decoration: none; }
.trade h3 a::after { content: ""; position: absolute; inset: 0; }
.trade h3 a:focus-visible { outline: none; }
.trade:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.trade:hover h3 a { text-decoration: underline; text-underline-offset: 4px; }
.trade-go { font-size: 22px; line-height: 1; color: var(--orange-text); transition: transform .2s; }
.trade:hover .trade-go { transform: translateX(4px); }

/* tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--text-2); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
td:first-child, th:first-child { padding-left: 0; }
.dark th, .dark td, .night th, .night td { border-color: var(--rule-dark); }
.dark th, .night th { color: var(--text-2-on-dark); }

/* notices */
.notice { border: 1px solid var(--rule); border-left: 4px solid var(--orange); background: var(--sheet-2); padding: 20px 22px; border-radius: var(--radius); font-size: 15px; }
.notice p { margin: 0 0 0.5em; max-width: none; }
.notice p:last-child { margin: 0; }
.dark .notice, .night .notice { background: #2e2b27; border-color: var(--rule-dark); border-left-color: var(--orange); }

/* coming list */
.coming { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.coming li { display: flex; gap: 10px; align-items: baseline; }
.coming li::before { content: "Tulossa"; font: 500 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 6px; border: 1px solid currentColor; border-radius: 3px; opacity: 0.8; flex: none; }

/* cards (academy, paths) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 28px 24px; margin-top: 32px; }
.card { display: grid; gap: 10px; align-content: start; }
.card .ph { min-height: auto; aspect-ratio: 16 / 9; padding: 44px 16px 16px; font-size: 14px; }
.card .ph { align-items: center; justify-content: center; padding: 16px; }
.card .ph .ph-tag { position: static; font-size: 13px; }
.card .ph .ph-title, .card .ph .ph-text { display: none; }
.card h3 { font: 600 16px/1.35 var(--font-body); letter-spacing: 0; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; line-height: 1; padding: 5px 7px; border-radius: 3px; background: var(--sheet-2); border: 1px solid var(--rule); color: var(--text-2); }
.badge.lvl { border-color: var(--orange-text); color: var(--orange-text); background: #fff; }
.dark .badge, .night .badge { background: transparent; border-color: var(--rule-dark); color: var(--text-2-on-dark); }
.dark .badge.lvl, .night .badge.lvl { border-color: var(--orange-light); color: var(--orange-light); }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 32px; margin-top: 28px; border-top: 1px solid var(--rule); }
.dark .paths, .night .paths { border-color: var(--rule-dark); }
.path { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.dark .path, .night .path { border-color: var(--rule-dark); }
.path h3 { font-size: 1.15rem; margin-bottom: 6px; }
.path p { font-size: 15px; margin: 0; }

/* download */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; margin-top: 36px; }
.platform { background: var(--sheet); color: var(--text); border-radius: 8px; padding: 26px; display: grid; gap: 12px; align-content: start; border-top: 4px solid var(--orange); }
.platform h3 { margin: 0; }
.platform p { margin: 0; color: var(--text-2); font-size: 15px; }
.platform ul { margin: 0; padding-left: 18px; font-size: 15px; color: var(--text-2); }
.platform .pkg { font: 500 13px/1.4 var(--font-mono); color: var(--text-2); overflow-wrap: anywhere; }
.platform .btn { justify-self: start; }
.platform.detected { outline: 3px solid var(--orange); outline-offset: 3px; }
.night .platform a:not(.btn), .dark .platform a:not(.btn) { color: var(--orange-text); }
.tag { display: inline-block; justify-self: start; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 3px; background: var(--orange); color: var(--ink); }

.cards.cards-2 { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin-top: 20px; }
.name-img { width: 200px; height: 200px; border-radius: 28px; justify-self: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: center; justify-content: space-between; }
.cta-row h2 { margin: 0; }
.platform .pkg a { color: var(--orange-text); }

/* prose pages (legal, about) */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 48px; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0 0 1em; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; }
.page-head { padding: 72px 0 40px; }
.page-head h1 { margin-bottom: 0.3em; }

/* footer */
.site-footer { background: var(--night); color: var(--text-2-on-dark); padding: 56px 0 40px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 32px; }
.site-footer h2 { color: var(--text-on-dark); font: 600 15px/1.3 var(--font-body); letter-spacing: 0; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--text-2-on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal { border-top: 1px solid var(--rule-dark); margin-top: 40px; padding-top: 20px; font-size: 13px; display: grid; gap: 6px; }
.site-footer .legal p { margin: 0; max-width: none; color: var(--text-2-on-dark); }

@media (max-width: 1020px) {
  .site-header .wrap { gap: 20px; }
  .nav { gap: 4px 18px; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; --header-h: 0px; }
  .site-header { position: static; }
  .site-header .wrap { flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; padding-bottom: 4px; min-height: 0; }
  .lang-link { margin-left: auto; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: wrap; gap: 0 18px; }
  .nav > a, .menu > summary { white-space: nowrap; padding: 10px 0; }
  .menu { position: static; }
  .menu ul { left: var(--gutter); right: var(--gutter); top: auto; z-index: 20; }
  .hero { padding: 48px 0 32px; }
  .hero-grid, .hero-grid.even, .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .split.flip > :first-child { order: 0; }
  .rows > .split + .split { margin-top: 48px; }
  .trade { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .trade-go { display: none; }
  .section { padding: 64px 0; }
  .section.tight { padding: 48px 0; }
  .page-head { padding: 48px 0 24px; }
  .ph.ph-tall { min-height: 260px; }
  .weave { margin-top: 40px; }
  .prose dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .prose dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .lede { font-size: 1.1rem; }
  .nav { gap: 0 14px; font-size: 14px; }
  .actions .btn { flex: 1 1 auto; padding: 12px 14px; font-size: 15px; }
  table.stack thead { display: none; }
  table.stack tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  table.stack td { border: 0; padding: 2px 0; }
  .dark table.stack tr, .night table.stack tr { border-color: var(--rule-dark); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Real PirtoCAD captures (x-shot): capture/shoot.py from the app's own --smoke mode, never mock-ups */
.shot { margin: 0; }
.shot.shot-mt { margin-top: 24px; }
.shot-link { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: #fff; line-height: 0; box-shadow: 0 1px 2px rgba(19,19,18,0.06), 0 8px 24px rgba(19,19,18,0.08); }
.dark .shot-link, .night .shot-link { border-color: var(--rule-dark); box-shadow: 0 8px 28px rgba(0,0,0,0.35); }
.card[class*="th-"] .shot-link { box-shadow: inset 0 4px 0 var(--thread); }
.shot-link img { display: block; width: 100%; height: auto; }
.shot-link:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.shot-zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(19,19,18,0.72); color: #fff; opacity: 0; transition: opacity .15s; }
.shot-zoom svg { width: 18px; height: 18px; }
.shot-link:hover .shot-zoom, .shot-link:focus-visible .shot-zoom { opacity: 1; }
@media (hover: none) { .shot-zoom { opacity: 1; } }
.shot-tag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1 var(--font-mono); padding: 7px 9px; border-radius: 4px; background: rgba(19,19,18,0.82); color: #fff; border: 1px dashed rgba(255,255,255,0.55); }
.shot-tag svg { width: 13px; height: 13px; }
.shot figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--text-2); max-width: 70ch; }
.dark .shot figcaption, .night .shot figcaption { color: var(--text-2-on-dark); }
.shot figcaption strong { color: var(--text); font-weight: 600; }
.dark .shot figcaption strong, .night .shot figcaption strong { color: var(--text-on-dark); }
.card .shot figcaption { display: none; }
.card .shot-link { border-radius: var(--radius) var(--radius) 0 0; border-width: 0 0 1px; box-shadow: none; }
.window .shot-link { border-radius: 0; border-width: 0; box-shadow: none; }
.window .shot figcaption { padding: 0 14px 12px; }
/* enlargement dialog (site.js); without JS the link opens the image file */
dialog.shot-dialog { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.shot-dialog::backdrop { background: rgba(10,10,9,0.88); }
.shot-dialog-inner { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 56px 16px 16px; overflow: auto; }
.shot-dialog img { max-width: 100%; max-height: calc(100vh - 80px); width: auto; height: auto; cursor: zoom-in; border-radius: 4px; background: #fff; }
.shot-dialog.full img { max-width: none; max-height: none; cursor: zoom-out; }
.shot-dialog-close { position: fixed; top: 12px; right: 12px; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid rgba(255,255,255,0.4); background: rgba(19,19,18,0.8); color: #fff; font: 500 15px var(--font-body); cursor: pointer; }
.shot-dialog-close:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
/* ===== Drafting field: the icon's orange ground and white drafting construction (decoration only) =====
   Ornaments are plain SVG files in assets/deco/, edit them by hand. */
:root {
  --sheet: #fffdf9;
  --sheet-2: #f8f1e5;
  --rule: #e2d7c5;
  --paper: #fdf6e9;
  --cream: #f6e3c6;
  --stone: #cfc1ac;
  --warm-grey: #8b8275;
  --field: #e95f08;
  --field-ink: #141413;
  --mark: var(--orange-text);
  --grain: url("deco/grain.svg");
  --grain-light: url("deco/grain-light.svg");
}
.dark, .night { --mark: var(--orange); }
.field { --mark: #fff; }

/* header: the loom's orange accent bar under the dark rail */
.site-header { border-bottom: 0; box-shadow: inset 0 -3px 0 var(--orange); background-image: var(--grain-light); }
.site-header .wrap { padding-bottom: 3px; }

/* the orange field */
.field {
  position: relative; isolation: isolate;
  background-color: var(--field); color: var(--field-ink);
  background-image: var(--grain), url("deco/field-construction.svg");
  background-repeat: repeat, no-repeat;
  background-size: 240px 240px, 1600px 900px;
  background-position: 0 0, calc(50% + 200px) 0;
}
.field.hero { padding: 88px 0 72px; }
.field p, .field .lede, .field .facts, .field .crumbs, .field .crumbs a, .field .caption { color: var(--field-ink); }
.field a:not(.btn) { color: var(--field-ink); text-decoration-thickness: 1.5px; }
.field a:not(.btn):hover { color: #000; }
.field .facts svg { color: var(--field-ink); }
.field :focus-visible { outline-color: var(--field-ink); }
.field .btn.btn-primary { background: var(--field-ink); color: var(--paper); }
.field .btn.btn-primary:hover { background: #2e2b26; color: #fff; }
.field .btn.btn-ghost { color: var(--field-ink); border-color: var(--field-ink); }
.field .btn.btn-ghost:hover { background: rgba(20,20,19,0.10); }
.field .points li::before { background: var(--field-ink); }
.field .notice { background: var(--paper); border-color: rgba(20,20,19,0.25); border-left-color: var(--field-ink); color: var(--text); }
.field .notice p { color: var(--text); }
.field .platform { background: var(--paper); border-top-color: var(--field-ink); box-shadow: 0 1px 0 rgba(20,20,19,0.2), 0 18px 36px -24px rgba(20,20,19,0.55); }
.field .platform p, .field .platform ul, .field .platform .pkg { color: var(--text-2); }
.field .platform a:not(.btn) { color: var(--orange-text); }
.field .platform.detected { outline: 0; border-top-width: 6px; box-shadow: 0 0 0 1px rgba(20,20,19,0.35), 0 18px 36px -24px rgba(20,20,19,0.55); }
.field .weave { --rule-dark: rgba(255,255,255,0.6); }
.field pre.cmd { border-color: var(--field-ink); box-shadow: 10px 10px 0 -1px rgba(20,20,19,0.28); }
.field .ph { background-color: var(--paper); border-color: var(--field-ink); color: var(--text-2); }
.field .ph .ph-title { color: var(--text); }
.field .ph .ph-tag { background: var(--field-ink); color: var(--paper); }

.field.section { background-image: var(--grain), url("deco/field-section-construction.svg"); background-size: 240px 240px, 1100px 619px; background-position: 0 0, calc(50% + 170px) calc(100% + 280px); }

/* registration frame around a framed object (corner marks + a target on top) */
.frame { position: relative; }
.frame::before {
  content: ""; position: absolute; inset: -14px; pointer-events: none; z-index: 0;
  --c: var(--mark); --l: 22px; --w: 1.5px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l) no-repeat;
}
.frame::after {
  content: ""; position: absolute; left: 50%; top: -28px; width: 28px; height: 28px; margin-left: -14px; pointer-events: none;
  background-color: var(--mark); -webkit-mask: url("deco/frame-target.svg") center / 28px no-repeat; mask: url("deco/frame-target.svg") center / 28px no-repeat;
}
.frame > * { position: relative; z-index: 1; }
.field .frame > .ph { box-shadow: 14px 14px 0 -2px rgba(20,20,19,0.30); }
.field .window { border-color: var(--field-ink); box-shadow: 14px 14px 0 -2px rgba(20,20,19,0.30); }
.field .window-bar { background: #141413; }
.field .window-bar i { background: #8b8275; }
.field .window .ph { background-color: #2e2b26; color: var(--text-2-on-dark); }
.field .window .ph .ph-title { color: var(--text-on-dark); }
.field .window .ph .ph-tag { background: var(--paper); color: var(--field-ink); }

/* headings anchored by a datum mark: a centre circle and an arrowed line */
main h1::before, main h2::before {
  content: ""; display: block; width: 120px; height: 16px; margin-bottom: 18px;
  background-color: var(--mark);
  -webkit-mask: url("deco/datum-mark.svg") left center / 120px 16px no-repeat; mask: url("deco/datum-mark.svg") left center / 120px 16px no-repeat;
}
main .prose h2::before, main .page-head h1::before { width: 72px; -webkit-mask-size: 120px 16px; mask-size: 120px 16px; }
main .cta-row h2::before { margin-bottom: 12px; }

/* dark sections: faceted planes like the cat's body, with print grain */
.night, .dark {
  background-image: var(--grain-light), url("deco/facets-dark.svg");
  background-repeat: repeat, no-repeat;
  background-size: 240px 240px, auto min(640px, 92%);
  background-position: 0 0, right bottom;
}
.site-footer { background-image: var(--grain-light); }

/* light alternate sections: a strip of cream weave along the lower edge */
.alt { position: relative; background-image: var(--grain-light); }
.alt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; pointer-events: none;
  background: url("deco/weave-strip.svg") 0 0 / 32px 16px repeat-x;
  border-top: 1px solid var(--stone);
}

/* steps numbered in drafting balloons */
.step h3 { align-items: center; }
.step h3::before { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border: 1.5px solid var(--orange-text); border-radius: 50%; font-size: 14px; background: var(--sheet); }

/* trades: each row starts with a heddle in the trade colour */
.trade h3::before { content: ""; display: inline-block; vertical-align: -5px; width: 5px; height: 26px; border-radius: 1px; background: var(--thread); box-shadow: 9px 0 0 -1px var(--thread); margin-right: 20px; }
.trades { border-top-color: var(--stone); }
.trade { border-bottom-color: var(--rule); }

/* placeholders: dashed and tagged, no ornament inside (it would read as a drawing) */
.ph .ph-tag { background: var(--field-ink); color: var(--paper); }
.dark .ph .ph-tag, .night .ph .ph-tag { background: var(--paper); color: var(--field-ink); }


/* notices: an orange accent bar like the loom's upright */
.notice { border-left-width: 6px; background-image: var(--grain-light); }

/* the app icon framed by construction rings */
.icon-frame { position: relative; justify-self: center; display: grid; place-items: center; width: 320px; height: 320px; max-width: 100%; }
.icon-frame::before { content: ""; position: absolute; inset: 0; background: url("deco/icon-frame-rings.svg") center / contain no-repeat; pointer-events: none; }
.icon-frame .name-img { position: relative; }

/* footer: the loom rail with bolts, then the heddles */
.site-footer { position: relative; padding-top: 92px; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px;
  background:
    radial-gradient(circle at center, #d9d4cb 0 3px, #5b574f 3.5px 5px, transparent 5.5px) 18px 50% / 22px 22px no-repeat,
    radial-gradient(circle at center, #d9d4cb 0 3px, #5b574f 3.5px 5px, transparent 5.5px) calc(100% - 18px) 50% / 22px 22px no-repeat,
    linear-gradient(var(--orange), var(--orange)) 56px 0 / 10px 100% no-repeat,
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 3px),
    linear-gradient(#b9b3a8, #8e887d 45%, #6f6a61 55%, #9d978c);
}
.site-footer::after {
  content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 30px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(201,193,180,0.42) 0 1px, transparent 1px 9px);
  -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent);
}

/* legal and plain page heads: faint stone construction */
.page-head { background: url("deco/page-head-construction.svg") calc(50% + 260px) -60px / 1600px 900px no-repeat; }

@media (max-width: 860px) {
  .field, .field.section { background-image: var(--grain), url("deco/field-section-construction.svg"); background-size: 240px 240px, 1100px 619px; background-position: 0 0, -511px calc(100% + 250px); }
  .field.section { background-position: 0 0, -400px calc(100% + 330px); }
  .field.hero { padding: 56px 0 48px; background-image: url("deco/field-hero-mobile.svg"), var(--grain), url("deco/field-section-construction.svg"); background-repeat: no-repeat, repeat, no-repeat; background-size: 140px 140px, 240px 240px, 1100px 619px; background-position: right -46px top -38px, 0 0, -511px calc(100% + 250px); }
  .frame::before { inset: -10px; --l: 16px; }
  .frame::after { top: -22px; }
  .icon-frame { width: 280px; height: 280px; }
  .night, .dark { background-size: 240px 240px, auto 300px; }
  .site-footer { padding-top: 80px; }
}
/* the woven band under the home hero (from the loom variant): steel beam, heddles, five trade threads over cream warp */
.weave { height: 132px; margin-top: 56px; }
@media (max-width: 860px) { .weave { margin-top: 40px; } }
/* a real capture in a registration frame: no fake window chrome, the app's own title bar shows */
.shot .frame { margin-bottom: 28px; }
.shot .frame > .shot-link { border-color: var(--field-ink); box-shadow: 14px 14px 0 -2px rgba(20,20,19,0.30); }
.field .shot figcaption, .field .shot figcaption strong { color: var(--field-ink); }
/* discipline heroes: a short dashed thread in the page's own trade colour under the H1 (from the loom variant) */
.field.hero[class*="th-"] h1::after { content: ""; display: block; width: 112px; height: 6px; margin-top: 20px; background: repeating-linear-gradient(90deg, var(--thread) 0 16px, transparent 16px 22px); }
/* phones: no construction behind the closing call to action, the arcs would cross the text column */
@media (max-width: 860px) { .field.section { background-image: var(--grain); } }
/* ===== /Drafting field ===== */
.shot-panel { max-width: 400px; justify-self: center; width: 100%; }
.shot-panel .shot-link { background: #2b2b2b; }
.shot-stack { display: grid; gap: 24px; }
.card .shot-link img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 0 0; }

/* command reference */
.cmd-index { list-style: none; padding: 0; margin: 0 0 32px; columns: 4 130px; column-gap: 20px; font-size: 14px; color: var(--text-2); }
.cmd-index li { margin: 0 0 4px; break-inside: avoid; }
.cmd-group { border-top: 1px solid var(--rule); }
.cmd-group:last-of-type { border-bottom: 1px solid var(--rule); }
.cmd-group > summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.cmd-group > summary .muted { font-weight: 400; margin-left: 6px; }
.cmd-group[open] > summary { color: var(--orange-text); }
.cmd-table { margin-bottom: 20px; table-layout: fixed; }
.cmd-table th:nth-child(1) { width: 30%; } .cmd-table th:nth-child(2) { width: 34%; } .cmd-table th:nth-child(3) { width: 20%; } .cmd-table th:nth-child(4) { width: 16%; }
.cmd-table code { overflow-wrap: anywhere; }
