/* Shared across the website, project downloads and game. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/dm-sans-latin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "Cascadia Mono", Consolas, monospace;

  --bg: #f6f1ea;
  --surface: #fcf9f3;
  --soft: #ece4d8;
  --text: #221b29;
  --muted: #62566d;
  --line: #d9cfc0;
  --ink-line: #493b57;
  --purple: #7340a8;
  --purple-soft: #ece2f7;
  --accent-warm: #c95642;
  --accent-warm-soft: #f7e4df;
  --on-accent: #fcf9f3;
  --red: #ad394d;
  --green: #267452;
  --radius: 10px;
  --press-shadow: #291e3418;
  --shadow: 0 3px 0 var(--press-shadow);
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --panel-padding: clamp(1.1rem, 3vw, 1.7rem);

  --spine-1: #7d4db3;
  --spine-2: #cf624d;
  --spine-3: #2a8a7a;
  --spine-4: #c68339;
  --spine-5: #b85386;
  --spine-6: #4b77b5;

  --pg-native: #7340a8;
  --pg-recompiled: #218c7b;
  --pg-interpreted: color-mix(in srgb, var(--muted) 40%, var(--surface));

  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14111a;
  --surface: #1d1926;
  --soft: #272233;
  --text: #f3ede4;
  --muted: #b0a4bd;
  --line: #362e45;
  --ink-line: #665785;
  --purple: #cda2f5;
  --purple-soft: #312646;
  --accent-warm: #ec8471;
  --accent-warm-soft: #3b2429;
  --on-accent: #1b1227;
  --red: #f08e9a;
  --green: #75d4a8;
  --press-shadow: #06040a99;
  --shadow: 0 3px 0 var(--press-shadow);

  --spine-1: #b88ce8;
  --spine-2: #eb8470;
  --spine-3: #5ec2b0;
  --spine-4: #e0a763;
  --spine-5: #df82b1;
  --spine-6: #7ca7e3;

  --pg-native: #b58beb;
  --pg-recompiled: #3bb6a2;
}

* { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(color-mix(in srgb, var(--text) 5.5%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: 13px 13px;
  font-size: 1rem;
  line-height: 1.6;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
::selection { background: var(--purple); color: var(--on-accent); }
a { color: var(--purple); text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.14;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.45rem, 5.5vw, 3.85rem);
  font-weight: 740;
  letter-spacing: -.038em;
  font-variation-settings: "opsz" 72;
}
h2 {
  font-size: clamp(1.3rem, 2.3vw, 1.62rem);
  font-weight: 700;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 32;
}
h3 {
  font-size: 1.14rem;
  font-weight: 680;
  letter-spacing: -.018em;
}
h1, h2, h3, p { margin: 0 0 .85rem; }
img { max-width: 100%; }
code, kbd { font-family: var(--font-mono); }

.shell {
  width: min(100%, 66rem);
  min-height: 100vh;
  min-height: 100svh;
  padding-inline: var(--gutter);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
.shell > main { flex: 1; min-width: 0; }

/* Header and navigation */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1.5rem;
  padding-block: 1.25rem 1rem;
  border-bottom: 1px dashed var(--line);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 740;
  letter-spacing: -.03em;
  text-decoration: none;
}
.site-brand::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background-color: var(--purple);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fcf9f3' d='M21.2 11.4a6.2 6.2 0 1 0 0 9.2l-2.2-2.1a3.2 3.2 0 1 1 0-5z'/%3E%3Ccircle cx='23.3' cy='9.2' r='2.1' fill='%23f4b7aa'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  transition: transform .16s ease;
}
:root[data-theme="dark"] .site-brand::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%231b1227' d='M21.2 11.4a6.2 6.2 0 1 0 0 9.2l-2.2-2.1a3.2 3.2 0 1 1 0-5z'/%3E%3Ccircle cx='23.3' cy='9.2' r='2.1' fill='%231b1227'/%3E%3C/svg%3E");
}
.site-brand:hover::before { transform: rotate(-6deg) scale(1.04); }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; font-size: .93rem; }
.topbar nav a, .project-nav summary, .theme-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: .38rem .72rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 560;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.topbar nav a:hover, .project-nav summary:hover, .project-nav[open] summary, .theme-toggle:hover {
  color: var(--text);
  background: var(--soft);
}
.topbar nav [aria-current], .project-nav summary.active {
  color: var(--purple);
  background: var(--purple-soft);
  font-weight: 650;
}
.account-link { max-width: 12rem; overflow-wrap: anywhere; }
.project-nav { position: relative; }
.project-nav summary { list-style: none; gap: .5rem; }
.project-nav summary::-webkit-details-marker { display: none; }
.project-nav summary::after {
  content: "";
  width: .38rem;
  height: .38rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.12rem) rotate(45deg);
}
.project-nav[open] summary::after { transform: translateY(.08rem) rotate(225deg); }
.project-menu {
  position: absolute;
  z-index: 10;
  inset-inline-end: 0;
  top: calc(100% + .45rem);
  min-width: 16rem;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px var(--press-shadow);
}
.topbar .project-menu a {
  display: flex;
  color: var(--text);
}
.theme-toggle {
  gap: .42rem;
  margin-inline-start: .2rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .85rem;
  color: var(--text);
  white-space: nowrap;
}
.theme-toggle::before {
  content: "";
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.theme-toggle:hover { border-color: var(--ink-line); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 1.25rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-block: 1.4rem 1.85rem;
  border-top: 1px dashed var(--line);
}
.footer-brand {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .4rem .8rem;
}
.site-footer a {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
}
.site-footer a:hover { color: var(--purple); text-decoration: underline; }
.footer-note {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
}
.pride-marks {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.trans-accent,
.lesbian-accent {
  display: inline-block;
  width: 2.55rem;
  height: .36rem;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
}
.trans-accent {
  background: linear-gradient(90deg, #6cc4e0 0 20%, #efa5be 20% 40%, #f8f5f9 40% 60%, #efa5be 60% 80%, #6cc4e0 80%);
}
.lesbian-accent {
  background: linear-gradient(90deg, #d52d00 0 20%, #ef7627 20% 40%, #f8f5f9 40% 60%, #d162a4 60% 80%, #a30262 80%);
}

/* Page structure and actions */
.page-heading {
  padding-block: clamp(2rem, 5vw, 3.6rem) clamp(1.35rem, 3vw, 2.1rem);
}
.page-heading h1 { margin-bottom: .65rem; overflow-wrap: anywhere; }
.page-heading > p {
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.58;
}
.page-heading > :last-child, .panel > :last-child { margin-bottom: 0; }
.page-actions, .community-links, .directory-actions, .review-actions, .owner-tools, .review-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem .7rem;
}
.page-actions { margin-top: 1.1rem; }

.button, .quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  max-width: 100%;
  min-height: 2.5rem;
  padding: .48rem .95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 2px 0 var(--press-shadow);
  transition: transform .1s ease, box-shadow .1s ease, border-color .12s ease, background-color .12s ease;
}
.button:hover, .quiet:hover {
  border-color: var(--ink-line);
  background: var(--soft);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--press-shadow);
}
.button:active, .quiet:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--press-shadow);
}
.button.primary {
  border-color: transparent;
  background: var(--purple);
  color: var(--on-accent);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--purple) 60%, #000);
}
.button.primary:hover {
  background: color-mix(in srgb, var(--purple) 88%, var(--text));
  box-shadow: 0 3px 0 color-mix(in srgb, var(--purple) 60%, #000);
}
.button-danger, .session-revoke { color: var(--red); }
.social-link, .inline-link, .text-button, .form-links button {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: .22em;
}
.text-button, .form-links button { border: 0; padding: .35rem 0; background: transparent; text-align: left; }

.panel, .mod-card, .mod-upload, .account-card, .owner-card, .owner-chart, .owner-table, .release-note, .game-directory, .progress-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.panel, .mod-card, .mod-upload, .account-card, .release-note { padding: var(--panel-padding); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  margin-block: 2rem 1rem;
}
.section-heading h2 { margin: 0; }
.panel > .section-heading:first-child { margin-top: 0; }
.game-help, .field-help, .release-note p { color: var(--muted); }
.game-help, .field-help { font-size: .92rem; }
.release-note { margin-bottom: 1rem; }
.release-note p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.release-note > :last-child { margin-bottom: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}

/* Homepage hero, project shelf & notes */
.home-hero {
  padding-block: clamp(2.1rem, 5.5vw, 3.6rem) clamp(1.2rem, 2.8vw, 1.85rem);
}
.home-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1rem;
  margin-bottom: .9rem;
}
.home-hero h1 {
  font-size: clamp(2.8rem, 6.8vw, 4.4rem);
  margin: 0;
}
.home-aside {
  font-family: var(--font-mono);
  font-size: .88rem;
  color: var(--muted);
}
.home-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem 1.25rem;
}
.home-links a {
  position: relative;
  color: var(--text);
  font-weight: 560;
  font-size: .96rem;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: .28em;
  text-decoration-thickness: 1.5px;
  transition: color .12s ease, text-decoration-color .12s ease;
}
.home-links a:hover {
  color: var(--purple);
  text-decoration-color: var(--purple);
}

