/* In Silico Studio. Hairline system carried over from vaperesearch.company:
   paper, ink, one 1px rule per boundary, a 40% column axis, square full-height
   nav cells. Strict 8px spacing grid (4px only for tight detail). Light only. */
:root {
  color-scheme: light;
  --paper: #f4f3eb; --surface: #fbfaf5; --ink: #191919; --ink2: #505050;
  --line: #bfbfbf; --outline: #878787; --wash: #4747470d;
  --glass: radial-gradient(ellipse at 80% 36%, #deddd8, transparent 70%), linear-gradient(135deg, #fbfaf5, #f5f4ef 60%);
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --g: clamp(16px, 4.8vw, 96px);
  --axis: calc(40% + var(--g) * .2);
  --head: 64px;
}
* { box-sizing: border-box; min-width: 0 }
html { scroll-padding-top: var(--head) }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Helvetica Neue", sans-serif; overflow-x: clip; -webkit-font-smoothing: antialiased }
a { color: inherit; text-underline-offset: 4px }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance }
h1 { font: 500 clamp(40px, 6vw, 88px)/1 var(--display); letter-spacing: -.03em }
h2 { font: 400 clamp(24px, 2.4vw, 32px)/1.2 var(--serif) }
h3 { font: 600 16px/1.5 var(--display) }
p { margin: 0 0 16px; max-width: 64ch }
.mut { color: var(--ink2) }
.lead { font-size: 18px; color: var(--ink2) }
:focus-visible { outline: 3px solid var(--outline); outline-offset: -3px }
.skip { position: absolute; left: -9999px } .skip:focus { left: 8px; top: 8px; z-index: 9; background: var(--surface); padding: 8px 16px }

/* masthead: square full-height cells, each owns its leading hairline */
header { position: sticky; top: 0; z-index: 5; display: flex; height: var(--head); background: var(--paper); border-bottom: 1px solid var(--line) }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 var(--g); font: 600 16px var(--display); text-decoration: none; flex: none }
.brand svg { width: 24px; height: 24px }
nav.main { display: flex; margin-left: auto }
nav.main a { display: flex; align-items: center; padding: 0 24px; border-left: 1px solid var(--line); text-decoration: none; font-size: 14px }
nav.main a:hover { background: var(--wash) }
nav.main a[aria-current] { text-decoration: underline }
.menu { display: none; margin-left: auto }
.menu summary { list-style: none; display: flex; align-items: center; height: var(--head); padding: 0 24px; border-left: 1px solid var(--line); cursor: pointer; font-size: 14px }
.menu summary::-webkit-details-marker { display: none }
.menu[open] summary { background: var(--wash) }
.menu div { position: absolute; left: 0; right: 0; top: var(--head); background: var(--paper); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr }
.menu div a { padding: 0 var(--g); min-height: 56px; display: flex; align-items: center; border-top: 1px solid var(--line); text-decoration: none }
.menu div a:nth-child(odd) { border-right: 1px solid var(--line) }

/* the axis */
.row { display: grid; grid-template-columns: var(--axis) minmax(0, 1fr); border-bottom: 1px solid var(--line) }
.row > * { padding: 48px var(--g) }
.row > :first-child { border-right: 1px solid var(--line) }
.row.page > * { padding-block: 64px }
.eyebrow { display: block; margin-bottom: 16px; font-size: 14px; color: var(--ink2) }

/* home hero */
.hero { min-height: calc(100svh - var(--head) - 56px) }
.hero > :first-child { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding-block: 64px }
.stage { position: relative; padding: 0 !important; background: var(--glass); min-height: 480px; overflow: hidden; box-shadow: inset 0 1px 1px #fffff6c2 }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100% }
.bar { display: grid; grid-template-columns: var(--axis) repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line) }
.bar > * { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px; border-left: 1px solid var(--line); font-size: 14px; text-decoration: none }
.bar > :first-child { border-left: 0; justify-content: flex-start; padding-left: var(--g); color: var(--ink2) }
.bar a:hover { background: var(--wash) }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 1px solid var(--ink); text-decoration: none; font-size: 14px; background: transparent; color: inherit }
.btn:hover { background: var(--wash) }
.btn.solid { background: var(--ink); color: var(--paper) } .btn.solid:hover { background: #303030 }
.acts { display: flex; flex-wrap: wrap; gap: 8px }

/* cell grids own their dividers */
.cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line) }
.cells > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px }
.cells h3 { margin-bottom: 8px }
.cells p { margin: 0; color: var(--ink2); font-size: 14px }
a.cell { text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 160px }
a.cell:hover { background: var(--wash) }
a.cell span { font-size: 14px }

/* empty state */
.empty { border: 1px solid var(--line); background: var(--glass); min-height: 320px; display: grid; place-content: center; text-align: center; padding: 48px 24px }
.empty p { margin: 8px auto 0 }

dl.facts { display: grid; grid-template-columns: minmax(120px, 30%) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line) }
dl.facts dt, dl.facts dd { margin: 0; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line) }
dl.facts dt { color: var(--ink2); font-size: 14px }

/* footer: a small sitemap on the same axis */
footer { display: grid; grid-template-columns: var(--axis) minmax(0, 1fr) }
footer > * { padding: 48px var(--g) }
footer > :first-child { border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 24px }
footer nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px }
footer nav h3 { font-size: 14px; color: var(--ink2); font-weight: 400; margin-bottom: 8px }
footer nav a { display: block; padding: 4px 0; text-decoration: none; font-size: 14px }
footer nav a:hover { text-decoration: underline }
footer small { color: var(--ink2); font-size: 13px }

@media (max-width: 960px) { nav.main { display: none } .menu { display: block } }
@media (max-width: 700px) {
  .row, .bar, footer { grid-template-columns: minmax(0, 1fr) }
  .row > :first-child, footer > :first-child { border-right: 0; border-bottom: 1px solid var(--line) }
  .row > *, .row.page > * { padding: 40px var(--g) }
  .hero { min-height: 0 } .stage { min-height: 320px }
  .bar { grid-template-columns: repeat(3, minmax(0, 1fr)) } .bar > :first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line) } .bar > :nth-child(2) { border-left: 0 }
  footer nav { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .menu div { grid-template-columns: 1fr } .menu div a:nth-child(odd) { border-right: 0 }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }
