:root {
  --ink: #121820;
  --ink-2: #1d2a38;
  --paper: #eef2f5;
  --white: #fbfcfd;
  --line: #c3ccd6;
  --muted: #5b6774;
  --blue: #0f4c81;
  --blue-dark: #0a355c;
  --orange: #e4572e;
  --green: #1f7a5c;
  --wrap: 1180px;
  --shadow: 0 12px 28px rgba(18, 24, 32, .07);
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15,76,129,.08), transparent 60%),
    linear-gradient(180deg, #e8eef3 0%, var(--paper) 220px);
  font-family: var(--font-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
img, svg { max-width: 100%; }
.skip {
  position: fixed; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden;
}
.skip:focus {
  z-index: 999; width: auto; height: auto; clip-path: none; left: 16px; top: 16px;
  padding: 12px 18px; background: var(--white); color: var(--ink);
}
.site-head { background: var(--ink); color: var(--white); }
.head-wrap, .nav-wrap, .foot-grid, .foot-base, .page-wrap, .home-wrap {
  width: min(calc(100% - 40px), var(--wrap)); margin-inline: auto;
}
.head-wrap { min-height: 92px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand-name { font: 700 clamp(22px, 3vw, 31px)/1 var(--font-display); letter-spacing: -.03em; }
.brand-glyph { width: 36px; height: 36px; border: 2px solid var(--orange); display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; padding: 5px; transform: rotate(-2deg); }
.brand-glyph i { background: var(--white); border-radius: 1px; }
.brand-glyph i:nth-child(2) { background: var(--orange); transform: translateY(4px); }
.head-meta { display: flex; gap: 9px; }
.head-meta span { font: 700 10px/1 var(--font-mono); letter-spacing: .12em; padding: 7px 9px; border: 1px solid #526171; color: #d9e0e6; }
.menu-btn { display: none; }
.main-nav { border-top: 1px solid #3a4755; }
.nav-wrap { display: flex; align-items: center; gap: 25px; min-height: 45px; overflow-x: auto; scrollbar-width: none; }
.nav-wrap a { color: #e8edf1; text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 650; }
.nav-wrap a:hover, .nav-wrap a:focus-visible { color: #fff; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
.signal-line { height: 6px; display: grid; grid-template-columns: 9fr 2fr 1fr 1fr; }
.signal-line span:nth-child(1) { background: var(--blue); }
.signal-line span:nth-child(2) { background: var(--orange); }
.signal-line span:nth-child(3) { background: var(--green); }
.signal-line span:nth-child(4) { background: var(--ink); }
main { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 9px; padding: 22px 0 5px; color: var(--muted); font-size: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.page-title { padding: 44px 0 35px; border-bottom: 1px solid var(--line); max-width: 920px; }
.page-kicker, .section-tag, .section-head span, .eyebrow {
  font: 750 11px/1.2 "Consolas", monospace; letter-spacing: .13em; color: var(--blue);
}
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.035em; }
.page-title h1 { max-width: 850px; margin: 14px 0 20px; font-size: clamp(42px, 7vw, 78px); font-weight: 820; }
.answer { margin: 0; max-width: 800px; font-size: clamp(19px, 2.4vw, 25px); line-height: 1.42; color: #344252; }
.article-grid { display: grid; grid-template-columns: minmax(0, 780px) 260px; gap: 70px; padding: 42px 0 90px; }
.article-grid article, .article-sec > div, .trust-body { min-width: 0; }
.fact-console {
  margin: 0 0 38px; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  background: var(--ink); color: #fff; border-top: 5px solid var(--orange);
}
.fact-console > div { padding: 17px 19px; border-right: 1px solid #40505f; border-bottom: 1px solid #40505f; min-width: 0; }
.fact-console dt { margin-bottom: 7px; color: #a9b6c1; font: 700 10px/1 monospace; letter-spacing: .1em; text-transform: uppercase; }
.fact-console dd { margin: 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.fact-console a, .fact-console sup a { color: #fff; }
.article-sec { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 18px; padding: 35px 0; border-top: 1px solid var(--line); }
.sec-num { font: 800 12px/1 monospace; color: var(--orange); padding-top: 6px; }
.article-sec h2, .sources h2, .faq h2, .miscon h2, .child-map h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 22px; }
.article-sec h3 { font-size: 21px; margin-bottom: 8px; }
.article-sec p { margin: 0 0 17px; font-size: 17px; }
.inline-link { font-weight: 650; text-decoration-thickness: 1px; }
.cite a { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; background: var(--blue); color: #fff; text-decoration: none; font: 700 10px/1 monospace; }
.key-list { list-style: none; margin: 8px 0 22px; padding: 0; border-top: 1px solid var(--line); }
.key-list li { position: relative; padding: 11px 8px 11px 30px; border-bottom: 1px solid var(--line); }
.key-list li::before { content: "→"; position: absolute; left: 4px; color: var(--orange); font-weight: 900; }
.note { margin: 22px 0; padding: 18px 20px; border-left: 4px solid var(--blue); background: #e7ecf7; }
.note strong { display: block; margin-bottom: 5px; font: 800 11px/1 monospace; letter-spacing: .12em; color: var(--blue-dark); }
.note p { margin: 0; }
.example { margin: 23px 0; padding: 22px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.example > span { color: var(--orange); font: 800 10px/1 monospace; letter-spacing: .12em; }
.example h3 { margin-top: 8px; }
.table-scroll { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th { padding: 12px 14px; text-align: left; background: var(--ink); color: #fff; font: 750 12px/1.3 monospace; }
td { padding: 12px 14px; border-top: 1px solid #ddd7cb; vertical-align: top; }
tbody tr:nth-child(even) { background: #f1eee7; }
.timeline { list-style: none; margin: 22px 0; padding: 0; border-left: 2px solid var(--blue); }
.timeline li { display: grid; grid-template-columns: 85px 1fr; gap: 15px; padding: 10px 0 10px 20px; }
.timeline b { color: var(--blue); font-family: monospace; }
.side-rail { position: relative; }
.rail-card { position: sticky; top: 18px; margin-bottom: 18px; padding: 20px; border-top: 4px solid var(--orange); background: var(--white); box-shadow: var(--shadow); }
.rail-card span { display: block; margin-bottom: 10px; color: var(--muted); font: 750 10px/1 monospace; letter-spacing: .12em; }
.rail-card strong { display: block; font-size: 17px; }
.rail-card p { color: var(--muted); font-size: 14px; }
.rail-method { top: 180px; border-color: var(--blue); }
.rail-method a { font-weight: 750; font-size: 14px; }
.miscon, .faq, .sources, .child-map { padding: 37px 0; border-top: 3px solid var(--ink); }
.miscon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.miscon li { padding: 17px 19px; background: #eee8dc; }
.miscon li strong { color: var(--orange); }
.miscon li p { margin: 5px 0 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 17px 40px 17px 0; font-weight: 750; position: relative; }
.faq summary::after { content: "+"; position: absolute; right: 8px; color: var(--blue); font-size: 24px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; }
.sources ol { list-style: none; margin: 0; padding: 0; }
.sources li { display: grid; grid-template-columns: 45px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.sources li > span { color: var(--orange); font: 800 12px/1.6 monospace; }
.sources li a { font-weight: 700; overflow-wrap: anywhere; }
.sources li small { display: block; color: var(--muted); margin-top: 2px; }
.related { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 32px; }
.related a { display: grid; grid-template-columns: 1fr auto; padding: 17px; background: var(--ink); color: #fff; text-decoration: none; }
.related span { grid-column: 1/-1; color: #aebac4; font: 700 9px/1 monospace; letter-spacing: .12em; }
.related strong { margin-top: 7px; }
.related i { align-self: end; color: var(--orange); font-style: normal; }
.child-map > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--line); }
.child-map a { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 15px 8px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.child-map a:nth-child(odd) { border-right: 1px solid var(--line); }
.child-map span { color: var(--orange); font: 800 11px/1.6 monospace; }
.child-map i { font-style: normal; color: var(--blue); }
.trust-wrap { max-width: 980px; }
.trust-body { max-width: 780px; padding: 42px 0 90px; }
.trust-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 25px 0; border-top: 3px solid var(--ink); }
.trust-links a { padding: 9px 13px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 700; }
/* Forsiden – kontrollrom, ikke kortgrid fra andre wikis */
.home-wrap { padding-bottom: 90px; }
.hero { min-height: 585px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 65px; align-items: center; padding: 68px 0; }
.hero h1 { margin: 16px 0 25px; font-size: clamp(52px, 7.5vw, 94px); }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero > div > p { max-width: 670px; font-size: 20px; color: #42505d; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-actions a { padding: 13px 17px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 750; }
.hero-actions a:last-child { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.machine-diagram { position: relative; padding: 40px 30px; min-height: 390px; background: var(--ink); color: #fff; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border: 2px solid #354656; box-shadow: 16px 16px 0 var(--blue); }
.machine-diagram::before { content:"AUTOMAT / SIGNALFLYT"; position:absolute; top:14px; left:18px; color:#94a4b3; font:700 10px/1 monospace; letter-spacing:.12em; }
.machine-diagram div { min-height: 95px; border: 1px solid #526475; display: flex; flex-direction: column; justify-content: center; padding: 14px; }
.machine-diagram div:nth-of-type(2) { border-color: var(--orange); }
.machine-diagram span { color: var(--orange); font: 800 11px/1 monospace; }
.machine-diagram b { margin-top: 8px; font: 750 13px/1.2 monospace; }
.machine-diagram i { color: var(--orange); font-style: normal; }
.machine-diagram small { grid-column: 1/-1; padding-top: 8px; border-top: 1px solid #526475; color: #aebac4; }
.home-intro { display: grid; grid-template-columns: .7fr 1.3fr; gap: 50px; padding: 28px 30px; background: var(--blue); color: #fff; }
.home-intro div { display: flex; flex-direction: column; }
.home-intro span { font: 700 10px/1 monospace; letter-spacing: .12em; color: #bfd0ff; }
.home-intro strong { font-size: 27px; }
.home-intro p { margin: 0; font-size: 17px; }
.section-head { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: end; margin-bottom: 25px; }
.section-head h2 { font-size: clamp(35px, 5vw, 55px); }
.hub-rack { padding: 80px 0; }
.rack-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 2px solid var(--ink); }
.hub-module { display: grid; grid-template-columns: 45px 1fr auto; gap: 15px; align-items: center; min-height: 112px; padding: 19px 20px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); transition: background .18s,color .18s; }
.hub-module:nth-child(odd) { border-right: 1px solid var(--ink); }
.hub-module:hover { background: var(--ink); color: #fff; }
.module-no { color: var(--orange); font: 800 12px/1 monospace; }
.hub-module h2 { font-size: 25px; }
.hub-module p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.hub-module:hover p { color: #b8c2ca; }
.hub-module i { color: var(--blue); font-style: normal; font-size: 22px; }
.home-split { display: grid; grid-template-columns: 1.25fr .75fr; gap: 50px; padding: 55px 0; border-top: 6px solid var(--ink); }
.wire-list { border-top: 1px solid var(--line); }
.wire-list a { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; padding: 13px 5px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.wire-list b { color: var(--orange); font: 800 11px/1.8 monospace; }
.wire-list span { font-weight: 750; }
.wire-list i { color: var(--muted); font-size: 12px; font-style: normal; }
.method-panel { align-self: start; padding: 30px; background: var(--orange); color: var(--ink); transform: rotate(.7deg); }
.method-panel > span { font: 800 10px/1 monospace; letter-spacing: .13em; }
.method-panel h2 { margin: 15px 0 25px; font-size: 36px; }
.method-panel ol { list-style:none; margin:0 0 25px; padding:0; border-top:1px solid rgba(23,32,42,.4); }
.method-panel li { padding:10px 0; border-bottom:1px solid rgba(23,32,42,.4); font-weight:700; }
.method-panel li b { display:inline-block; width:35px; font-family:monospace; }
.method-panel a { color:var(--ink); font-weight:800; }
.owner-strip { display:flex; justify-content:space-between; align-items:end; gap:30px; padding:35px; background:var(--white); border:1px solid var(--line); box-shadow:var(--shadow); }
.owner-strip span { color:var(--blue); font:750 10px/1 monospace; letter-spacing:.13em; }
.owner-strip h2 { margin:8px 0; font-size:38px; }
.owner-strip p { margin:0; max-width:650px; }
.owner-strip > a { font-weight:800; }
.site-foot { background: var(--ink); color: #dfe5e9; border-top: 6px solid var(--blue); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr; gap: 45px; padding: 55px 0; }
.foot-grid strong { color:#fff; font-size:23px; }
.foot-grid h2 { color:#fff; font-size:15px; margin-bottom:15px; letter-spacing:0; }
.foot-grid p { color:#adb9c2; }
.foot-grid a { display:block; color:#dfe5e9; margin:7px 0; text-decoration:none; }
.foot-grid a:hover { color:#fff; text-decoration:underline; text-decoration-color:var(--orange); }
.foot-stamp { display:flex; flex-direction:column; gap:8px; }
.foot-stamp span { padding:8px 9px; border:1px solid #4a5a68; color:#b8c3cb; font:700 9px/1.2 monospace; letter-spacing:.1em; }
.foot-base { display:flex; justify-content:space-between; padding:17px 0; border-top:1px solid #3c4b58; color:#9eabb5; font-size:12px; }
.foot-disclaimer { width:min(calc(100% - 40px), var(--wrap)); margin:0 auto 18px; color:#9eabb5; font-size:12px; line-height:1.5; }
.foot-disclaimer a { color:#dfe5e9; }
.to-top { position:fixed; right:18px; bottom:18px; width:43px; height:43px; border:0; background:var(--blue); color:#fff; font-size:22px; opacity:0; pointer-events:none; transition:opacity .2s; }
.to-top.show { opacity:1; pointer-events:auto; }
.error-box { min-height:55vh; padding:80px 0; }
.error-box > span { color:var(--orange); font:800 18px/1 monospace; }
.error-box h1 { font-size:clamp(50px,8vw,90px); margin:15px 0; }
:focus-visible { outline:3px solid var(--orange); outline-offset:3px; }
@media (max-width: 900px) {
  .head-meta { display:none; }
  .menu-btn { display:block; border:1px solid #526171; background:transparent; color:#fff; padding:9px 12px; }
  .main-nav { display:none; }
  .main-nav.open { display:block; }
  .nav-wrap { padding:15px 0; flex-wrap:wrap; }
  .hero, .article-grid, .home-split, .foot-grid { grid-template-columns:1fr; }
  .machine-diagram { box-shadow:8px 8px 0 var(--blue); }
  .side-rail { display:none; }
  .hero { min-height:0; }
}
@media (max-width: 620px) {
  .head-wrap, .nav-wrap, .foot-grid, .foot-base, .page-wrap, .home-wrap { width:min(calc(100% - 24px),var(--wrap)); }
  .head-wrap { min-height:72px; grid-template-columns:1fr auto; gap:12px; }
  .brand-name { font-size:23px; }
  .brand-glyph { width:30px; height:30px; }
  .page-title { padding:30px 0 25px; }
  .page-title h1 { font-size:43px; }
  .answer { font-size:18px; }
  .article-grid { padding-top:25px; }
  .fact-console, .rack-grid, .child-map > div, .related { grid-template-columns:1fr; }
  .hub-module:nth-child(odd), .child-map a:nth-child(odd) { border-right:0; }
  .article-sec { grid-template-columns:28px minmax(0,1fr); gap:10px; }
  .article-sec h2, .sources h2, .faq h2, .miscon h2, .child-map h2 { font-size:30px; }
  .hero { padding:45px 0; gap:35px; }
  .hero h1 { font-size:50px; }
  .machine-diagram { grid-template-columns:1fr; min-height:0; }
  .machine-diagram i { transform:rotate(90deg); justify-self:center; }
  .home-intro, .section-head { grid-template-columns:1fr; gap:12px; }
  .hub-rack { padding:55px 0; }
  .wire-list a { grid-template-columns:32px 1fr; }
  .wire-list i { grid-column:2; }
  .owner-strip, .foot-base { align-items:flex-start; flex-direction:column; }
  .table-scroll { max-width:calc(100vw - 42px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } * { transition:none!important; } }