.project-directory {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .95rem;
}
.project-directory li {
  margin: 0;
  display: flex;
}
.project-directory a {
  --spine: var(--spine-1);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.15rem 1.25rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--spine);
  border-radius: 4px var(--radius) var(--radius) 4px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .14s ease, background-color .14s ease, box-shadow .12s ease;
}
.project-directory li:nth-child(6n + 1) a { --spine: var(--spine-1); }
.project-directory li:nth-child(6n + 2) a { --spine: var(--spine-2); }
.project-directory li:nth-child(6n + 3) a { --spine: var(--spine-3); }
.project-directory li:nth-child(6n + 4) a { --spine: var(--spine-4); }
.project-directory li:nth-child(6n + 5) a { --spine: var(--spine-5); }
.project-directory li:nth-child(6n + 6) a { --spine: var(--spine-6); }
.project-directory a:hover,
.project-directory a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--ink-line);
  border-inline-start-color: var(--spine);
  box-shadow: 0 5px 0 var(--press-shadow);
}
.project-directory h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.14rem, 2vw, 1.3rem);
  font-weight: 710;
}
.project-directory a:hover h3,
.project-directory a:focus-visible h3 {
  color: var(--purple);
}
.project-directory p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.55;
}

.home-notes {
  margin-top: clamp(2.4rem, 5.5vw, 3.6rem);
  padding-top: 1.8rem;
  border-top: 1px dashed var(--line);
  max-width: 58ch;
}
.home-notes h2 {
  font-size: 1.15rem;
  margin-bottom: .75rem;
}
.home-notes p {
  font-size: .96rem;
  line-height: 1.68;
  color: var(--muted);
  margin: 0 0 .85rem;
}
.home-notes p:last-child { margin-bottom: 0; }

