/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap;
  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: "Geist Mono"; src: url("fonts/geist-mono-latin-ext.woff2") format("woff2"); font-weight: 400 500; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0a;
  --text: #ededed;
  --muted: #a3a3a0;
  --faint: #66666a;
  --line: #262626;
  --panel: rgba(18, 18, 17, .92);
  --accent: #d9483e;
  --glyph: 236, 236, 234;      /* rgb for the ascii canvas */
  --sans: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f2ee; --text: #161616; --muted: #555553; --faint: #8f8f8b;
    --line: #dcdbd6; --panel: rgba(243, 242, 238, .95); --accent: #c23b31;
    --glyph: 22, 22, 22; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f2ee; --text: #161616; --muted: #555553; --faint: #8f8f8b;
  --line: #dcdbd6; --panel: rgba(243, 242, 238, .95); --accent: #c23b31;
  --glyph: 22, 22, 22; color-scheme: light;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--text); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .01em; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); vertical-align: middle; margin-right: 8px; }

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 26px; padding: 25px 40px;
  font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: .01em;
}
.nav a, .nav button { color: var(--muted); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.nav a:hover, .nav button:hover { color: var(--text); }
.nav .active { color: var(--text); }
.nav .active::before { content: "›"; color: var(--accent); margin-right: 6px; }
.theme { display: grid; place-items: center; width: 22px; height: 22px; }
.theme svg { width: 15px; height: 15px; }
.theme .sun { display: none; }
:root[data-theme="light"] .theme .sun { display: block; }
:root[data-theme="light"] .theme .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme .sun { display: block; }
  :root:not([data-theme]) .theme .moon { display: none; }
}

/* ---------- Home ---------- */
.home {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 90px 9vw 80px; max-width: calc(9vw + 660px);
}
.home h1 { font-weight: 500; font-size: 22px; line-height: 30px; letter-spacing: -.015em; margin-bottom: 22px; }
.facts { list-style: none; display: grid; gap: 1px; }
.facts li { position: relative; padding-left: 18px; color: var(--text); font-size: 16px; line-height: 24px; }
.facts li::before { content: ""; position: absolute; left: 0; top: .72em; width: 4px; height: 4px; background: var(--faint); }
.facts li a { color: var(--text); }
.facts .sub { display: block; margin-top: 2px; color: var(--faint); line-height: 1.55; }
.facts .sub span + span::before { content: "·"; margin: 0 8px; }
.links { display: flex; gap: 20px; margin-top: 30px; }
.links a, .links button { color: var(--muted); background: none; border: 0; cursor: pointer; font-family: var(--mono); font-size: 12.5px; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 5px; }
.links a:hover, .links button:hover { color: var(--text); }
.corner { position: fixed; right: 36px; bottom: 22px; z-index: 2; color: var(--faint); }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 4px; }

/* ---------- Projects dialog ---------- */
dialog {
  margin: auto; width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  padding: 30px 32px 36px; overflow: hidden;
}
dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.dlg-head h2 { font-weight: 500; font-size: 21px; }
.dlg-head button { background: none; border: 0; color: var(--muted); cursor: pointer; }
.dlg-head button:hover { color: var(--text); }
.rail { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; }
.proj { flex: 0 0 min(540px, 82%); scroll-snap-align: start; text-decoration: none; color: var(--text); }
.proj .shot { aspect-ratio: 16 / 10; }
.proj h3 { font-weight: 500; font-size: 18px; margin-top: 16px; }
.proj h3 .mono { color: var(--faint); font-weight: 400; margin-left: 10px; }
.proj p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.proj .go { display: inline-block; margin-top: 10px; color: var(--faint); }
.proj:hover .go { color: var(--accent); }
.proj:hover .shot { border-color: var(--faint); }

/* ascii preview box */
.shot {
  position: relative; border: 1px solid var(--line); background: rgba(var(--glyph), .02);
  overflow: hidden; transition: border-color .2s;
}
.shot canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot .label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 500; font-size: clamp(26px, 4vw, 44px); letter-spacing: -.02em; text-align: center; padding: 20px;
}
.shot .label span { background: var(--bg); padding: 4px 14px; }

