/* ============ FONTS ============ */
  @font-face { font-family: "Schibsted"; font-weight: 400; font-style: normal; font-display: block;
    src: url(fonts/sg-400.woff2) format("woff2"); }
  @font-face { font-family: "Schibsted"; font-weight: 500; font-style: normal; font-display: block;
    src: url(fonts/sg-500.woff2) format("woff2"); }
  @font-face { font-family: "Newsreader"; font-weight: 400; font-style: normal; font-display: block;
    src: url(fonts/nr-400.woff2) format("woff2"); }

  /* ============ TOKENS ============ */
  :root {
    color-scheme: dark;
    --black:  #000000;
    --ink:    #0A0A0A;
    --white:  #FCFBFB;
    --gray:   #9A9A98;
    --gray-2: #6A6A68;
    --line:   #232323;
    --line-2: #3E3E3C;
    --accent: #E8B33C;
    --alert:  #D8503C;
    --sans:  "Schibsted", -apple-system, "Helvetica Neue", Arial, sans-serif;
    --serif: "Newsreader", "Cochin", Georgia, "Times New Roman", serif;
    --code:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --margin: clamp(24px, 6vw, 104px);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
  }
  :root[data-theme="light"] { color-scheme: dark; }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--black); color: var(--white);
    font-family: var(--sans); font-size: 16px; line-height: 1.6; letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    min-height: 100vh; display: flex; flex-direction: column;
  }
  ::selection { background: var(--white); color: var(--black); }
  a { color: inherit; }
  button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
  svg { shape-rendering: geometricPrecision; }
  .skip { position: absolute; left: -9999px; top: 0; background: var(--white); color: var(--black);
    padding: 10px 18px; font-size: 13px; z-index: 200; }
  .skip:focus { left: 0; }
  :focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

  /* ============ TYPE ============ */
  .display, h1.page, h2.sec, h3, .serif {
    font-family: var(--serif); font-weight: 400; letter-spacing: -0.018em;
  }
  .display { font-size: clamp(2.75rem, 6.6vw, 6.25rem); line-height: 1.0; text-wrap: balance; }
  h1.page  { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1.02; text-wrap: balance; }
  h2.sec   { font-size: clamp(1.875rem, 3.6vw, 3.125rem); line-height: 1.08; text-wrap: balance; }
  h3       { font-size: 1.375rem; line-height: 1.25; }
  em, .it  { font-style: normal; font-family: inherit; font-weight: inherit; color: inherit; }
  article.essay em, .pfull .detail em, .mode em { color: var(--white); }
  .lede { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.55; color: var(--gray); max-width: 46ch; }
  p.body { color: var(--gray); }
  .num { font-variant-numeric: tabular-nums; }

  /* margin tag — aperture glyph + serif italic, NOT gray mono subtitle */
  .tag { display: flex; flex-direction: column; gap: 8px; }
  .tag .n { font-size: 0.8125rem; color: var(--gray-2); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
  .tag .lb { font-family: var(--serif); font-size: 1.0625rem; color: var(--white); line-height: 1.35; }
  .tag .lb::before {
    content: ""; display: inline-block; width: 10px; height: 11px; margin-right: 11px;
    background: var(--accent); vertical-align: 1px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 78'%3E%3Cpath d='M6 10h49v13L27 15v48l28-8v13H6V10zm53 17h7v24h-7z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 78'%3E%3Cpath d='M6 10h49v13L27 15v48l28-8v13H6V10zm53 17h7v24h-7z'/%3E%3C/svg%3E") no-repeat center / contain;
  }

  /* ---- brand-derived glyphs on list items ---- */
  .gly { width: 40px; height: 40px; display: block; color: var(--gray-2); transition: color 400ms var(--ease); }
  .item:hover .gly { color: var(--accent); }
  .gly line, .gly rect, .gly circle, .gly path { vector-effect: non-scaling-stroke; }

  /* ---- figures ---- */
  figure.fig { margin: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  figure.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
  figure.fig figcaption { margin-top: 20px; font-family: var(--serif); font-size: 0.9375rem; color: var(--gray-2); }
  .fig .ax { stroke: #3E3E3C; stroke-width: 1; }
  .fig .seg { stroke: #FCFBFB; stroke-width: 1; }
  .fig .lbl { fill: #9A9A98; font-family: var(--sans); font-size: 13px; letter-spacing: -0.011em; }
  .fig .lbl-b { fill: #FCFBFB; font-family: var(--serif); font-size: 17px; }
  .fig .lbl-s { fill: #6A6A68; font-family: var(--sans); font-size: 12px; }
  .fig .acc { fill: var(--accent); }
  .fig .acc-s { stroke: var(--accent); stroke-width: 1; }
  .fig .cell { fill: none; stroke: #3E3E3C; stroke-width: 1; }
  .fig .cell-on { fill: rgba(252,251,251,0.10); stroke: #FCFBFB; stroke-width: 1; }
  .fig .cell-rev { fill: rgba(232,179,60,0.16); stroke: var(--accent); stroke-width: 1; }
  @keyframes revpulse { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
  .fig .pulse { animation: revpulse 2.8s ease-in-out infinite; }
  @media (prefers-reduced-motion: reduce) { .fig .pulse { animation: none; opacity: 0.8; } }

  /* ---- expansion grids ---- */
  .grids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .grids .gcap { margin-top: 16px; font-size: 0.875rem; color: var(--gray-2); }
  @media (max-width: 700px) { .grids { grid-template-columns: 1fr; gap: 28px; } }

  .shell { padding-left: var(--margin); padding-right: var(--margin); max-width: 1440px; margin: 0 auto; width: 100%; }

  /* ============ HEADER — solid, no backdrop-filter (it rasterizes the logo) ============ */
  header.site { position: sticky; top: 0; z-index: 80; background: var(--black); border-bottom: 1px solid var(--line); }
  .nav-row { display: flex; align-items: center; justify-content: space-between; height: 88px; gap: 32px; }
  .brand { display: flex; align-items: center; text-decoration: none; color: var(--white); flex: 0 0 auto; }
  /* aspect-ratio + explicit width: Safari won't derive width from the viewBox when only height is set */
  .brand .lockup { height: 38px; width: 170.2px; aspect-ratio: 349.3 / 78; display: block; }
  @media (max-width: 620px) { .nav-row { gap: 16px; } .brand .lockup { height: 28px; width: 125.4px; } }
  @media (max-width: 380px) { .brand .lockup { height: 24px; width: 107.5px; } }
  nav.primary { display: flex; align-items: center; gap: 38px; }
  nav.primary a { font-size: 0.9375rem; text-decoration: none; color: var(--gray); position: relative; padding: 6px 0; transition: color 300ms var(--ease); }
  nav.primary a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: right; transition: transform 400ms var(--ease);
  }
  nav.primary a:hover { color: var(--white); }
  nav.primary a:hover::after { transform: scaleX(1); transform-origin: left; }
  nav.primary a[aria-current="page"] { color: var(--white); }
  nav.primary a[aria-current="page"]::after { transform: scaleX(1); }
  nav.primary a.nav-cta {
    color: var(--white); border: 1px solid var(--line-2); padding: 12px 22px; font-weight: 500;
    transition: background 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
  }
  nav.primary a.nav-cta::after { display: none; }
  nav.primary a.nav-cta:hover { background: var(--white); color: var(--black); border-color: var(--white); }
  .menu-btn { display: none; }
  @media (max-width: 900px) {
    nav.primary { position: fixed; inset: 88px 0 0 0; background: var(--black); flex-direction: column;
      align-items: stretch; gap: 0; padding: 24px var(--margin); display: none; z-index: 79; }
    nav.primary.open { display: flex; }
    nav.primary a { font-size: 1.25rem; padding: 22px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); }
    nav.primary a.nav-cta { border: 1px solid var(--line-2); margin-top: 28px; text-align: center; padding: 18px; font-family: var(--sans); font-size: 1rem; }
    .menu-btn { display: block; font-size: 0.9375rem; color: var(--gray); }
  }

  main { flex: 1; }
  [data-view] { display: none; }
  [data-view].active { display: block; }

  /* ============ BANDS ============ */
  .band { padding: clamp(76px, 12vh, 168px) 0; }
  .band.hairline { border-top: 1px solid var(--line); }
  .grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 64px; align-items: start; }
  @media (max-width: 940px) { .grid { grid-template-columns: 1fr; gap: 28px; } }
  .stack-lg { display: flex; flex-direction: column; gap: clamp(44px, 6vh, 76px); }
  .stack-md { display: flex; flex-direction: column; gap: 28px; }

  /* ============ HERO ============ */
  .hero { position: relative; overflow: hidden; padding-top: clamp(72px, 14vh, 176px); padding-bottom: clamp(64px, 11vh, 128px); }
  #sweep { position: absolute; top: 50%; right: max(2vw, calc(var(--margin) - 40px)); transform: translateY(-50%);
    width: min(46vw, 560px); height: min(46vw, 560px); pointer-events: none; }
  @media (max-width: 1100px) { #sweep { opacity: 0.5; right: -10vw; } }
  @media (max-width: 700px)  { #sweep { opacity: 0.3; } }
  .hero .shell { position: relative; z-index: 2; }
  .hero .display { max-width: 24ch; margin-bottom: 44px; }
  .hero .display .pt { color: var(--accent); }
  .ln { display: block; overflow: hidden; }
  .ln > span { display: block; transform: translateY(105%); }
  .lit .ln > span { transform: none; transition: transform 1100ms var(--ease); }
  .lit .ln:nth-child(2) > span { transition-delay: 110ms; }
  .lit .ln:nth-child(3) > span { transition-delay: 220ms; }
  .hero-foot {
    margin-top: clamp(60px, 10vh, 124px); padding-top: 36px; border-top: 1px solid var(--line);
    display: grid; grid-template-columns: 190px minmax(0,1fr) auto; gap: 64px; align-items: start;
  }
  .hero-foot.tight { grid-template-columns: minmax(0,1fr) auto; }
  .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
  @media (max-width: 940px) { .hero-foot, .hero-foot.tight { grid-template-columns: 1fr; gap: 28px; } }

  /* ============ BUTTONS ============ */
  .btn {
    display: inline-flex; align-items: center; gap: 14px; white-space: nowrap;
    font-size: 0.9375rem; font-weight: 500; text-decoration: none;
    padding: 15px 26px; border: 1px solid var(--line-2); color: var(--white);
    transition: background 320ms var(--ease), color 320ms var(--ease), border-color 320ms var(--ease);
  }
  .btn .arr { transition: transform 320ms var(--ease); }
  .btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }
  .btn:hover .arr { transform: translateX(6px); }
  .btn.fill { background: var(--white); color: var(--black); border-color: var(--white); }
  .btn.fill:hover { background: transparent; color: var(--white); border-color: var(--line-2); }

  /* ============ ITEMS ============ */
  .items { display: flex; flex-direction: column; }
  /* default is 2-col; only rows that actually carry a glyph get the third track */
  .item { padding: 44px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 36px; align-items: start; }
  .item.has-gly { grid-template-columns: 56px 40px minmax(0,1fr); }
  .item:first-child { border-top: none; padding-top: 0; }
  .item .n { font-size: 0.8125rem; color: var(--gray-2); font-variant-numeric: tabular-nums; padding-top: 0.5em; }
  .item h3 { margin-bottom: 14px; }
  .item p { color: var(--gray); max-width: 64ch; }
  @media (max-width: 780px) {
    .item, .item.has-gly { grid-template-columns: 40px minmax(0,1fr); gap: 22px; }
    .item .gly { display: none; }
  }

  /* ============ PHASES ============ */
  .phases { display: flex; flex-direction: column; }
  .phase {
    display: grid; grid-template-columns: 56px 210px minmax(0,1fr) 28px; gap: 36px; align-items: baseline;
    padding: 34px 0; border-top: 1px solid var(--line); text-decoration: none;
    transition: opacity 400ms var(--ease);
  }
  .phase:first-child { border-top: none; padding-top: 0; }
  .phases:hover .phase { opacity: 0.34; }
  .phases .phase:hover { opacity: 1; }
  .phase .n { font-size: 0.8125rem; color: var(--gray-2); font-variant-numeric: tabular-nums; }
  .phase .nm { font-family: var(--serif); font-size: 1.75rem; letter-spacing: -0.02em; line-height: 1.05; }
  .phase .nm span { display: block; font-family: var(--sans); font-size: 0.8125rem; color: var(--gray-2); margin-top: 10px; letter-spacing: 0; }
  .phase p { color: var(--gray); max-width: 58ch; font-size: 0.9375rem; }
  .phase .arr { color: var(--gray-2); transition: transform 400ms var(--ease), color 400ms var(--ease); }
  .phase:hover .arr { transform: translateX(8px); color: var(--white); }
  @media (max-width: 940px) {
    .phase { grid-template-columns: 48px 1fr; gap: 20px; }
    .phase p { grid-column: 2; margin-top: 12px; }
    .phase .arr { display: none; }
  }

  /* ============ PHASE DETAIL ============ */
  .pfull { padding: clamp(52px, 7vh, 92px) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 64px; }
  .pfull:first-of-type { border-top: none; padding-top: 0; }
  .pfull .ident .n { font-size: 0.8125rem; color: var(--gray-2); display: block; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
  .pfull .ident h3 { font-size: 1.875rem; margin-bottom: 10px; }
  .pfull .ident .dur { font-size: 0.8125rem; color: var(--gray-2); }
  .pfull .detail p { color: var(--gray); margin-bottom: 20px; max-width: 66ch; }
  .pfull .detail p:last-child { margin-bottom: 0; }
  .pfull .detail strong { color: var(--white); font-weight: 500; }
  .pfull .detail ul { list-style: none; margin: 26px 0; }
  .pfull .detail li { color: var(--gray); padding: 16px 0; border-top: 1px solid var(--line); max-width: 66ch; }
  .pfull .detail li strong { color: var(--white); font-weight: 500; }
  @media (max-width: 940px) { .pfull { grid-template-columns: 1fr; gap: 24px; } }

  /* ============ RULES ============ */
  .rules { list-style: none; }
  .rules li {
    display: grid; grid-template-columns: 56px 1fr; gap: 36px; align-items: baseline;
    padding: 24px 0; border-top: 1px solid var(--line); font-size: 1.125rem;
    font-family: var(--serif); letter-spacing: -0.012em; line-height: 1.4;
  }
  .rules li:first-child { border-top: none; padding-top: 0; }
  .rules li .n { font-family: var(--sans); font-size: 0.8125rem; color: var(--gray-2); font-variant-numeric: tabular-nums; }
  .rules li.key .n { color: var(--accent); }
  @media (max-width: 640px) { .rules li { grid-template-columns: 36px 1fr; gap: 18px; font-size: 1.0625rem; } }

  /* ============ MODES ============ */
  .mode { padding: clamp(44px, 6vh, 76px) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 64px; }
  .mode:first-of-type { border-top: none; padding-top: 0; }
  .mode .m-id .n { font-size: 0.8125rem; color: var(--gray-2); display: block; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
  .mode .m-id h3 { font-size: 1.75rem; }
  .mode .m-body > p { color: var(--gray); max-width: 66ch; }
  .mode .m-body > p + p { margin-top: 14px; }
  .sub { margin-top: 34px; }
  .sub dt { font-family: var(--serif); font-size: 1.125rem; color: var(--white); margin-bottom: 6px; }
  .sub dd { color: var(--gray); font-size: 0.9375rem; max-width: 66ch; margin-bottom: 24px; }
  .sub dd:last-child { margin-bottom: 0; }
  @media (max-width: 940px) { .mode { grid-template-columns: 1fr; gap: 22px; } }

  /* ============ NOTES ============ */
  .notes { display: flex; flex-direction: column; }
  .note {
    display: grid; grid-template-columns: 190px minmax(0,1fr) 28px; gap: 64px; align-items: start;
    padding: 44px 0; border-top: 1px solid var(--line); text-decoration: none;
    transition: opacity 400ms var(--ease);
  }
  .note:first-child { border-top: none; padding-top: 0; }
  .notes:hover .note { opacity: 0.34; }
  .notes .note:hover { opacity: 1; }
  .note .meta { font-size: 0.8125rem; color: var(--gray-2); display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
  .note h3 { font-size: 1.625rem; margin-bottom: 12px; }
  .note p { color: var(--gray); max-width: 64ch; font-size: 0.9375rem; }
  .note .arr { color: var(--gray-2); transition: transform 400ms var(--ease), color 400ms var(--ease); }
  .note:hover .arr { transform: translateX(8px); color: var(--white); }
  @media (max-width: 940px) {
    .note { grid-template-columns: 1fr; gap: 14px; }
    .note .meta { flex-direction: row; gap: 20px; }
    .note .arr { display: none; }
  }

  article.essay { max-width: 36rem; }
  article.essay .meta { font-size: 0.8125rem; color: var(--gray-2); display: flex; gap: 26px; margin-bottom: 36px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
  article.essay h1 { font-family: var(--serif); font-size: clamp(2.125rem, 4vw, 3.25rem); line-height: 1.06; letter-spacing: -0.02em; margin-bottom: 44px; }
  article.essay p { color: var(--gray); margin-bottom: 22px; font-size: 1.0625rem; line-height: 1.68; }
  article.essay p strong { color: var(--white); font-weight: 500; }
  article.essay h2 { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.015em; margin: 52px 0 18px; color: var(--white); }
  article.essay ul { list-style: none; margin: 28px 0; }
  article.essay li { color: var(--gray); padding: 18px 0; border-top: 1px solid var(--line); font-size: 1rem; line-height: 1.6; }
  article.essay li strong { color: var(--white); font-weight: 500; }
  article.essay .back { font-size: 0.8125rem; color: var(--gray-2); text-decoration: none; display: inline-block; margin-bottom: 52px; }
  article.essay .back:hover { color: var(--white); }
  .math {
    font-family: var(--code); font-size: 0.8125rem; line-height: 1.95; letter-spacing: 0;
    border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
    padding: 26px 0; color: var(--gray); margin: 32px 0; overflow-x: auto; white-space: pre;
  }
  .math .hl { color: var(--white); }

  /* ============ CONTACT ============ */
  .mailto {
    font-family: var(--serif); font-size: clamp(1.625rem, 4.4vw, 3.25rem);
    line-height: 1.05; letter-spacing: -0.03em; color: var(--white);
    text-decoration: none; display: inline-block; position: relative; word-break: break-word;
  }
  .mailto::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px;
    background: var(--line-2); transition: background 300ms var(--ease);
  }
  .mailto:hover::after { background: var(--accent); }
  .asks { list-style: none; margin: 0; }
  .asks li { color: var(--gray); padding: 18px 0; border-top: 1px solid var(--line); max-width: 64ch; }
  .asks li strong { color: var(--white); font-weight: 500; }

  /* ============ CLOSER ============ */
  .closer { border-top: 1px solid var(--line); }
  .closer .inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 64px; align-items: end; }
  .closer h2 { margin-bottom: 22px; }
  .closer p { color: var(--gray); max-width: 48ch; }
  @media (max-width: 940px) { .closer .inner { grid-template-columns: 1fr; align-items: start; gap: 34px; } }

  /* ============ FOOTER ============ */
  footer.site { border-top: 1px solid var(--line); padding: clamp(52px, 7vh, 92px) 0 40px; }
  .foot { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 48px; align-items: end; }
  .foot-lockup { width: clamp(170px, 22vw, 250px); height: auto; display: block; color: var(--gray); }
  .foot-links { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
  .foot-links a { font-size: 0.9375rem; color: var(--gray-2); text-decoration: none; transition: color 300ms var(--ease); }
  .foot-links a:hover { color: var(--white); }
  .foot-base { margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--gray-2); }
  @media (max-width: 940px) { .foot { grid-template-columns: 1fr; } .foot-links { align-items: flex-start; } }

  /* ============ REVEAL ============ */
  .rv { opacity: 0; transform: translateY(16px); transition: opacity 850ms var(--ease), transform 850ms var(--ease); }
  .rv.in { opacity: 1; transform: none; }
  .rv.d1 { transition-delay: 110ms; } .rv.d2 { transition-delay: 220ms; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rv { opacity: 1; transform: none; transition: none; }
    .ln > span { transform: none !important; }
    * { transition-duration: 0.01ms !important; }
  }