/* Game directories */
.stats, .connection, .stats > div, .checkbox { display: flex; align-items: center; gap: .5rem; }
.stats { gap: .65rem 1.5rem; flex-wrap: wrap; margin: 1rem 0; }
.stats, .checkbox, .connection, .connection small { font-size: .875rem; color: var(--muted); }
.stats strong {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.status-light { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--muted); }
.status-light.online { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.status-light.offline { background: var(--red); }
.game-directory { overflow-x: auto; margin-bottom: .9rem; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
th {
  background: var(--soft);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
}
td { font-size: .9375rem; }
td small { display: block; color: var(--muted); }
.game-state {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--purple);
}
.game-state.started { color: var(--red); }
.empty-state { text-align: center; padding: 2.1rem 1rem; }
.empty-state h3 { margin-bottom: .4rem; }
.empty-state p { max-width: 52ch; margin: auto; font-size: .9375rem; color: var(--muted); }

/* Accounts, mod submissions and review */
.account-card, .game-signin { max-width: 32rem; }
.auth-form, .sessions { display: grid; gap: 1rem; }
.auth-form h2, .auth-form p { margin: 0; }
.auth-tabs, .owner-tabs { display: flex; gap: .35rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.auth-tabs button, .owner-tab {
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: .9375rem;
  font-weight: 600;
  padding: .65rem .8rem;
}
.auth-tabs button.active, .owner-tab[aria-selected="true"] { color: var(--purple); border-color: var(--purple); }
.auth-form label, .review-form label, .review-tools label, #mods-view .section-heading label { display: grid; gap: .4rem; font-size: .92rem; font-weight: 560; }
.auth-form input, .review-form textarea, #mod-search, .review-tools select {
  width: 100%;
  min-width: 0;
  padding: .62rem .78rem;
  min-height: 2.6rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.auth-form input:focus, .review-form textarea:focus, #mod-search:focus, .review-tools select:focus {
  border-color: var(--purple);
  background: var(--surface);
}
#mod-search { width: min(20rem, 100%); }
.auth-form label.checkbox { display: flex; align-items: flex-start; font-weight: 450; }
.checkbox input { width: auto; min-height: 0; flex: none; margin-top: .3rem; accent-color: var(--purple); }
.auth-form .field-help, .review-form .field-help, .sessions .field-help { margin: 0; color: var(--muted); font-size: .875rem; }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; }
.form-links button, .text-button { font-size: .92rem; }
#profile-email, .mod-creator, .verified-label { color: var(--muted); }
#profile-view, #public-profile-name { overflow-wrap: anywhere; }
#profile-view > details, .review-form { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
#profile-view .auth-form, .sessions { margin-top: 1rem; }
.session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.session { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding: .85rem; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; }
.session-info { min-width: 0; overflow-wrap: anywhere; }
.session-info small { display: block; font-size: .8125rem; color: var(--muted); }
.session-info .badge { margin-inline-start: .5rem; }
.game-signin { margin-bottom: 1.2rem; padding: var(--panel-padding); border: 1px solid var(--purple); border-inline-start: 4px solid var(--purple); border-radius: var(--radius); background: var(--purple-soft); }
.game-signin strong { font-family: var(--font-mono); letter-spacing: .12em; }
.mod-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.15rem; }
.mod-card { align-self: start; overflow: hidden; overflow-wrap: anywhere; }
.mod-description, .review-note, .mod-card pre { white-space: pre-wrap; }
.mod-card details, .mod-upload form { margin-top: 1rem; }
.mod-upload summary, .mod-card summary { color: var(--purple); font-weight: 600; }
.mod-thumbnail { aspect-ratio: 16 / 9; background: var(--soft); border-bottom: 1px solid var(--line); margin: calc(-1 * var(--panel-padding)) calc(-1 * var(--panel-padding)) 1.15rem; }
.mod-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mod-thumbnail-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); font-family: var(--font-mono); font-size: .82rem; }
.badges { display: flex; gap: .45rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--soft);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
}
.badge-owner, .badge-rejected, .card-status { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.badge-moderator, .badge-approved { color: var(--purple); background: var(--purple-soft); border-color: color-mix(in srgb, var(--purple) 40%, var(--line)); }
.review-note { padding: .75rem; border-left: 3px solid var(--purple); background: var(--soft); }
.review-form textarea { min-height: 5rem; resize: vertical; }
.review-actions { margin-top: .85rem; }
.card-status:empty, .badges:empty, .session-list:empty, .sessions .field-help:empty { display: none; }
.notice {
  position: fixed;
  z-index: 20;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .75rem;
  width: min(38rem, calc(100% - 2rem));
  padding: .9rem 1rem;
  border: 1px solid var(--ink-line);
  border-inline-start: 4px solid var(--accent-warm);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--press-shadow);
  background: var(--surface);
}
.notice-symbol {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  border-radius: 6px;
  background: var(--accent-warm-soft);
  color: var(--accent-warm);
  font-family: var(--font-mono);
  font-weight: 700;
}
.notice p { flex: 1; margin: 0; }
.notice button { padding: .42rem .72rem; color: var(--purple); border: 1px solid var(--line); border-radius: 6px; background: var(--purple-soft); font-weight: 600; }