/* ---------- Case + CV pages ---------- */
.page {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 250px 1fr; gap: 70px;
  max-width: 1100px; margin: 0 auto; padding: 100px 48px 90px;
}
.side { position: sticky; top: 100px; align-self: start; }
.side .kicker { color: var(--muted); margin-bottom: 16px; }
.side h1 { font-weight: 500; font-size: 22px; letter-spacing: -.01em; line-height: 1.3; }
.side .lead { color: var(--muted); margin-top: 12px; font-size: 15.5px; }
.side dl { margin-top: 34px; }
.side dt { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.side dd { font-size: 15px; margin: 2px 0 16px; }
.side .back { display: inline-block; margin-top: 34px; color: var(--faint); }

article .shot { aspect-ratio: 16 / 10; }
article figcaption { color: var(--faint); margin-top: 12px; }
article section { margin-top: 48px; }
article h2 { font-family: var(--mono); font-weight: 400; font-size: 12.5px; color: var(--faint); margin-bottom: 12px; }
article p, article li { font-size: 18px; line-height: 1.7; }
article ul { list-style: none; display: grid; gap: 10px; }
article ul li { position: relative; padding-left: 20px; }
article ul li::before { content: ""; position: absolute; left: 0; top: .8em; width: 4px; height: 4px; background: var(--faint); }
article .skills { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pager { display: flex; justify-content: space-between; margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); }
.pager a { color: var(--muted); text-decoration: none; }
.pager a:hover { color: var(--text); }

/* CV timeline */
.cv-list { list-style: none; display: grid; gap: 26px; }
.cv-list li { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 0; }
.cv-list li::before { display: none; }
.cv-list .when { font-family: var(--mono); font-size: 12.5px; color: var(--faint); padding-top: 5px; }
.cv-list h3 { font-weight: 500; font-size: 18px; }
.cv-list h3 span { color: var(--muted); font-weight: 400; }
.cv-list p { color: var(--muted); font-size: 16px; margin-top: 2px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav { left: 0; justify-content: flex-end; padding: 16px; gap: 18px; background: linear-gradient(var(--bg), transparent); }
  .home { padding: 90px 16px 80px; max-width: none; }
  .corner { right: 16px; }
  .page { grid-template-columns: 1fr; gap: 36px; padding: 80px 16px 60px; }
  .side { position: static; }
  article p, article li { font-size: 16.5px; }
  .cv-list li { grid-template-columns: 1fr; gap: 2px; }
  dialog { padding: 20px 16px 24px; max-height: calc(100vh - 32px); }
  .proj { flex-basis: 88%; }
}
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }

/* privacy page */
.legal h2 { margin-top: 0; }
.legal p + p { margin-top: 12px; }
.legal p, .legal li { font-size: 16.5px; color: var(--muted); }
.legal strong { color: var(--text); font-weight: 500; }
.legal section { margin-top: 40px; }
.foot { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 48px 40px; display: flex; justify-content: space-between; color: var(--faint); }
.foot a { color: var(--faint); }
@media (max-width: 760px) { .foot { padding: 0 16px 32px; } }
.langs { display: flex; gap: 6px; margin-top: 26px; }
.langs button { background: none; border: 1px solid var(--line); color: var(--faint); padding: 5px 12px; font: inherit; cursor: pointer; }
.langs button[aria-pressed="true"] { color: var(--text); border-color: var(--faint); }
.legal code { font-family: var(--mono); font-size: .9em; }
article section.first { margin-top: 0; }

/* koi pond background (home) */
#pond { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
:root[data-theme="light"] #pond { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) #pond { display: none; } }

/* partner strip (case pages) */
.partners { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.partners li.partner { padding-left: 0; display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 14px 20px; position: relative; overflow: hidden; }
.partners li.partner::before { display: none; }
.partners li.partner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(var(--glyph), .07) 50%, transparent 70%); transform: translateX(-100%); animation: sweep 4.5s ease-in-out infinite; pointer-events: none; }
.partners .pname { font-size: 22px; font-weight: 500; letter-spacing: -.01em; font-family: var(--sans); min-width: 13ch; }
.partners .pname.scrambling { font-family: var(--mono); font-size: 19px; color: var(--muted); }
.partners .prole { color: var(--faint); }
@keyframes sweep { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .partners li.partner::after { animation: none; } }

