/*
Purpose: page-level rules for the company routes (/about/, /news/) on top of the shared shell. The portfolio, sciences, surfaces and architecture routes are retired, and their rules left with them (audit CODE-09).
Governance scope: founder block, Roman-numbered principles, changelog list, and the restyle of pinned legacy readouts.
Dependencies: assets/shell.css tokens and components (linked first) and the rules these routes used from assets/styles.css, copied in section 0 with the alias tokens (audit R1-024); the routes no longer link styles.css.
Invariants: no tokens or fonts beyond the copied aliases, no viewport units in font sizes, no negative tracking, 12px floor, 44px targets, nothing hidden until scrolled.
*/

/* ==========================================================================
   0. Rules copied from assets/styles.css for /about/ and /news/ (audit R1-024):
      the selector-list members these routes can match, the focus ring, the alias
      tokens and their breakpoint re-sets, in source order, so the cascade is
      unchanged now that the routes no longer link that sheet. Keep them in step
      with assets/styles.css.
   ========================================================================== */
:root {
  --panel: var(--bg-panel);
  --wrap: var(--maxw);

  /* Aliases kept for route sheets and the guide helper (?inspect=1 reads --panel-glass,
     --panel-field, --nav-elevated and --selection-ink) until each route is restyled. They
     point at the shell tokens, so both themes follow assets/shell.css (audit R1-009). */
  --selection-ink: var(--accent-ink);
  --nav-elevated: var(--bg);
  --panel-glass: var(--bg-raise);
  --panel-soft: var(--bg-raise);
  --panel-field: var(--bg-panel);
  --hover-panel: var(--bg-panel);

  --symbols: "Mullusi Symbols", "Mullusi Text", sans-serif;

  /* Role sizes the site validator requires (validate-site role-size contract). */
  --role-heading-size: 2.5rem;
  --role-card-body-size: 0.875rem;

  --dur-slow: 420ms;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --selection-ink: var(--ink);
  }
}
:root[data-theme="light"] {
  --selection-ink: var(--ink);
}
section[id] {
  scroll-margin-top: 1.5rem;
}
figure { margin: 0; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.theme-toggle-icon {
  display: inline-block;
  width: 0.875rem;
  height: 0.875rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  flex: none;
}
.status-pill {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-2);
  margin-top: var(--s-4);
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  line-height: 1.6;
  border: 1px solid var(--line);
  font-size: var(--t-meta);
  text-decoration: none;
}
.status-pill::before {
  content: "";
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--accent);
}
.status-pill:hover { color: var(--ink); border-color: var(--line-bright); }
.status-pill .not-yet { white-space: nowrap; color: var(--accent-warm); }
.status-pill .sep { color: var(--ink-dim); }
.ledger-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  counter-reset: cell;
  list-style: none;
}
.ledger-grid > * > .cell-num { margin-bottom: var(--s-4); }
.ledger-grid h3 { margin-bottom: var(--s-2); }
.ledger-grid p { display: block; font-style: normal; color: var(--ink-soft); font-size: var(--t-small); line-height: 1.55; }
.hero .folio { margin-bottom: var(--s-7); }
.shipped { list-style: none; border-top: 1px solid var(--ink); }
.shipped li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.shipped time { font-family: var(--mono); font-size: var(--t-meta); color: var(--ink-dim); padding-top: 0.2rem; }
.shipped p { color: var(--ink); }
.nav-links a,
.foot-cols a,
.mobile-menu a,
.btn,
.menu-toggle {
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.about-readout-card {
  display: grid;
  gap: 12px;
}
.about-readout-card dt {
  color: var(--accent-warm);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}
.about-readout-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.about-readout-card dl div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-field) 86%, transparent);
  padding: 10px;
}
.about-readout-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
@media (max-width: 1440px) {
  :root { --role-heading-size: 2.25rem; }
}
@media (max-width: 980px) {
  :root { --role-heading-size: 2rem; }
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 760px) {
  :root { --role-heading-size: 1.75rem; }
}
@media (max-width: 680px) {
  .foot-cols .col:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s-2);
    align-content: start;
  }
  .foot-cols .col:last-child:nth-child(odd) h3 { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  :root { --role-heading-size: 1.625rem; }
  .cols-4,
  .cols-2 { grid-template-columns: 1fr; }
  .status-pill .sep { display: none; }
  .status-pill { display: inline-grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-2); row-gap: 0; }
  .status-pill > span { grid-column: 2; }
  .shipped li { grid-template-columns: 1fr; gap: var(--s-1); }
}
@media (forced-colors: active) {
  .ledger-grid,
  .mobile-menu { border: 1px solid CanvasText; }
  .ledger-grid > * { border: 1px solid CanvasText; }
  .btn,
  .theme-toggle,
  .menu-toggle,
  .status-pill { border: 1px solid ButtonText; forced-color-adjust: none; background: ButtonFace; color: ButtonText; }
  .btn-solid { background: Highlight; color: HighlightText; }
  .status-pill::before { background: CanvasText; }
}
@media print {
  .band,
  .hero { padding-block: var(--s-5); break-inside: avoid; }
}
@media (min-width: 981px) and (max-height: 700px) {
  .hero .folio { margin-bottom: var(--s-5); }
}

