/* twilight ventures profile. Tokens match the company site. */

:root {
  color-scheme: dark;
  --bg: #0B0713;
  --surface: #1C1226;
  --surface-2: #2A1B39;
  --text: #DCD6EA;
  --muted: #8E86A6;
  --accent: #FF2BD6;
  --accent-2: #22E8FF;
  --glow: #8DFFB8;
  --halo: rgba(255, 43, 214, 0.22);
  --halo-2: rgba(34, 232, 255, 0.18);
  --halo-3: rgba(141, 255, 184, 0.35);
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --rail: 17rem;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #F7F3FB;
    --surface: #E6DCF0;
    --surface-2: #D9CCE8;
    --text: #2A1B3A;
    --muted: #6C5F80;
    --accent: #B0128E;
    --accent-2: #0B7F8F;
    --glow: #1E7A48;
    --halo: rgba(176, 18, 142, 0.12);
    --halo-2: rgba(11, 127, 143, 0.1);
    --halo-3: rgba(30, 122, 72, 0.18);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F3FB;
  --surface: #E6DCF0;
  --surface-2: #D9CCE8;
  --text: #2A1B3A;
  --muted: #6C5F80;
  --accent: #B0128E;
  --accent-2: #0B7F8F;
  --glow: #1E7A48;
  --halo: rgba(176, 18, 142, 0.12);
  --halo-2: rgba(11, 127, 143, 0.1);
  --halo-3: rgba(30, 122, 72, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.hide {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 20px;
  top: -4rem;
  padding: 8px 12px;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
}
.skip:focus { top: 8px; }

/* header */

.top { border-bottom: 1px solid var(--surface); }
.top__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
  padding-top: 18px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--glow);
  font-weight: 650;
  text-decoration: none;
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.top nav a {
  color: var(--muted);
  font-size: 0.94em;
  text-decoration: none;
}
.top nav a:hover { color: var(--accent-2); }

/* opening */

.opening { padding-top: 52px; padding-bottom: 28px; }

h1 {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: clamp(2.1rem, 6.2vw, 3.7rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-shadow: 0 0 22px var(--halo-2);
}

.lead {
  max-width: 62ch;
  margin: 0 0 34px;
  font-size: 1.08em;
}

/* the wall */

.controls { margin: 0; }

.switch {
  display: none;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid var(--surface-2);
  border-radius: 999px;
}
.has-wall .switch { display: inline-flex; }
.switch label { cursor: pointer; }
.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch span {
  display: block;
  padding: 5px 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94em;
}
.switch input:checked + span {
  background: var(--surface-2);
  color: var(--text);
}
.switch input:focus-visible + span {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
  gap: 7px;
}

.tile {
  padding: 6px 7px 8px;
  border: 1px solid var(--surface-2);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
  transition-delay: calc(var(--n, 0) * 24ms);
}
.tile__id {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.tile__marks {
  display: grid;
  grid-template-columns: repeat(var(--mark-cols, 5), 1fr);
  gap: 3px;
  margin-top: 4px;
}
.tile--ask {
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--halo);
}

.mark {
  display: block;
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--surface-2);
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
  transition-delay: calc(var(--n, 0) * 24ms);
}
.mark--run { background: var(--glow); }
.mark--ask {
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent);
}

.is-first .tile { animation: power-on 0.4s ease both; animation-delay: calc(var(--n, 0) * 16ms); }
@keyframes power-on {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

.is-still .tile,
.is-still .mark {
  transition: none;
  animation: none;
}

/* the brief */

.brief {
  padding: 16px 18px 18px;
  border: 1px solid var(--surface-2);
  border-radius: 12px;
  background: var(--surface);
}
.brief h2 {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 1rem;
  font-weight: 650;
}
.brief__count {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.94em;
}
.digits { display: inline-flex; gap: 5px; }
.digits svg { display: block; width: 19px; height: 35px; }
.seg { fill: var(--surface-2); transition: fill 0.4s ease; }
.seg--on { fill: var(--glow); filter: drop-shadow(0 0 3px var(--halo-3)); }

.brief__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.brief__item,
.brief__empty {
  padding: 9px 0;
  border-top: 1px solid var(--surface-2);
  font-size: 0.92em;
  line-height: 1.45;
}
.brief__who {
  display: block;
  color: var(--accent);
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
}
.brief__empty { color: var(--muted); }
.brief__more {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9em;
}
.brief__more:empty { display: none; }

/* key and dials */

.key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9em;
}
.key li { display: flex; align-items: center; gap: 8px; }
.key .mark { width: 11px; }