/* brand block (case pages) */
.tagline { font-size: 20px; letter-spacing: .02em; margin-bottom: 18px; }
.brand-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.brand-shots figure { margin: 0; }
.brand-shots img { width: 100%; border: 1px solid var(--line); display: block; }
.brand-shots figcaption { color: var(--faint); margin-top: 8px; }
.swatches { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 20px; }
article ul.swatches li { padding-left: 0; display: flex; align-items: center; gap: 10px; font-size: 14px; }
article ul.swatches li::before { display: none; }
.swatches .sw { width: 28px; height: 28px; border: 1px solid var(--line); display: inline-block; }
.swatches .sw-0 { background: #1E60FF; } .swatches .sw-1 { background: #FCD61D; } .swatches .sw-2 { background: #FFFFFF; }
.swatches .hex { color: var(--faint); }
@media (max-width: 760px) { .brand-shots { grid-template-columns: 1fr; } }

/* real image instead of the ascii preview */
.hero-img { border: 1px solid var(--line); background: #fff; }
.hero-img img { display: block; width: 100%; height: auto; }

/* ---------- IsarLens app screens, rebuilt in HTML/CSS (no background) ---------- */
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 3vw, 34px); padding: 6px 0 4px; }
.pcol { text-align: center; container-type: inline-size; }
.phone { position: relative; aspect-ratio: 9 / 18.5; background: #0d0d0f; border: 1px solid #2c2c30;
  border-radius: 13cqw; padding: 3.6cqw; box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); }