/* ==========================================================================
   Route rules
   ========================================================================== */

/* Founder block: copy left, the one photo right. The photo lives only here. */
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--s-8);
  align-items: start;
}
.founder-grid > * { min-width: 0; }
.founder-copy h1 { max-width: 16ch; }
.founder-copy .lead { margin-top: var(--s-5); max-width: 34rem; }
.founder-copy .hero-actions,
.sec-head .hero-actions { margin-top: var(--s-6); }
.hero .sec-head { margin-bottom: var(--s-7); }
.hero .sec-head h1 { max-width: 16ch; }
/* The photo lies flat: the one elevation level belongs to the record and the mobile menu. */
.founder-photo {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-raise);
}
.founder-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.founder-photo figcaption {
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-dim);
}

/* Funding: the standard section head, then the support link at the 44px target. */
.funding-head { margin-bottom: 0; }
.funding-head .support { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s-3); font-weight: 500; }

/* Three short paragraphs, each with a mono key. */
.keyed { list-style: none; display: grid; gap: var(--s-4); margin-top: var(--s-6); border-top: 1px solid var(--ink); padding-top: var(--s-5); max-width: 40rem; }
.keyed li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s-4); }
.keyed .k { font-family: var(--mono); font-size: var(--t-meta); font-weight: 500; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 0.25rem; }
.keyed p { color: var(--ink-soft); }

/* The at-a-glance readout keeps its pinned class name and gets the ledger look. */
.about-readout-card { display: block; margin-top: var(--s-5); }
.about-readout-card dl {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.about-readout-card dl div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-3) var(--s-4);
  border: 0;
  background: var(--bg-raise);
}
.about-readout-card dt {
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}
.about-readout-card dd { margin: 0; color: var(--ink); font-size: var(--t-small); line-height: 1.55; overflow-wrap: anywhere; }
.about-readout-card dd .state { color: var(--accent); font-weight: 600; }
.about-readout-card dd .state-not-yet { color: var(--accent-warm); font-weight: 600; }

/* Principles as design commitments, numbered I to IV in the display face. */
.rules { counter-reset: rule; }
.rules > li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--s-4); }
.rules > li::before {
  counter-increment: rule;
  content: counter(rule, upper-roman);
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1;
  color: var(--accent);
  font-variation-settings: "opsz" 36;
  padding-top: 0.125rem;
}
.rules > li > div { min-width: 0; }
.cell-name { display: block; font-family: var(--serif); font-size: 1.375rem; font-weight: 400; line-height: 1.15; color: var(--ink); margin-bottom: var(--s-3); }
.rules p { font-size: var(--t-small); }

/* Actions under a ledger cell's copy. */
.cell-actions { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* State list: one dot per item; teal Available, amber Not yet, grey Planned. */
.state-note { margin-top: var(--s-5); max-width: 44rem; color: var(--ink-soft); }

/* Changelog: the shared .shipped list plus a 44px link per entry. */
.changelog-list .shipped li { grid-template-columns: 7.5rem minmax(0, 1fr) auto; align-items: start; }
.changelog-list .shipped p { font-size: var(--t-body); }
.changelog-list .entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: -0.6rem;
  margin-bottom: -0.6rem;
  font-size: var(--t-small);
  font-weight: 500;
  white-space: nowrap;
}
.changelog-source { margin-top: var(--s-4); color: var(--ink-dim); font-size: var(--t-small); max-width: 44rem; }

@media (max-width: 980px) {
  .founder-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .founder-photo { max-width: 22rem; }
}

@media (max-width: 620px) {
  .keyed li { grid-template-columns: 1fr; gap: var(--s-1); }
  .about-readout-card dl div { grid-template-columns: 1fr; gap: var(--s-1); }
  .changelog-list .shipped li { grid-template-columns: 1fr; }
  .changelog-list .entry-link { margin-top: 0; margin-bottom: -0.5rem; }
  .rules > li { grid-template-columns: 2.25rem minmax(0, 1fr); }
}

@media (forced-colors: active) {
  .founder-photo, .about-readout-card dl { border: 1px solid CanvasText; }
}