.dials {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 26px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--surface);
}
.has-wall .dials { display: grid; }
.dials label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  color: var(--muted);
  font-size: 0.92em;
}
.dials input {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin: 0;
  accent-color: var(--accent-2);
}
.dials output {
  grid-column: 2;
  grid-row: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sum {
  max-width: 68ch;
  margin: 24px 0 8px;
}
.note {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9em;
}

/* reading sections */

.read {
  padding-top: 40px;
  padding-bottom: 8px;
}
.read > * { max-width: 68ch; }

h2 {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 1.32rem;
  font-weight: 650;
  line-height: 1.25;
}
h3 {
  margin: 30px 0 10px;
  color: var(--glow);
  font-size: 1rem;
  font-weight: 650;
}
p { margin: 0 0 14px; }

.plain {
  margin: 0 0 14px;
  padding-left: 1.15em;
}
.plain li { margin-bottom: 8px; }
.plain li::marker { color: var(--muted); }

.ledger { margin: 20px 0; }
.ledger > div {
  padding: 12px 0;
  border-top: 1px solid var(--surface);
}
.ledger > div:last-child { border-bottom: 1px solid var(--surface); }
.ledger dt { color: var(--glow); font-weight: 650; }
.ledger dd { margin: 2px 0 0; }

.years {
  margin: 0;
  padding: 0;
  list-style: none;
}
.years > li {
  padding: 14px 0 4px;
  border-top: 1px solid var(--surface);
}
.years__when {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
}
.years p { margin-bottom: 10px; }

/* footer */

.foot {
  margin-top: 56px;
  padding: 22px 0 40px;
  border-top: 1px solid var(--surface);
  color: var(--muted);
  font-size: 0.9em;
}
.foot .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.foot__date { margin-left: auto; }

/* wide screens: the brief sits beside the wall, headings sit in a rail */

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
  .grid { gap: 9px; }
  .tile { padding: 8px 9px 10px; }
  .tile__id { font-size: 0.7rem; }

  .read {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 68ch);
    column-gap: 40px;
    padding-top: 56px;
  }
  .read > * { grid-column: 2; }
  .read > h2 { grid-column: 1; grid-row: 1 / span 40; }

  .ledger > div,
  .years > li {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    column-gap: 20px;
  }
  .ledger dd { margin: 0; }
  .years__when { margin: 0; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .opening { padding-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile, .mark, .seg { transition: none; animation: none; }
}

/* paper */

@page { size: Letter; margin: 0.6in 0.65in; }

@media print {
  /* matches the weight of the screen theme rules above, so paper wins by coming last */
  :root:not(.screen-only),
  :root[data-theme] {
    color-scheme: light;
    --bg: #FFFFFF;
    --surface: #E6DCF0;
    --surface-2: #D9CCE8;
    --text: #1E142B;
    --muted: #5C5070;
    --accent: #B0128E;
    --accent-2: #0B5F6C;
    --glow: #1E7A48;
    --halo: transparent;
    --halo-2: transparent;
    --halo-3: transparent;
  }
  body { font-size: 9.8pt; line-height: 1.42; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .skip, .top nav, .switch, .dials, .screen { display: none !important; }
  .top { border: 0; }
  .top__row { padding: 0 0 6pt; }
  .wrap { max-width: none; padding: 0; }
  .opening { padding: 8pt 0 0; }
  h1 { font-size: 23pt; margin-bottom: 8pt; text-shadow: none; }
  h1 br { display: none; }
  .lead { margin-bottom: 12pt; }
  .stage { grid-template-columns: 4.1in minmax(0, 1fr); gap: 14pt; }
  .grid { grid-template-columns: repeat(6, 1fr); gap: 4pt; }
  .tile { padding: 3pt 4pt 4pt; box-shadow: none; border-radius: 4pt; }
  .tile__id { font-size: 6pt; }
  .tile__marks { gap: 1.5pt; margin-top: 2pt; }
  .mark--ask { box-shadow: none; }
  .brief { padding: 8pt 10pt; }
  .brief__item { padding: 3pt 0; }
  .digits svg { width: 12pt; height: 22pt; }
  .seg--on { filter: none; }
  .key { margin-top: 8pt; }
  .sum { margin-top: 10pt; }
  .read {
    display: block;
    padding: 11pt 0 0;
  }
  .read > * { max-width: none; }
  h2 { font-size: 13pt; margin-bottom: 6pt; break-after: avoid; }
  h3 { margin: 12pt 0 4pt; break-after: avoid; }
  p { margin-bottom: 6pt; }
  .ledger { margin: 8pt 0; }
  .ledger > div,
  .years > li {
    display: grid;
    grid-template-columns: 1.55in minmax(0, 1fr);
    column-gap: 12pt;
    padding: 5pt 0;
    break-inside: avoid;
  }
  .ledger dd, .years__when { margin: 0; }
  .years p { margin-bottom: 4pt; }
  .plain li { margin-bottom: 3pt; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .foot { margin-top: 12pt; padding: 8pt 0 0; }
}