.phone .notch { position: absolute; top: 5cqw; left: 50%; transform: translateX(-50%); width: 32%; height: 8cqw; border-radius: 99px; background: #0d0d0f; z-index: 2; }
.phone .scr { height: 100%; background: #fff; border-radius: 10cqw; color: #0b1220; font-family: var(--sans);
  padding: 15cqw 7cqw 8cqw; display: flex; flex-direction: column; text-align: left; overflow: hidden; }
.scr p { margin: 0; }
.sbar { display: flex; justify-content: space-between; font-size: 3.4cqw; letter-spacing: .08em; color: #8a93a6; margin-bottom: 6cqw; }
.pt { font-size: 6.6cqw; font-weight: 700; text-align: center; letter-spacing: -.01em; }
.pt.left { text-align: left; display: flex; align-items: center; gap: 2.5cqw; }
.ps { font-size: 3.8cqw; color: #6b7487; text-align: center; margin-top: 1.5cqw !important; }
.pt.left + .ps { text-align: left; }
.qr { position: relative; margin: 16cqw auto 0; width: 52cqw; aspect-ratio: 1; background: #f3f5f9; border-radius: 6cqw; display: grid; place-items: center; }
.qr svg { width: 58%; height: 58%; }
.qr .c { position: absolute; width: 9cqw; height: 9cqw; border: .9cqw solid #1E60FF; }
.qr .tl { top: 3cqw; left: 3cqw; border-right: 0; border-bottom: 0; border-radius: 2cqw 0 0 0; }
.qr .tr { top: 3cqw; right: 3cqw; border-left: 0; border-bottom: 0; border-radius: 0 2cqw 0 0; }
.qr .bl { bottom: 3cqw; left: 3cqw; border-right: 0; border-top: 0; border-radius: 0 0 0 2cqw; }
.qr .br { bottom: 3cqw; right: 3cqw; border-left: 0; border-top: 0; border-radius: 0 0 2cqw 0; }
.pbtn { margin-top: auto; background: #1E60FF; color: #fff; font-size: 4cqw; font-weight: 600; text-align: center; padding: 4.4cqw; border-radius: 3.5cqw; }
.pbtn.ghost { background: #f1f3f7; color: #44506a; }
.photo { position: relative; margin-top: 6cqw; aspect-ratio: 4 / 3; border-radius: 4cqw; background: linear-gradient(135deg, #e9edf3 0%, #c9d1dc 55%, #aab4c3 100%); }
.photo .chip { position: absolute; left: 3cqw; bottom: 3cqw; font-size: 3cqw; color: #fff; background: rgba(20,24,33,.6); padding: 1.2cqw 2.4cqw; border-radius: 1.6cqw; }
.photo .spark { position: absolute; right: 3cqw; top: 3cqw; width: 8cqw; height: 8cqw; border-radius: 50%; background: #fff; }
.photo .spark::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: #1E60FF; font-size: 4.4cqw; }
.prog { display: flex; justify-content: space-between; font-size: 3.4cqw; margin-top: 5cqw; color: #44506a; }
.prog .pct { color: #1E60FF; font-weight: 600; }
.bar { height: 1.6cqw; border-radius: 99px; background: #e6eaf1; margin-top: 2cqw; overflow: hidden; }
.bar span { display: block; width: 72%; height: 100%; background: #1E60FF; border-radius: inherit; animation: fill 2.8s ease-in-out infinite alternate; }
@keyframes fill { from { width: 48%; } to { width: 72%; } }
.scr ul { list-style: none; padding: 0; margin: 4cqw 0 0; display: grid; gap: 2.6cqw; }
.scr ul li { font-size: 3.6cqw; padding-left: 6cqw; position: relative; line-height: 1.3; }
.scr ul li::before { content: ""; position: absolute; left: 0; top: .3em; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; }
.checks li.ok::before { background: #1E60FF; box-shadow: inset 0 0 0 .9cqw #dfe8ff; }
.checks li.wait { color: #a3abbb; }
.checks li.wait::before { border: .6cqw solid #c5ccd8; }
.tick { width: 5.4cqw; height: 5.4cqw; border-radius: 50%; border: .7cqw solid #18a058; position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 1.3cqw; top: .6cqw; width: 1.4cqw; height: 2.6cqw; border: solid #18a058; border-width: 0 .7cqw .7cqw 0; transform: rotate(45deg); }
.score { margin-top: 6cqw; background: #1E60FF; color: #fff; border-radius: 5cqw; padding: 5cqw 6cqw; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 1.5cqw; }
.score b { font-size: 15cqw; line-height: 1; font-weight: 700; }
.score span { font-size: 4cqw; opacity: .85; }
.score em { grid-column: 1 / -1; font-style: normal; font-size: 3.2cqw; opacity: .85; margin-top: 2cqw; }
.rows li { display: flex; justify-content: space-between; }
.rows li::before { background: #18a058; }
.rows li.warn::before { background: #f5b301; }
.rows li b { font-weight: 600; }
.pcol .step { margin-top: 18px; color: var(--accent); letter-spacing: .14em; text-transform: uppercase; font-size: 11.5px; }
.pcol .sname { margin-top: 2px; font-size: 16px; font-weight: 500; }
article figure .phones + figcaption { margin-top: 22px; }
@media (max-width: 760px) {
  .phones { grid-template-columns: repeat(3, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .pcol { scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) { .bar span { animation: none; } }

/* ---------- Thesis model (bachelorarbeit page) ---------- */
.tdd { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--line); background: rgba(var(--glyph), .015); font-family: var(--sans); }
.tdd-side { border-right: 1px solid var(--line); padding: 16px; }
.tdd-h { font-size: 12.5px; font-weight: 500; color: var(--text); display: flex; justify-content: space-between; margin: 0 0 10px; }
.tdd-h span { color: var(--faint); font-weight: 400; }
.tdd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tdd-chip { border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; color: var(--muted); background: none; cursor: pointer; }
.tdd-chip.on { color: var(--text); border-color: var(--faint); background: rgba(var(--glyph), .05); }
.tdd-dim { margin-bottom: 8px; }
.tdd-row { display: flex; justify-content: space-between; align-items: baseline; width: 100%; background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; text-align: left; }
.tdd-row small { color: var(--faint); margin-left: 6px; font-size: 11px; }
.tdd-name { flex: 1; padding-right: 8px; }
.tdd-row b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.tdd-dim.hov .tdd-row, .tdd-dim.open .tdd-row { color: var(--text); }
.tdd-dim.flag .tdd-row, .tdd-dim.flag .tdd-row b { color: #e0675f; }
.tdd input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; margin: 0; cursor: pointer; }
.tdd input[type=range]::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(to right, rgba(var(--glyph), .8) var(--p, 0%), var(--line) var(--p, 0%)); }
.tdd input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
.tdd input[type=range]::-moz-range-progress { height: 2px; background: rgba(var(--glyph), .8); }
.tdd input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--text); margin-top: -4.5px; border: 0; }
.tdd input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--text); border: 0; }
.tdd-dim.flag .tdd-range::-webkit-slider-thumb { background: #e0675f; }
.tdd-crit { display: none; padding: 6px 0 4px 10px; border-left: 1px solid var(--line); margin: 4px 0 6px; }
.tdd-dim.open .tdd-crit { display: grid; gap: 6px; }
.tdd-crit label { display: grid; grid-template-columns: 1fr 16px; column-gap: 8px; font-size: 11px; color: var(--faint); }
.tdd-crit label span { grid-column: 1 / -1; line-height: 1.3; }
.tdd-crit label em { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.tdd-crit label.flag span, .tdd-crit label.flag em { color: #e0675f; }
.tdd-note { font-size: 11px; color: var(--faint); margin-top: 10px; }
.tdd-main { display: flex; flex-direction: column; min-width: 0; }
.tdd-top { display: flex; justify-content: space-between; padding: 12px 16px 0; font-size: 11.5px; color: var(--faint); }
.tdd canvas { width: 100%; height: 420px; display: block; touch-action: none; cursor: grab; }
.tdd-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 16px 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.tdd-foot b { color: var(--text); font-weight: 500; }
.tdd-foot i { font-style: normal; color: var(--muted); }
.tdd-flags { font-size: 11.5px; color: var(--faint); padding: 0 16px 12px; min-height: 1.5em; }
.tdd.has-flags .tdd-flags { color: #e0675f; }
.tdd-val { grid-column: 1 / -1; display: grid; grid-template-columns: 250px minmax(0, 1fr); border-top: 1px solid var(--line); }
.tdd-inputs { border-right: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; align-content: start; }
.tdd-inputs label { display: grid; grid-template-columns: 1fr auto; font-size: 12px; color: var(--muted); }
.tdd-inputs label b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.tdd-inputs label input { grid-column: 1 / -1; }
.tdd-val-table { padding: 16px; }
.tdd-vt-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.tdd-vt-row.head { font-size: 11.5px; color: var(--faint); border-bottom-color: transparent; padding-top: 0; }
.tdd-vt-row span:first-child { font-size: 11.5px; color: var(--faint); align-self: center; }
.tdd-vt-row span:last-child { color: var(--text); }
.tdd-vt-row span:nth-child(2) { color: var(--muted); }
.tdd-vt-row.head span:last-child { color: var(--accent); }
.tdd-impact { margin-top: 12px; font-size: 14px; color: var(--text); }
.tdd-val-table.na .tdd-impact { color: #e0675f; }
.hero-model figcaption { margin-top: 12px; }
@media (max-width: 760px) {
  .tdd, .tdd-val { grid-template-columns: 1fr; }
  .tdd-side, .tdd-inputs { border-right: 0; border-bottom: 1px solid var(--line); }
  .tdd canvas { height: 340px; }
}

/* single-column case page for the interactive model */
.page.single { grid-template-columns: 1fr; gap: 36px; max-width: 1120px; }
.page.single .side { position: static; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 60px; }
.page.single .side .kicker, .page.single .side h1, .page.single .side .lead, .page.single .side .back { grid-column: 1; }
.page.single .side dl { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.page.single article { max-width: none; }
.page.single article > section { max-width: 760px; }
@media (max-width: 760px) { .page.single .side { grid-template-columns: 1fr; } .page.single .side dl { grid-column: 1; grid-row: auto; margin-top: 24px; } }

/* dark glass behind the home intro: fish stay faintly visible through it */
.home .intro { position: relative; isolation: isolate; }
.home .intro::before {
  content: ""; position: absolute; inset: -56px -80px; z-index: -1; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(2.5px); backdrop-filter: blur(2.5px);
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
@media (max-width: 760px) { .home .intro::before { inset: -40px -16px; } }
.radar-shot { background: rgba(var(--glyph), .02); }

/* ---------- IsarLens animated phones (overlay card + case page), same proportions as the mockup ---------- */
.isar-anim { display: block; padding: 0; background: #0d0d0d; border-color: #1f1f1f; overflow: hidden; }
.isar-anim .phones { position: absolute; top: 0; left: 0; transform-origin: 0 0; width: 1100px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 77px; align-items: end; overflow: visible; padding: 0; scroll-snap-type: none; }
.isar-anim .pcol { opacity: .32; transform: scale(.96); transition: opacity .5s, transform .5s; scroll-snap-align: none; }
.isar-anim .pcol.on { opacity: 1; transform: scale(1.03); }
.isar-anim .phone { box-shadow: 0 46px 96px -54px #000; }
.isar-anim .pcol .step { margin-top: 27px; font-size: 21px; letter-spacing: .14em; color: #555; transition: color .4s; }
.isar-anim .pcol .sname { margin-top: 4px; font-size: 27px; color: #777; transition: color .4s; }
.isar-anim .pcol.on .step { color: var(--accent); }
.isar-anim .pcol.on .sname { color: #ececec; }
.isar-anim .qr { overflow: hidden; }
.isar-anim .qr .c { transition: all .35s; }
.isar-anim .qr.lock .tl { top: 9cqw; left: 9cqw; } .isar-anim .qr.lock .tr { top: 9cqw; right: 9cqw; }
.isar-anim .qr.lock .bl { bottom: 9cqw; left: 9cqw; } .isar-anim .qr.lock .br { bottom: 9cqw; right: 9cqw; }
.isar-anim .scan { position: absolute; left: 6%; right: 6%; height: 2px; top: 10%; background: #1E60FF; box-shadow: 0 0 10px 2px rgba(30,96,255,.55); }
.isar-anim .pbtn { transition: transform .15s, filter .15s, background .3s, color .3s; }
.isar-anim .pbtn.press { transform: scale(.95); filter: brightness(.85); }
.isar-anim .pbtn.ghost.sent { background: #e6f6ec; color: #18a058; }
.isar-anim .photo { overflow: hidden; }
.isar-anim .shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-100%); }
.isar-anim .bar i { display: block; height: 100%; width: 0; background: #1E60FF; border-radius: inherit; }
.isar-anim .checks li { transition: color .3s; }
.isar-anim .checks li.ok { color: #0b1220; }
.isar-anim .tick-svg { width: 5.6cqw; height: 5.6cqw; flex: none; }
.isar-anim .tick-svg circle, .isar-anim .tick-svg path { fill: none; stroke: #18a058; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.isar-anim .tick-svg circle { stroke-dasharray: 63; stroke-dashoffset: calc(63 * var(--c, 1)); }
.isar-anim .tick-svg path { stroke-dasharray: 16; stroke-dashoffset: calc(16 * var(--p, 1)); }
.isar-anim .rows li { opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; }
.isar-anim .rows li.in { opacity: 1; transform: none; }

/* IsarLens page: same animation, at the size of the old static phones */
.isar-anim.inline { background: none; border: 0; overflow: visible; }
.isar-anim.inline .phones { position: static; width: auto; transform: none; gap: clamp(12px, 3vw, 34px); padding: 6px 0 4px; }
.isar-anim.inline .phone { box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); }
.isar-anim.inline .pcol .step { margin-top: 18px; font-size: 11.5px; }
.isar-anim.inline .pcol .sname { margin-top: 2px; font-size: 16px; }

/* IsarLens page: framed animation exactly like the chat mockup */
article .isar-anim.framed { position: relative; aspect-ratio: 16 / 10; border: 1px solid #1f1f1f; background: #0d0d0d; }
.isar-cap { position: absolute; top: 10px; left: 12px; right: 12px; z-index: 2; display: flex; justify-content: space-between; font-size: 11px; color: #666; }
.isar-cap b { color: #9aa; font-weight: 400; }

/* ---------- projects overlay, reference layout ---------- */
dialog { width: min(1240px, calc(100vw - 32px)); padding: 34px 0 40px 44px; }
dialog, dialog:focus, dialog *:focus { outline: none; }
dialog *:focus-visible { outline: 1px solid var(--faint); outline-offset: 3px; }
.dlg-head { padding-right: 38px; margin-bottom: 34px; }
.dlg-head h2 { font-size: 26px; }
.dlg-head button { border: 1px solid var(--faint); padding: 8px 14px; color: var(--muted); font-size: 13px; }
.dlg-head button:hover { border-color: var(--text); color: var(--text); }
.rail { gap: 14px; padding-right: 44px; padding-bottom: 10px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.proj { position: relative; flex: 0 0 min(720px, 62%); }
.proj .shot, .proj:hover .shot { border: 0; }
.proj h3 { font-size: 20px; margin-top: 18px; }
.proj p { font-size: 15.5px; }
.proj .vp { position: absolute; top: 0; left: 0; z-index: 3; pointer-events: none; white-space: nowrap;
  background: #b8432f; color: #fff; font-size: 13px; padding: 8px 16px; border-radius: 99px;
  opacity: 0; transition: opacity .18s; }
.proj .vp.show { opacity: 1; }
.proj.proj-isar .vp { background: #1E60FF; }
@media (hover: none) { .proj .vp { display: none; } }
@media (max-width: 760px) { dialog { padding: 22px 0 26px 16px; } .dlg-head { padding-right: 16px; } .rail { padding-right: 16px; } .proj { flex-basis: 86%; } }

/* overlay card: static phones, no highlight */
.isar-anim.still .pcol, .isar-anim.still .pcol.on { opacity: 1; transform: none; }
.isar-anim.still .pcol .step { color: #666; }
.isar-anim.still .pcol .sname { color: #9a9a9a; }
/* overlay card: same frame as the risk model card */
.proj .isar-anim { background: rgba(var(--glyph), .02); }

/* ---------- Back of the Envelope game ---------- */
.bote { border: 1px solid var(--line); background: rgba(var(--glyph), .02); padding: 18px 22px 24px; min-height: 380px; }
.bote-top { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-bottom: 26px; }
.bote-dots { display: flex; gap: 6px; }
.bote-dots span { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--faint); }
.bote-dots span.done { background: var(--faint); }
.bote-dots span.now { background: var(--accent); border-color: var(--accent); }
.bote-step { color: var(--accent); font-size: 12px; margin-bottom: 8px; }
.bote-q { font-size: clamp(20px, 2.6vw, 26px); font-weight: 500; line-height: 1.35; max-width: 32ch; margin-bottom: 22px; }
.bote-field { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--faint); max-width: 440px; }
.bote-in { flex: 1; background: none; border: 0; color: var(--text); font: 500 22px var(--sans); padding: 8px 0; outline: none; min-width: 0; }
.bote-in::placeholder { color: var(--faint); font-size: 15px; font-weight: 400; }
.bote-unit { color: var(--faint); font-size: 12px; }
.bote-btn { margin-top: 18px; background: var(--text); color: var(--bg); border: 1px solid var(--text); border-radius: 99px; padding: 9px 18px; font: 500 14px var(--sans); cursor: pointer; }
.bote-btn.ghost { background: none; color: var(--text); border-color: var(--line); }
.bote-err { color: #e0675f; font-size: 12px; min-height: 1.4em; margin-top: 8px; }
.bote-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.bote-score { font-size: 46px; font-weight: 500; line-height: 1; color: var(--accent); min-width: 2.2ch; }
.bote-head span { display: grid; gap: 2px; }
.bote-verdict { font-style: normal; font-size: 18px; }
.bote-cmp { color: var(--faint); font-size: 12px; }
.bote-label { color: var(--faint); font-size: 12px; margin-bottom: 8px; }
.bote-tree { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
article .bote-tree li { padding: 6px 0 6px 16px; display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: var(--muted); }
article .bote-tree li::before { display: none; }
.bote-tree li b { color: var(--text); font-weight: 500; text-align: right; }
.bote-tree li.tot { border-top: 1px solid var(--line); margin-top: 4px; color: var(--text); }
.bote-big { font-size: 64px; font-weight: 500; line-height: 1; margin: 6px 0 18px; }
.bote-big span { font-size: 22px; color: var(--faint); }
.bote-rows { list-style: none; padding: 0; display: grid; gap: 6px; max-width: 320px; }
article .bote-rows li { display: grid; grid-template-columns: 40px 1fr 40px; padding: 0; font-family: var(--mono); font-size: 14px; }
article .bote-rows li::before { display: none; }
.bote-rows b { color: var(--accent); font-weight: 400; letter-spacing: .1em; }
.bote-rows em { font-style: normal; color: var(--muted); text-align: right; }
.bote-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Flat climate simulation ---------- */
.flat { display: grid; grid-template-columns: 230px minmax(0, 1fr); border: 1px solid var(--line); background: rgba(var(--glyph), .015); }
.flat-side { border-right: 1px solid var(--line); padding: 16px; font-size: 13px; }
.flat-windows { display: grid; gap: 6px; margin-bottom: 18px; }
.flat-windows label, .flat-check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.flat-windows input, .flat-check input { accent-color: var(--accent); }
.flat-range { display: grid; grid-template-columns: 1fr auto; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.flat-range b { color: var(--text); font-weight: 500; }
.flat-range input { grid-column: 1 / -1; accent-color: var(--accent); width: 100%; }
.flat-check { margin: 4px 0 16px; }
.flat-main { min-width: 0; display: flex; flex-direction: column; }
.flat-main > canvas { width: 100%; display: block; cursor: grab; touch-action: pan-y; }
.flat-main > canvas.grabbing { cursor: grabbing; }
.flat-legend { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; font-size: 11.5px; color: var(--faint); }
.flat-legend canvas { flex: 1; height: 8px; width: 100%; border-radius: 2px; }
.flat-advice { padding: 12px 16px 16px; font-size: 15px; color: var(--muted); line-height: 1.55; }
.flat-advice b { color: var(--text); font-weight: 500; }
@media (max-width: 760px) { .flat { grid-template-columns: 1fr; } .flat-side { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- Mautrechner ---------- */
.maut { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--line); background: rgba(var(--glyph), .015); }
.maut-form { border-right: 1px solid var(--line); padding: 16px; }
.maut-f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.maut-f small { color: var(--faint); }
.maut-f input, .maut-f select { background: transparent; border: 1px solid var(--line); color: var(--text); font: 14px var(--sans); padding: 7px 9px; border-radius: 4px; width: 100%; }
.maut-f input:focus, .maut-f select:focus { outline: none; border-color: var(--faint); }
.maut-go[disabled] { opacity: .4; cursor: not-allowed; }
.maut-map { position: relative; height: 380px; background: #111; }
.maut-consent { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; color: var(--muted); font-size: 14px; }
.maut-consent .bote-btn { justify-self: center; margin-top: 6px; }
.maut-small { font-size: 11px; color: var(--faint); }
.maut-status { color: var(--muted); }
.maut-out { padding: 16px; }
.maut-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.maut-kpis span { display: block; font-size: 11.5px; color: var(--faint); }
.maut-kpis b { font-size: 22px; font-weight: 500; }
.maut-kpis div:last-child b { color: var(--accent); }
.maut-rows { list-style: none; padding: 0; }
article .maut-rows li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
article .maut-rows li::before { display: none; }
.maut-note { font-size: 11.5px; color: var(--faint); margin-top: 12px; }
@media (max-width: 760px) { .maut { grid-template-columns: 1fr; } .maut-form { border-right: 0; border-bottom: 1px solid var(--line); } .maut-kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Estimation Game: Silonio look (light, Montserrat, orange) ---------- */
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
.bote {
  --s-bg: #f6f6f6; --s-card: #fff; --s-ink: #191919; --s-mute: #6b7280; --s-faint: #9ca3af; --s-line: #e5e5e5;
  --s-or: #ff8341; --s-or-d: #c2500f; --s-font: "Montserrat", system-ui, sans-serif;
  color-scheme: light; font-family: var(--s-font); color: var(--s-ink);
  border: 0; border-radius: 16px; padding: 22px;
  background: radial-gradient(rgba(25,25,25,.07) 1px, transparent 1.2px) 0 0 / 14px 14px, var(--s-bg);
}
.bote .mono { font-family: var(--s-font); }
.bote-top { color: var(--s-mute); font-size: 12px; font-weight: 500; margin-bottom: 16px; }
.bote-dots span { border-color: var(--s-faint); }
.bote-dots span.done { background: var(--s-ink); border-color: var(--s-ink); }
.bote-dots span.now { background: var(--s-or); border-color: var(--s-or); }
.bote-play, .bote-end { background: var(--s-card); border: 2px solid rgba(255,255,255,.7); border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); padding: 24px 24px 26px; }
.bote-step { color: var(--s-or); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.bote-q { font-family: var(--s-font); font-weight: 500; letter-spacing: -.02em; color: var(--s-ink); }
.bote-field { border: 1px solid var(--s-line); border-radius: 8px; padding: 0 14px; background: #fff; transition: border-color .15s; }
.bote-field:focus-within { border-color: var(--s-or); }
.bote-in { color: var(--s-ink); font-family: var(--s-font); font-size: 20px; }
.bote-in::placeholder { color: var(--s-faint); }
.bote-unit { color: var(--s-mute); font-weight: 500; }
.bote-btn { background: var(--s-or); color: #fff; border: 0; border-radius: 8px; padding: 10px 20px; font: 500 14px var(--s-font); box-shadow: 0 3px 0 var(--s-or-d); transition: transform .08s, box-shadow .08s; }
.bote-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--s-or-d); }
.bote-btn.ghost { background: var(--s-ink); color: #fff; box-shadow: 0 3px 0 #000; }
.bote-err { color: #dc2626; font-family: var(--s-font); }
.bote-score { color: var(--s-or); font-style: italic; font-weight: 600; }
.bote-verdict { font-weight: 600; color: var(--s-ink); }
.bote-cmp, .bote-label { color: var(--s-mute); }
.bote-label { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: 11px; }
.bote-tree { border-left: 2px solid var(--s-or); }
article .bote-tree li { color: var(--s-mute); font-size: 14.5px; }
.bote-tree li b { color: var(--s-ink); }
.bote-tree li.tot { border-top-color: var(--s-line); color: var(--s-ink); font-weight: 500; }
.bote-big { color: var(--s-or); font-style: italic; font-weight: 600; }
.bote-big span { color: var(--s-faint); font-style: normal; font-weight: 500; }
article .bote-rows li { font-family: var(--s-font); color: var(--s-ink); }
.bote-rows b { color: var(--s-or); }
.bote-rows em { color: var(--s-mute); }
.yc-shot { background: #0a0a0b; }
.yc-shot canvas { width: 100%; height: 100%; display: block; }