/* Dashboard and progress charts */
.owner-heading { font-size: 1.1rem; margin: 34px 0 14px; }
.owner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.owner-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.owner-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.owner-value { font-family: var(--font-display); font-size: 30px; font-weight: 740; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.owner-card small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.owner-chart { margin-top: 14px; padding: 16px 18px 10px; }
.owner-chart:empty { display: none; }
.owner-chart h3 { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.owner-chart svg { display: block; width: 100%; height: auto; }
.owner-chart .bar { fill: var(--purple); }
.owner-chart .bar-empty { fill: var(--line); }
.owner-chart .axis { fill: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.owner-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; margin-top: 14px; }
.owner-table { padding: 16px 18px; }
.owner-table h3 { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
.owner-table td { font-size: 13px; padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.owner-table tr:last-child td { border-bottom: 0; }
.owner-table td:first-child { font-weight: 500; }
.owner-table .owner-number { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.owner-peak { font-weight: 400; margin-left: 10px; font-size: 12px; }
.owner-meter { display: block; width: 100%; height: 6px; margin-top: 2px; }
.owner-meter .track { fill: var(--line); }
.owner-meter .fill { fill: var(--purple); }
.owner-meter.warn .fill { fill: var(--red); }
.owner-card.warn .owner-value { color: var(--red); }
.owner-chart .line { fill: none; stroke: var(--purple); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.owner-chart .line-second { stroke: var(--muted); stroke-dasharray: 5 4; }
.owner-chart .dot { fill: var(--purple); }
.owner-chart .gridline { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.owner-legend { font-weight: 400; margin-left: 10px; font-size: 12px; }
.owner-table .owner-state { font-family: var(--font-mono); text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.owner-table .state-ok { color: var(--green); }
.owner-table .state-bad { color: var(--red); }

@media (max-width: 48rem) {
  .project-directory { grid-template-columns: 1fr; }
}

@media (max-width: 45rem) {
  .topbar { gap: .55rem 1rem; }
  .topbar nav { width: 100%; gap: .18rem; }
  .topbar nav a, .project-nav summary, .theme-toggle { padding-inline: .55rem; }
  .project-menu { inset-inline: 0 auto; }
  th, td { padding: .65rem .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
