:root {
  /* Tokens from DESIGN.md. Use these, never a raw value. */
  --night: #0E1524;          /* Midnight: the page */
  --sky: #0A1524;            /* the painted sky behind the tree (brand/tree-hero.png's top edge) */
  --navy-900: #141D30;       /* cards, panels */
  --navy-800: #1B2539;       /* inputs on a card, hover fill */
  --navy-700: #26314A;       /* hairlines, card borders */
  --navy-600: #36425E;       /* strong borders, input borders */
  --navy-500: #4A5674;       /* dividers, letter tiles */
  --navy-400: #67728F;       /* decorative only, never text */
  --moon: #F3EBDD;           /* Ivory: main text */
  --moon-dim: #B7B0A4;       /* secondary text */
  --moon-faint: #958F86;     /* hints, timestamps, labels */
  --persimmon: #F08A2C;      /* the brand: buttons, links, the period, the fruit */
  --persimmon-bright: #F6A253;
  --persimmon-deep: #D9741A;
  --persimmon-ink: #1C1512;  /* text on a persimmon fill */
  --persimmon-soft: rgba(240, 138, 44, 0.14);
  --persimmon-glow: rgba(240, 138, 44, 0.4);
  --leaf: #8DBA74;           /* checkmarks and "live" marks only */
  --danger-red: #F0605A;     /* errors, destructive actions */
  --danger-soft: rgba(240, 96, 90, 0.1);
  /* Light backgrounds (emails, printed): Cream, persimmon on light, text on light. */
  --cream: #F6F0E6;
  --persimmon-on-light: #C4621A;  /* large text, the period, accents on cream */
  --persimmon-on-light-text: #A65316; /* small text links on cream (4.8:1) */
  --ink: #1C1512;
  --scrim: rgba(7, 11, 20, 0.74);
  /* The night, see-through: behind the example searches, and the edge of the hero fading into the page. */
  --night-veil: rgba(14, 21, 36, 0.64);
  --night-clear: rgba(14, 21, 36, 0);

  --bt-display: "Young Serif", Georgia, "Times New Roman", serif;
  --bt-font: "Source Sans 3", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--bt-display);
  --font: var(--bt-font);
  --t-xs: 13px;
  --t-sm: 14px;
  --t-md: 16px;
  --t-lg: 20px;
  --t-xl: 25px;
  --t-2xl: 31px;
  --t-3xl: 39px;
  --t-4xl: 49px;
  --t-5xl: 61px; /* the home headline on wide screens (1600px and up) */
  --t-mark: 96px; /* a project's first letter standing in for its image */

  --r-sm: 4px;
  --r: 6px;
  --r-lg: 8px;
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.45);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --page: 1120px;
  --page-wide: 1280px; /* the home page below the tree, on wide screens */

  /* Older names, kept so every rule follows the tokens above. */
  --bg: var(--night);
  --surface: var(--navy-900);
  --surface-2: var(--navy-800);
  --line: var(--navy-700);
  --line-strong: var(--navy-600);
  --text: var(--moon);
  --muted: var(--moon-dim);
  --faint: var(--moon-faint);
  --accent: var(--persimmon);
  --accent-ink: var(--persimmon-ink);
  --accent-soft: var(--persimmon-soft);
  --danger: var(--danger-red);
  --radius: var(--r-lg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--t-md)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; line-height: 1.15; }
input, textarea, select, button { font-size: var(--t-md); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 24px 20px 48px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-7); }
/* The logo (public/brand/logo.svg, the one place to swap it). */
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.wordmark img { display: block; height: 38px; width: auto; }
@media (max-width: 719px) { .wordmark img { height: 32px; } }

/* Profile header */
.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 24px;
  align-items: center;
}
.avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-family: var(--display); font-size: var(--t-2xl);
  color: var(--accent);
}
.identity h1 { margin: 0; font-size: var(--t-3xl); }
.handle { margin: 6px 0 0; color: var(--muted); }
.meta { margin: 6px 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 14px; font-size: var(--t-md); }
.meta span + span::before { content: "\00B7"; margin-right: 14px; color: var(--faint); }
.bio { grid-column: 1 / -1; margin: 12px 0 0; font-size: var(--t-lg); max-width: 60ch; color: var(--text); }
.tags { grid-column: 1 / -1; list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: var(--t-sm); color: var(--muted);
  padding: 3px 10px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line);
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 36px 0 0; }
.btn {
  font: inherit; font-weight: 600; font-size: var(--t-md);
  min-height: 46px; padding: 0 22px;
  border-radius: var(--r); cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--persimmon-bright); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn:focus-visible, .card-link:focus-visible, input:focus-visible, textarea:focus-visible, .close:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Contact form */
.contact {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  scroll-margin-top: 16px;
}
.contact-head { display: flex; justify-content: space-between; align-items: center; }
.contact-head h2 { margin: 0; font-size: var(--t-lg); }
.close {
  background: none; border: 0; color: var(--muted); font-size: var(--t-2xl); line-height: 1;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
}
.close:hover { color: var(--text); background: var(--surface-2); }

.type-toggle {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  display: inline-flex; padding: 3px; margin: 16px 0 20px; gap: 2px;
}
.type-toggle label { cursor: pointer; position: relative; }
.type-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.type-toggle span { display: block; padding: 6px 16px; border-radius: var(--r-sm); font-size: var(--t-md); color: var(--muted); }
.type-toggle input:checked + span { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.type-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--t-sm); color: var(--muted); }
.field-wide { grid-column: 1 / -1; }
.field em { font-style: normal; color: var(--faint); }
.field input, .field textarea {
  font: inherit; font-size: var(--t-md); color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 12px 14px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field .invalid { border-color: var(--danger); }
.field-foot { display: flex; justify-content: space-between; gap: 12px; }
.err { color: var(--danger); }
.field > .err:empty { display: none; }
.count { color: var(--faint); margin-left: auto; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.form-status { margin: 0; color: var(--muted); font-size: var(--t-md); }
.form-status.ok { color: var(--accent); }
.form-status.bad { color: var(--danger); }

/* Work grid */
.work { margin-top: var(--s-8); }
.work-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.work-head h2 { margin: 0; font-size: var(--t-xl); }
.legend { margin: 0; font-size: var(--t-sm); color: var(--faint); display: flex; align-items: center; gap: 6px; }
.legend-live { display: inline-flex; align-items: center; gap: 5px; color: var(--leaf); font-weight: 600; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); /* two to a row on desktop: the work is big */
  grid-auto-rows: 1fr; /* every card the same height */
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin: 0; font-size: var(--t-lg); }
.line { margin: 0; color: var(--muted); font-size: var(--t-md); }
.card .line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Card labels: plain text, no pills */
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h3 { min-width: 0; overflow-wrap: anywhere; }
.card-status { flex: none; font-size: var(--t-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.card-status.is-shipped { color: var(--accent); }

/* The footer is pushed to the bottom so footers in a row line up when cards differ in height. */
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-sm); font-weight: 600; text-decoration: none; color: var(--muted);
  padding: 4px 0; border-radius: var(--r);
}
a.card-link:hover { color: var(--text); }
.card-link.is-built { color: var(--accent); }
a.card-link.is-built:hover { color: var(--persimmon-bright); }
.card-link.is-live { color: var(--leaf); }
a.card-link.is-live:hover { color: var(--moon); }
.card-arrow { transition: transform 0.15s; }
a.card-link:hover .card-arrow { transform: translate(1px, -1px); }

/* Footer */
.footer {
  margin-top: 80px; padding-top: 28px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--accent); }

/* Simple pages (404) */
.simple { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.simple h1 { font-size: var(--t-3xl); margin: 0 0 12px; }
.simple p { color: var(--muted); margin: 0 0 28px; font-size: var(--t-lg); }
.simple .btn { display: inline-flex; align-items: center; text-decoration: none; }
.simple-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }

@media (max-width: 640px) {
  .page { padding-top: 18px; }
  .topbar { margin-bottom: 36px; }
  .profile { gap: 14px 16px; }
  .avatar { width: 64px; height: 64px; font-size: var(--t-lg); }
  .identity h1 { font-size: var(--t-2xl); }
  .bio { font-size: var(--t-md); }
  .actions .btn { flex: 1 1 0; padding: 0 14px; }
  .contact { padding: 18px; }
  .fields { grid-template-columns: 1fr; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .btn { width: 100%; }
  .work { margin-top: var(--s-7); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Home page */
.topbar-link { color: var(--muted); text-decoration: none; font-size: var(--t-md); font-weight: 600; }
.topbar-link:hover { color: var(--text); }

.hero { max-width: 760px; padding: 24px 0 8px; }
.eyebrow { margin: 0 0 var(--s-3); color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.hero h1 { margin: 0; font-size: var(--t-4xl); }
.hero-sub { margin: var(--s-4) 0 0; font-size: var(--t-lg); color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: var(--s-6); }
.text-link { color: var(--text); text-decoration: none; font-weight: 600; }
.text-link:hover { color: var(--accent); }

.section { margin-top: var(--s-9); }
.section-title { margin: 0 0 var(--s-5); font-size: var(--t-xl); }

/* What a company sees: one real profile, big, and what each part of it means. */
.showcase-head { max-width: 62ch; margin-bottom: var(--s-6); }
.showcase-head h2 { margin: 0; font-size: var(--t-3xl); }
.showcase-head p { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--t-lg); }
.showcase-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.featured-top { display: flex; align-items: center; gap: 14px; }
.avatar-sm { width: 48px; height: 48px; font-size: var(--t-lg); flex: none; }
.featured-name { margin: 0; font-size: var(--t-lg); font-weight: 600; }
.featured-handle { margin: 2px 0 0; color: var(--muted); font-size: var(--t-sm); }

.closing { padding: var(--s-8) 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5) var(--s-7); align-items: end; }
.closing h2 { margin: 0; font-size: var(--t-3xl); max-width: 22ch; }
.closing p { margin: var(--s-3) 0 0; color: var(--muted); font-size: var(--t-lg); max-width: 52ch; }

.footer-note { color: var(--faint); font-size: var(--t-sm); }

@media (max-width: 860px) {
  .showcase-body { grid-template-columns: 1fr; gap: var(--s-6); }
  .closing { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 640px) {
  .hero { padding-top: 8px; }
  .hero h1 { font-size: var(--t-2xl); }
  .hero-actions .btn { width: 100%; }
  .hero-actions .text-link { margin: 0 auto; }
  .section { margin-top: var(--s-8); }
  .showcase-head h2, .closing h2 { font-size: var(--t-2xl); }
  .showcase-head p, .closing p { font-size: var(--t-md); }
  .closing { padding-top: var(--s-7); }
  .closing .btn { width: 100%; }
}

/* Sign in */
.auth { display: grid; justify-items: center; padding-top: 24px; }
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.auth-card h1 { margin: 0; font-size: var(--t-2xl); }
.auth-sub { margin: 0; color: var(--muted); font-size: var(--t-md); }
.auth-sub strong { color: var(--text); font-weight: 600; word-break: break-all; }
.auth-notice { background: var(--danger-soft); border-radius: var(--r); padding: 10px 14px; }
.auth-btn { width: 100%; }
.auth-card .form-status:empty { display: none; }
.link-btn {
  font: inherit; font-size: inherit; color: var(--text); font-weight: 600;
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent); }

@media (max-width: 640px) {
  .auth { padding-top: 0; }
  .auth-card { padding: 24px 20px; }
}

/* Profile editor */
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.page-editor { max-width: 760px; }
.hint { color: var(--faint); font-size: var(--t-xs); overflow-wrap: anywhere; }

.prefixed {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r);
}
.prefixed:focus-within { border-color: var(--accent); }
.prefixed:has(.invalid) { border-color: var(--danger); }
.prefix { padding-left: 14px; color: var(--faint); font-size: var(--t-md); }
.field .prefixed input { border: 0; background: transparent; padding-left: 2px; }
.field .prefixed input:focus-visible { outline: none; }

.editor { display: flex; flex-direction: column; gap: 20px; }
.editor-head h1 { margin: 0; font-size: var(--t-3xl); }
.editor-live { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: var(--t-md); }
.editor-live a { color: var(--accent); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.editor-live a:hover { text-decoration: underline; text-underline-offset: 3px; }
.badge {
  display: inline-flex; align-items: center; font-size: var(--t-xs); font-weight: 600; color: var(--muted);
  padding: 3px 10px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
}
.badge-ok { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.panel h2 { margin: 0; font-size: var(--t-lg); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-sub { margin: -6px 0 0; color: var(--muted); font-size: var(--t-md); }
.panel > .err:empty { display: none; }

.tags-edit { margin: 0; }
.tags-edit:empty { display: none; }
.tag-edit { display: inline-flex; align-items: center; gap: 4px; color: var(--text); padding-right: 4px; }
.tag-remove {
  display: grid; place-items: center; width: 26px; height: 26px; margin: -4px 0;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
}
.tag-remove:hover { color: var(--text); background: var(--surface-2); }
.tag-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.add-row { display: flex; gap: 10px; }
.add-field { flex: 1; min-width: 0; }
.add-row .btn { flex: none; }

.project-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.project-list:empty { display: none; }
.project-edit {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 12px;
}
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-num { color: var(--faint); font-size: var(--t-xs); font-weight: 600; }
.project-tools { display: flex; gap: 4px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--line-strong); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn-danger:hover:not(:disabled) { color: var(--danger); }
.project-edit .field input { background: var(--surface); }
.status-toggle { margin: 0; align-self: flex-start; }
.status-toggle span { padding: 8px 14px; }
.add-project { align-self: flex-start; }

.savebar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  margin: 0 -4px; padding: 14px 4px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.savebar .form-status { margin-right: auto; }

.panel-danger { margin-top: 28px; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--line-strong); }
.btn-danger:hover { border-color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: var(--persimmon-ink); }
.btn-danger-solid:hover { opacity: 0.88; }
.delete-confirm p { margin: 0 0 14px; }
.delete-confirm .form-status { margin: 12px 0 0; }
.delete-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .topbar-actions { gap: 16px; }
  .panel { padding: 20px 16px; }
  .project-edit { padding: 14px 14px 18px; }
  .savebar .btn { flex: none; }
  .delete-actions .btn { flex: 1 1 auto; }
}

/* Unreviewed profile note */
.new-note {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font-size: var(--t-xs); font-weight: 600;
  color: var(--faint); padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}

/* Admin review */
.admin-sub { margin: 8px 0 0; }
.admin-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.admin-item { gap: 10px; }
.admin-name { font-size: var(--t-lg); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.admin-name:hover { color: var(--accent); }
.admin-meta { margin: 4px 0 0; color: var(--muted); font-size: var(--t-sm); }
.admin-bio { margin: 0; overflow-wrap: anywhere; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.admin-confirm { display: contents; }
.admin-item .form-status:empty { display: none; }

/* Builders directory */
.dir-head h1 { margin: 0; font-size: var(--t-4xl); }
.dir-head .hero-sub { max-width: 58ch; }
.dir-sub { margin-top: 14px; }
.dir-tools { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.dir-search { max-width: 460px; }
.dir-search input { padding-left: 14px; }
.chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--muted);
  min-height: 36px; padding: 0 14px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dir-count { margin: 0; color: var(--faint); font-size: var(--t-sm); }

.dir-grid {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
}
.builder-card {
  height: 100%;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; text-decoration: none; color: var(--text); overflow: hidden;
  transition: border-color 0.15s;
}
.builder-card:hover { border-color: var(--line-strong); }
.builder-card:hover .builder-go { color: var(--accent); transform: translateX(2px); }
.builder-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.builder-who { min-width: 0; }
.builder-who p { overflow-wrap: anywhere; }
.builder-card .featured-name { font-family: var(--display); font-weight: 400; line-height: 1.2; }
.builder-meta { margin: 0; color: var(--muted); font-size: var(--t-md); }
.builder-card .tags { margin: 0; }
.tag-more { color: var(--faint); }
.builder-stats {
  margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--t-md);
}
.builder-stats strong { color: var(--text); font-weight: 600; }
.builder-go { margin-left: auto; color: var(--faint); transition: color 0.15s, transform 0.15s; }
.dir-empty { margin-top: 24px; padding: 40px 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.dir-empty p { margin: 0 0 16px; color: var(--muted); }

.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; }

@media (max-width: 640px) {
  .dir-head h1 { font-size: var(--t-2xl); }
  .dir-tools { margin-top: 28px; }
  .dir-grid { grid-template-columns: 1fr; }
  .builder-card { padding: 20px; }
}
.dir-link { display: inline-block; margin-top: 16px; font-size: var(--t-md); }

/* Badge panel on /me */
.badge-ready { display: flex; flex-direction: column; gap: 14px; }
.badge-ready .panel-sub { margin: -6px 0 0; }
.badge-preview { align-self: flex-start; display: inline-flex; border-radius: var(--r); }
.badge-preview:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge-preview img { display: block; height: 28px; width: auto; }
.snippet { display: flex; flex-direction: column; gap: 6px; }
.snippet-head { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-sm); color: var(--muted); }
.snippet-head .link-btn { font-size: var(--t-sm); }
.snippet-code {
  margin: 0; white-space: pre-wrap; user-select: all; -webkit-user-select: all;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 12px;
  overflow-wrap: anywhere;
}
.snippet-code:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Project thumbnails */
/* Every card has the same 16:10 picture area at the top, so cards line up. The work comes first. */
.card { overflow: hidden; }
.card-pic {
  position: relative; flex: none;
  margin: -22px -22px 10px; aspect-ratio: 16 / 10;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.card-thumb { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.card-pic.is-empty {
  display: grid; place-items: center;
  background: var(--navy-800);
}
.card-letter {
  font-family: var(--display); font-size: var(--t-mark); line-height: 1;
  color: var(--navy-500); user-select: none;
}
.builder-cover.is-empty { display: grid; place-items: center; height: auto; }
.builder-cover-letter { font-family: var(--display); font-size: var(--t-mark); line-height: 1; color: var(--navy-500); }
.builder-cover {
  display: block; width: calc(100% + 44px); margin: -22px -22px 4px;
  aspect-ratio: 16 / 10; object-fit: cover;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) {
  .builder-cover { width: calc(100% + 40px); margin: -20px -20px 4px; }
}

/* Project image controls on /me */
.project-image { display: flex; gap: 14px; align-items: flex-start; padding-top: 4px; }
.project-thumb {
  flex: none; width: 112px; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2);
}
.project-image-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: var(--t-sm); color: var(--muted); }
.field-label em { font-style: normal; color: var(--faint); }
.project-image-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: var(--t-md); }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; position: relative; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-btn.is-disabled { opacity: 0.5; cursor: default; }
.project-image .link-btn { font-size: var(--t-md); }
.project-image .err:empty { display: none; }
@media (max-width: 640px) {
  .project-thumb { width: 96px; }
}

/* Skill picker on /me */
.picker { position: relative; }
.picker-pop {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px;
}
.picker-pop ul { list-style: none; margin: 0; padding: 0; }
.picker-group {
  padding: 10px 10px 4px; font-size: var(--t-xs); font-weight: 600;
  color: var(--faint);
}
.picker-option {
  display: flex; align-items: center; min-height: 44px; padding: 0 10px;
  border-radius: var(--r); cursor: pointer; font-size: var(--t-md); color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.picker-option:hover { background: var(--surface); }
.picker-option.is-active { background: var(--accent-soft); color: var(--accent); }
.picker-empty { margin: 0; padding: 12px 10px; color: var(--muted); font-size: var(--t-md); }

.skill-request { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.skill-request .link-btn { font-size: var(--t-md); color: var(--muted); }
.skill-request .link-btn:hover { color: var(--accent); }
.request-form {
  align-self: stretch; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
}
.request-form .field input, .request-form .field textarea { background: var(--surface); }
.request-form .field textarea { min-height: 0; }
.request-form .field > .err:empty { display: none; }
.request-actions { display: flex; align-items: center; gap: 16px; }
.request-form .form-status:empty, .skill-request > .form-status:empty { display: none; }
.request-pending { margin: 0; color: var(--faint); font-size: var(--t-sm); }

/* Admin sections and skill requests */
.admin-section { margin-top: 36px; }
.admin-section h2 { margin: 0; font-size: var(--t-lg); }
.field select {
  font: inherit; font-size: var(--t-md); color: var(--text);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 12px 40px 12px 14px; width: 100%; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%239198a3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.field select:focus { border-color: var(--accent); outline: none; }
.field select:disabled { opacity: 0.5; }
.request-item .fields { margin-top: 4px; }
.request-match { margin: 0; font-size: var(--t-sm); color: var(--accent); }

/* Directory skill filter, grouped by category */
.skill-groups { display: flex; flex-direction: column; gap: 10px; }
.skill-group { display: grid; grid-template-columns: 132px 1fr; align-items: start; gap: 12px; }
.skill-group-label {
  font-weight: 600; padding-top: 9px; font-size: var(--t-xs); font-weight: 600; color: var(--faint);
}
@media (max-width: 640px) {
  .skill-group { grid-template-columns: 1fr; gap: 6px; }
  .skill-group-label { padding-top: 0; }
}

/* Link safety note on /me */
.link-note { color: var(--muted); font-size: var(--t-xs); }
.link-note.is-flagged { color: var(--danger); }

/* Report link on project cards */
.card-report {
  font: inherit; font-size: var(--t-xs); color: var(--faint);
  background: none; border: 0; padding: 6px 0 6px 8px; margin: -6px 0; cursor: pointer;
}
.card-report:hover { color: var(--muted); }
.card-report.is-confirm { color: var(--danger); }
.card-report:disabled { cursor: default; color: var(--faint); }
.card-report:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

/* Admin link moderation */
.link-url {
  display: block; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; overflow-wrap: anywhere;
}
.link-why { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.link-why.is-flagged { color: var(--danger); }

/* Built with: tap-to-pick AI tool chips on /me */
.built-with { gap: 8px; }
.built-with-label { color: var(--muted); font-size: var(--t-sm); }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  font: inherit; font-size: var(--t-md); font-weight: 600; color: var(--text);
  min-height: 44px; padding: 0 16px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.tool-chip:hover:not(:disabled) { border-color: var(--muted); }
.tool-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tool-chip[aria-pressed="true"]:hover { background: var(--persimmon-bright); }
.tool-chip:disabled { opacity: 0.4; cursor: default; }
.tool-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legacy-note { margin: 0; font-size: var(--t-sm); color: var(--accent); }
.built-with .err:empty, .built-with .hint:empty { display: none; }
.tool-request { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 4px; }
.tool-request .link-btn { font-size: var(--t-md); color: var(--muted); }
.tool-request .link-btn:hover { color: var(--accent); }
.tool-request .request-form { align-self: stretch; }
.tool-request .form-status:empty { display: none; }
.project-edit .request-form .field input, .project-edit .request-form .field textarea { background: var(--bg); }
.project-edit .request-form { background: var(--surface); }
.editor-intro { margin: 10px 0 0; color: var(--muted); font-size: var(--t-md); max-width: 60ch; }
.link-legacy { color: var(--accent); font-size: var(--t-xs); }

/* Built with tags on project cards and builder cards: small, quiet, outline only */
.card-tools { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.card-tools li {
  font-size: var(--t-xs); font-weight: 600; line-height: 1.4; color: var(--muted);
  padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  white-space: nowrap;
}
.tool-filter:empty { display: none; }
.builder-card .builder-tools { margin: 0; }
.featured-card .builder-tools { margin: 0; }

/* Editor: video and 3D model for the skill tree */
.project-media { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.project-media .field-label em { font-style: normal; color: var(--faint); font-weight: 500; }
.project-media .link-btn { font-size: var(--t-md); }
.project-media .err:empty { display: none; }

/* The project page: a centred card over the dimmed tree. Media first, big. */
html.project-open { overflow: hidden; }
.project-scrim {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; overflow-y: auto;
  padding: 32px 20px; padding: max(32px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
  background: var(--scrim); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity 0.22s ease;
}
.project-scrim.is-open { opacity: 1; }
.project-card {
  --c: var(--persimmon);
  position: relative; width: min(720px, 100%); margin: auto; overflow: hidden;
  border-radius: var(--r-lg); background: var(--navy-900); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop);
  transform: translateY(14px) scale(0.98); transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-scrim.is-open .project-card { transform: none; }
.project-close {
  position: absolute; z-index: 2; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  /* No browser padding or font metrics: the X is centred by flexbox alone, on every engine. */
  box-sizing: border-box; padding: 0; margin: 0; -webkit-appearance: none; appearance: none; font: inherit; line-height: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--moon);
  background: rgba(16, 13, 11, 0.72); border: 1px solid var(--line-strong);
}
.project-close:hover { background: var(--night); }
.project-close-x { display: block; flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.project-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-media { position: relative; background: var(--night); }
.pc-media .pc-media-empty { aspect-ratio: 16 / 9; }
.pc-media .leaf-image, .pc-media .leaf-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; border-radius: 0; background: var(--night); }
.pc-media .leaf-model { display: grid; place-items: center; position: relative; aspect-ratio: 16 / 10; background: var(--navy-800); }
.pc-media .leaf-model model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.pc-media-empty { display: grid; place-items: center; background: var(--navy-800); }
.pc-media-empty svg { width: 88px; height: 88px; fill: var(--c); opacity: 0.8; }
.pc-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; padding: 12px 36px 0; }
.pc-more .leaf-image, .pc-more .leaf-video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); }
.leaf-model-note { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--t-sm); }
.leaf-model-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); pointer-events: none;
  padding: 6px 12px; border-radius: var(--r); font-size: var(--t-xs); font-weight: 600; color: var(--moon);
  background: rgba(16, 13, 11, 0.72);
}
.pc-body { padding: 28px 36px 34px; }
.pc-kicker { margin: 0 0 var(--s-2); font-size: var(--t-sm); font-weight: 600; color: var(--c); }
.pc-title { margin: 0 0 18px; font-size: var(--t-3xl); }
.pc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pc-builder { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-height: 44px; }
.pc-builder:hover .pc-builder-name { color: var(--accent); }
.pc-builder-text { display: flex; flex-direction: column; }
.pc-builder-name { font-size: var(--t-md); }
.pc-builder-text span { font-size: var(--t-xs); color: var(--muted); }
.pc-badge { padding: 4px 10px; border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong); }
.pc-badge.is-shipped { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pc-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pc-tags-label { margin-left: 6px; font-size: var(--t-xs); color: var(--faint); }
.pc-tag { padding: 3px 10px; border-radius: var(--r-sm); font-size: var(--t-sm); font-weight: 600; color: var(--text); border: 1px solid var(--line-strong); }
.pc-tag.is-skill { color: var(--c); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.pc-desc { margin: 0 0 26px; font-size: var(--t-md); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pc-actions .btn { min-height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.pc-loading { margin: 0; padding: 90px 24px; color: var(--muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }
.leaf-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--c, var(--persimmon)); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-xs { width: 44px; height: 44px; font-size: var(--t-md); flex: none; }

@media (max-width: 719px) {
  .project-scrim { padding: 16px 12px; padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
  .pc-title { font-size: var(--t-2xl); }
  .pc-body { padding: 22px 20px 24px; }
  .pc-more { padding: 10px 20px 0; }
  .pc-actions .btn { flex: 1 1 100%; }
}

/* Editor: the builder's leaf on the home page tree */
.leaf-note { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-lg); font-size: var(--t-md); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.leaf-note[data-state="on"] { color: var(--accent); border-color: transparent; background: var(--accent-soft); }
.leaf-note[data-state="hidden"] { color: var(--danger-red); border-color: transparent; background: var(--danger-soft); }
.tree-pick { gap: 6px; }
.tree-pick-row { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.field .tree-pick-row input { appearance: auto; -webkit-appearance: radio; flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; accent-color: var(--accent); }
/* Paid trial fields on the profile offer form */
.money {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r);
}
.money:focus-within { border-color: var(--accent); }
.money:has(.invalid) { border-color: var(--danger); }
.money-sign { padding-left: 14px; color: var(--muted); font-size: var(--t-md); }
.field .money input { border: 0; background: transparent; padding-left: 4px; }
.field .money input:focus-visible { outline: none; }
.contact .form-intro { margin: -6px 0 18px; color: var(--muted); font-size: var(--t-md); max-width: 60ch; }
.field > .err:empty, .field > .hint:empty { display: none; }
@media (max-width: 640px) {
  .actions .btn { flex: 1 1 100%; }
}

/* Offers inbox (/me/offers) */
.offers-status { margin-top: 20px; }
.offer-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.offer { gap: 8px; }
.offer p { margin: 0; overflow-wrap: anywhere; }
.offer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.offer-kind { flex: none; white-space: nowrap; font-size: var(--t-xs); font-weight: 600; color: var(--faint); }
.offer-state { font-size: var(--t-sm); font-weight: 600; color: var(--muted); text-align: right; }
.offer-state[data-status="sent"], .offer-state[data-status="passed"] { color: var(--accent); }
.offer-state[data-status="declined"], .offer-state[data-status="not_passed"], .offer-state[data-status="expired"] { color: var(--faint); }
.offer-who { font-size: var(--t-lg); font-weight: 600; }
.offer-from { font-size: var(--t-sm); color: var(--muted); }
.offer-from a { color: var(--text); }
.offer-money { font-weight: 600; }
.offer-learning, .offer-deadline { font-size: var(--t-md); color: var(--muted); }
.offer-task { white-space: pre-wrap; color: var(--text); font-size: var(--t-md); padding-top: 4px; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.offer .form-status:empty { display: none; }

/* Company page for a paid trial (/offer/<token>) */
.offer-page h1 { margin: 0; font-size: var(--t-3xl); overflow-wrap: anywhere; }
.offer-page h2 { margin: 32px 0 8px; font-size: var(--t-lg); }
.offer-page .eyebrow a { color: inherit; }
.offer-page-lead { margin: 14px 0 0; font-size: var(--t-md); color: var(--text); max-width: 60ch; }
.offer-page-lead[data-status="passed"] { color: var(--accent); }
.offer-page-lead a { color: var(--accent); }
.offer-answer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.offer-page .hint { display: block; margin: 12px 0 0; font-size: var(--t-sm); color: var(--faint); max-width: 60ch; }
.offer-page .form-status:empty { display: none; }
.offer-facts { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.offer-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.offer-facts dt { font-size: var(--t-xs); color: var(--muted); }
.offer-facts dd { margin: 4px 0 0; font-size: var(--t-lg); font-weight: 600; overflow-wrap: anywhere; }
.offer-page-task { margin: 0; white-space: pre-wrap; color: var(--muted); max-width: 60ch; overflow-wrap: anywhere; }

/* Passed paid trials on the profile */
.trials { margin-top: 56px; }
.trials .work-head h2 { margin: 0; font-size: var(--t-lg); }
.trial-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.trial-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px;
}
.trial-list strong { font-weight: 600; overflow-wrap: anywhere; }
.trial-month { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; }

/* Reviews on the profile: the trust line under the hook, and the list under the work.
   Plain cards, no side stripes. Stars use the profile's accent. */
.look-trust { margin: 0; }
.look-trust a {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px;
  color: var(--text); font-weight: 600; font-size: var(--t-md); text-decoration: none;
}
.look-trust a:hover { color: var(--accent); }
.look-trust a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.trust-star { color: var(--accent); flex: none; }
.reviews { margin-top: 56px; }
.reviews .work-head h2 { margin: 0; font-size: var(--t-lg); }
.look .reviews .work-head h2 { font-family: var(--display); }
.review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.review {
  display: flex; flex-direction: column; gap: var(--s-2); max-width: 70ch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--look-radius, var(--r-lg)); padding: var(--s-4) var(--s-5);
}
.review p { margin: 0; overflow-wrap: anywhere; }
.review-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.review-stars { color: var(--accent); font-size: var(--t-lg); letter-spacing: 0.12em; line-height: 1; }
.review-stars-off { color: var(--line-strong); }
.review-when { color: var(--faint); font-size: var(--t-sm); white-space: nowrap; }
.review-note { font-size: var(--t-md); color: var(--text); }
.review-who { color: var(--muted); font-size: var(--t-sm); font-weight: 600; display: flex; flex-wrap: wrap; gap: 0 var(--s-2); }
.review-who a { color: var(--text); }
.review-for { font-weight: 400; color: var(--faint); }
.review-reply { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s-3) var(--s-4); }
.review-reply p { margin: 0; overflow-wrap: anywhere; }
.review-reply-who { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.review-report {
  align-self: flex-start; min-height: 44px; margin: calc(var(--s-3) * -1) 0 calc(var(--s-3) * -1) calc(var(--s-2) * -1); padding: 0 var(--s-2);
  font: inherit; font-size: var(--t-xs); color: var(--faint); background: none; border: 0; cursor: pointer;
}
.review-report:hover { color: var(--muted); }
.review-report.is-confirm { color: var(--danger); }
.review-report:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--r-sm); }
.review-gone { color: var(--muted); font-size: var(--t-sm); }

/* Reviews in Requests: "Did they finish it?", the review form and the builder's reply */
.req-note { color: var(--muted); font-size: var(--t-sm); }
.req-ask { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.req-ask-q { font-family: var(--display); font-size: var(--t-lg); color: var(--text); }
.req-review { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.req-review-title { font-weight: 600; color: var(--text); }
.req-review > .btn { align-self: flex-start; }
.req-review-note { color: var(--text); }
.req-review .form-status:empty, .req-reply-form .form-status:empty { display: none; }
.req-reply-form { display: flex; flex-direction: column; gap: var(--s-2); }
.req-review .field textarea, .req-reply-form .field textarea { resize: vertical; }
.star-pick { margin: 0; padding: 0; border: 0; min-width: 0; }
.star-pick legend { padding: 0; margin-bottom: var(--s-1); }
.star-row { display: flex; gap: var(--s-1); }
.star { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border-radius: var(--r); }
.star input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.star-glyph { font-size: var(--t-xl); line-height: 1; color: var(--line-strong); transition: color 150ms; }
.star.is-on .star-glyph { color: var(--accent); }
.star:hover .star-glyph { color: var(--persimmon-bright); }
.star:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .star-glyph { transition: none; } }
@media (max-width: 719px) {
  .reviews { margin-top: var(--s-7); }
  .review { padding: var(--s-4); }
}

/* ---------- Profiles: the builder's look, inside shippedby's frame ----------
   .look carries the builder's theme as custom properties (set per page from _lib/looks.js).
   .frame, .frame-bar and .frame-foot put shippedby's own tokens back, so the name, the offer
   buttons and the live marks look and sit the same on every profile. */
.look {
  min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font);
}
.frame, .frame-bar, .frame-foot, .bt {
  --bg: var(--night); --surface: var(--navy-900); --surface-2: var(--navy-800); --line: var(--navy-700); --line-strong: var(--navy-600);
  --text: var(--moon); --muted: var(--moon-dim); --faint: var(--moon-faint);
  --accent: var(--persimmon); --accent-ink: var(--persimmon-ink); --accent-soft: var(--persimmon-soft);
  --display: var(--bt-display); --font: var(--bt-font);
  color: var(--text); font-family: var(--font);
}
.frame-bar { background: var(--night); border-bottom: 1px solid var(--navy-700); }
.frame-bar-in {
  max-width: var(--page); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 14px 20px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
}
.frame-foot { margin-top: var(--s-8); padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); background: var(--night); border-top: 1px solid var(--navy-700); }
.frame-foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.frame-foot a:hover { color: var(--accent); }

.look-header {
  position: relative; height: 240px; overflow: hidden;
  background: var(--surface) var(--pattern) repeat; border-bottom: 1px solid var(--line);
}
.look-header.is-image, .look-header.is-video { background: var(--surface); }
.look-banner { display: block; width: 100%; height: 100%; object-fit: cover; }

.profile-body { padding-top: 0; }
.frame {
  position: relative; z-index: 1; margin-top: -72px;
  background: var(--navy-900); border: 1px solid var(--navy-700); border-radius: var(--r-lg); padding: var(--s-5);
}

.look h2, .look h3 { font-family: var(--display); }
.look .frame h1, .look .frame h2 { font-family: var(--bt-display); }
.look-about { margin-top: var(--s-6); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); max-width: 68ch; }
.look-about:empty { display: none; }
.look-status { margin: 0; display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; color: var(--accent); }
.look-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.look .bio { margin: 0; font-size: var(--t-lg); color: var(--text); }
.look .bio a { color: var(--accent); text-underline-offset: 3px; }
.look .tags { margin: 0; }
.look .tag { border-radius: min(var(--look-radius), 999px); }
.look-song-btn {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 16px; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--look-radius);
}
.look-song-btn:hover { border-color: var(--accent); }
.look-song-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.look-song-btn .song-pause, .look-song-btn[aria-pressed="true"] .song-play { display: none; }
.look-song-btn[aria-pressed="true"] .song-pause { display: block; }

.look .work-head h2 { font-size: calc(var(--t-xl) * var(--heading-scale, 1)); line-height: 1.3; }
.look .card { border-radius: var(--look-radius); }
.look .card h3 { font-size: calc(var(--t-lg) * var(--heading-scale, 1)); line-height: 1.3; }
.look .card-pic, .look .card-pic.is-empty { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); border-color: var(--line); }
.look .card-letter { font-family: var(--display); color: color-mix(in srgb, var(--muted) 45%, var(--bg)); }
.look .trials .work-head h2 { font-family: var(--display); }

/* Live marks: shippedby's own chip on every theme, so "live" always means the same thing. */
.look .card-link.is-live, .look .legend-live {
  padding: 2px 8px; border-radius: var(--r-sm); font-family: var(--bt-font); font-weight: 600;
  color: var(--leaf); background: var(--navy-900); border: 1px solid var(--navy-600);
}
.look a.card-link.is-live:hover { color: var(--moon); }

/* Layouts */
.layout-featured .grid, .layout-gallery .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); grid-auto-rows: auto; }
.layout-featured .grid > .card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: var(--s-5); align-content: start; }
.layout-featured .grid > .card:first-child > * { grid-column: 2; }
.layout-featured .grid > .card:first-child > .card-pic { grid-column: 1; grid-row: 1 / span 6; margin: -22px 0 -22px -22px; border-bottom: 0; border-right: 1px solid var(--line); }
.layout-featured .grid > .card:first-child h3 { font-size: calc(var(--t-2xl) * var(--heading-scale, 1)); }
.layout-gallery .grid { gap: var(--s-3); }
.layout-gallery .card { padding: 0 0 12px; gap: var(--s-1); }
.layout-gallery .card-pic { margin: 0; aspect-ratio: 4 / 3; border-bottom: 0; }
.layout-gallery .card > :not(.card-pic) { padding-inline: 14px; }
.layout-gallery .card-head { padding-top: var(--s-2); }
.layout-gallery .card .line, .layout-gallery .card-tools { display: none; }
.layout-gallery .card-foot { padding-top: var(--s-1); }
.layout-timeline .grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: var(--s-5); position: relative; padding-left: 32px; }
.layout-timeline .grid::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.layout-timeline .card { position: relative; overflow: visible; display: grid; grid-template-columns: 280px minmax(0, 1fr); column-gap: var(--s-5); align-content: start; padding: var(--s-4); }
.layout-timeline .card::before { content: ""; position: absolute; left: -29px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.layout-timeline .card > * { grid-column: 2; }
.layout-timeline .card > .card-pic { grid-column: 1; grid-row: 1 / span 6; margin: 0; border: 1px solid var(--line); border-radius: calc(var(--look-radius) - 2px); overflow: hidden; align-self: start; }

@media (max-width: 719px) {
  .look-header { height: 150px; }
  .frame { margin-top: -48px; padding: var(--s-4); }
  .look .bio { font-size: var(--t-md); }
  .layout-featured .grid > .card:first-child { display: flex; }
  .layout-featured .grid > .card:first-child > .card-pic { margin: -22px -22px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .layout-timeline .grid { padding-left: 24px; }
  .layout-timeline .grid::before { left: 5px; }
  .layout-timeline .card { display: flex; }
  .layout-timeline .card::before { left: -25px; }
  .layout-timeline .card > .card-pic { margin: 0 0 10px; }
}

/* ---------- The look studio on /me ---------- */
.page-editor.is-wide { max-width: var(--page); }
.editor-tabs { display: flex; gap: var(--s-1); margin: 0 0 var(--s-5); border-bottom: 1px solid var(--line); }
.editor-tab {
  font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 var(--s-3); margin-bottom: -1px; border-bottom: 2px solid transparent;
}
.editor-tab:hover { color: var(--text); }
.editor-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.editor-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bio-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.bio-tools { display: inline-flex; gap: var(--s-1); }
.bio-tool {
  min-width: 36px; min-height: 32px; padding: 0 8px; font: inherit; font-size: var(--t-sm); color: var(--text); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.bio-tool:hover { border-color: var(--muted); }

.look-studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s-6); align-items: start; }
.studio-controls { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.studio-note { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.studio-preview { position: sticky; top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.preview-label { color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.preview-frame { position: relative; height: calc(100vh - 120px); min-height: 480px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); }
.preview-frame iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: var(--bg); }

.choice-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice {
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--muted); cursor: pointer;
  min-height: 40px; padding: 0 var(--s-3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
.choice:hover { color: var(--text); }
.choice[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.choice:focus-visible, .theme-card:focus-visible, .swatch:focus-visible, .layout-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--s-2); }
.choice-wide { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px; padding: var(--s-2) var(--s-3); text-align: left; }
.choice-wide strong { color: var(--text); }
.choice-wide span { font-weight: 400; font-size: var(--t-xs); }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s-2); }
.theme-card {
  display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-2); cursor: pointer; text-align: left;
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
.theme-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-swatch { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: 54px; border-radius: var(--r-sm); overflow: hidden; background: var(--tb); border: 1px solid var(--line); }
.theme-swatch span:nth-child(1) { grid-row: 1 / -1; margin: 8px; border-radius: 3px; background: var(--ts); box-shadow: inset 0 -10px 0 var(--tt); opacity: 0.95; }
.theme-swatch span:nth-child(2) { margin: 8px 8px 2px 0; border-radius: 3px; background: var(--ta); }
.theme-swatch span:nth-child(3) { margin: 2px 8px 8px 0; border-radius: 3px; background: var(--tt); opacity: 0.6; }

.swatches { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.swatch { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; background: var(--sw); border: 2px solid var(--line-strong); }
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.accent-row { display: flex; gap: var(--s-2); align-items: center; }
.field .accent-row input[type="color"] { width: 48px; height: 44px; padding: 2px; flex: none; cursor: pointer; }
.field .accent-row input:not([type="color"]) { max-width: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.layout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.layout-card {
  display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-2); cursor: pointer;
  font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r);
}
.layout-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.layout-mini { display: grid; gap: 3px; height: 48px; grid-template-columns: repeat(2, 1fr); }
.layout-mini i { background: var(--line-strong); border-radius: 2px; }
.layout-gallery-mini .layout-mini { grid-template-columns: repeat(3, 1fr); }
.layout-featured-mini .layout-mini { grid-template-columns: repeat(3, 1fr); }
.layout-featured-mini .layout-mini i:first-child { grid-column: 1 / -1; }
.layout-timeline-mini .layout-mini { grid-template-columns: 1fr; padding-left: 8px; border-left: 2px solid var(--line-strong); }

.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.top-item { display: flex; align-items: center; gap: var(--s-2); padding: 4px var(--s-2); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.top-item.is-on { border-color: var(--line-strong); }
.top-item.is-dragging { opacity: 0.6; border-color: var(--accent); }
.top-handle { display: grid; place-items: center; width: 32px; height: 40px; flex: none; color: var(--faint); cursor: grab; touch-action: none; }
.top-pick { display: flex; align-items: center; gap: var(--s-2); flex: 1; min-width: 0; min-height: 40px; cursor: pointer; }
.top-pick input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.top-pick span { overflow-wrap: anywhere; }
.top-move { display: flex; gap: 4px; }
.top-move .icon-btn { width: 36px; height: 36px; }
.optional { font-family: var(--bt-font); font-style: normal; font-size: var(--t-sm); color: var(--faint); }
.studio-bar { justify-content: flex-end; }

.publish-scrim { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--s-4); background: var(--scrim); }
.publish-card {
  width: min(1200px, 100%); height: min(92vh, 1000px); display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-4); background: var(--navy-900); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.publish-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.publish-head h2 { margin: 0; font-size: var(--t-xl); }
.publish-head .panel-sub { margin: var(--s-1) 0 0; }
.publish-actions { display: flex; gap: var(--s-2); }
.publish-frame { flex: 1; min-height: 0; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.publish-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.publish-card .form-status:empty { display: none; }

@media (max-width: 960px) {
  .look-studio { grid-template-columns: 1fr; }
  /* On narrow screens the preview rides along at the top while the controls scroll under it. */
  .studio-preview { order: -1; top: 0; z-index: 3; padding: var(--s-2) 0; background: var(--bg); }
  .preview-frame { height: 40vh; min-height: 260px; }
}
@media (max-width: 640px) {
  .layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publish-actions { width: 100%; }
  .publish-actions .btn { flex: 1; }
}

/* A hint of a builder's own accent (directory cards, the skill tree's project card). */
.avatar[style*="--hint"] { color: var(--hint); border-color: var(--hint); }

/* ---------- The top of a profile: frame with Work with me, hook line, tags, best work ---------- */
.frame { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-4) var(--s-5); }
.frame .profile { grid-template-columns: auto minmax(0, 1fr); }
.frame-cta { min-width: 168px; }

.look-top { margin-top: var(--s-7); display: flex; flex-direction: column; gap: var(--s-4); }
.look-top:empty { display: none; }
.look-hook {
  margin: 0; max-width: 22ch; font-family: var(--display); color: var(--text);
  font-size: calc(var(--t-4xl) * var(--heading-scale, 1)); line-height: 1.08; overflow-wrap: anywhere;
}
.look-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.look .look-tag { display: inline-block; text-decoration: none; color: var(--text); font-weight: 600; background: var(--surface); border-color: var(--line-strong); }
.look .look-tag:hover { border-color: var(--accent); color: var(--accent); }

.best { margin: var(--s-4) 0 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.best-frame {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--look-radius, var(--r-lg));
  background: color-mix(in srgb, var(--accent) 6%, var(--bg)); border: 1px solid var(--line);
}
.best-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.best-media.is-empty, .best-model { display: grid; place-items: center; }
.best-media .card-letter { font-size: calc(var(--t-mark) * 1.6); }
.best-model img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.best-model model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.best-hint {
  position: absolute; left: 50%; bottom: var(--s-3); transform: translateX(-50%); pointer-events: none;
  padding: 4px 10px; border-radius: var(--r); font-size: var(--t-xs); font-weight: 600; color: var(--moon); background: rgba(16, 13, 11, 0.72);
}
.best-play {
  position: absolute; left: var(--s-4); bottom: var(--s-4); display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 48px; padding: 0 18px; cursor: pointer; font: inherit; font-weight: 700;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: var(--look-radius, var(--r));
}
.best-play:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.best-play .song-pause, .best-play[aria-pressed="true"] .song-play { display: none; }
.best-play[aria-pressed="true"] .song-pause { display: block; }
.best-caption { display: flex; flex-direction: column; gap: var(--s-2); padding-top: var(--s-1); }
.best-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.best-title h2 { margin: 0; font-size: calc(var(--t-2xl) * var(--heading-scale, 1)); line-height: 1.2; overflow-wrap: anywhere; }
.best-line { margin: 0; color: var(--muted); font-size: var(--t-lg); }
.best-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.best-foot .card-tools { margin: 0; }
.look .work[hidden] { display: none; }

/* Work with me: shippedby's own dialog on every profile. */
.work-scrim {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); background: var(--scrim);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.work-card {
  width: min(620px, 100%); margin: auto; padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4);
  background: var(--navy-900); border: 1px solid var(--navy-600); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.work-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.work-card-head h2 { margin: 0; font-size: var(--t-xl); }
.work-card .project-close { position: static; flex: none; }
.work-lead { margin: 0; color: var(--text); font-size: var(--t-md); }
.work-lead a { color: var(--accent); }
.work-state[data-state="signed-out"], .work-state[data-state="sent"] { display: flex; flex-direction: column; gap: var(--s-4); align-items: flex-start; }
.work-state[hidden] { display: none !important; }
.work-kinds { margin: 0 0 var(--s-2); padding: 0; border: 0; min-width: 0; }
.work-kinds legend { margin-bottom: var(--s-2); padding: 0; }
.work-kinds .type-toggle { margin: 0; display: flex; flex-wrap: wrap; }
.work-card .kind-note { margin: 0 0 var(--s-4); color: var(--muted); font-size: var(--t-sm); }
.work-privacy { margin: var(--s-4) 0 0; color: var(--faint); font-size: var(--t-sm); }

/* Requests inbox (/me#requests and /me/requests) */
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; font-size: var(--t-xs); color: var(--persimmon-ink); background: var(--accent); }
.requests { display: flex; flex-direction: column; gap: var(--s-6); }
.req-section h2 { margin: 0 0 var(--s-2); font-size: var(--t-xl); }
.req-section > .panel-sub { margin: 0 0 var(--s-4); }
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.req { gap: var(--s-2); }
.req[data-status="sent"] { border-color: var(--line-strong); }
.req p { margin: 0; overflow-wrap: anywhere; }
.req-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.req-kind { font-size: var(--t-sm); font-weight: 700; color: var(--muted); }
.req-state { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.req-state[data-status="sent"], .req-state[data-status="accepted"], .req-state[data-status="passed"] { color: var(--accent); }
.req-who { font-family: var(--display); font-size: var(--t-lg); }
.req-who a { color: var(--text); }
.req-sub { color: var(--faint); font-size: var(--t-sm); }
.req-need { white-space: pre-wrap; font-size: var(--t-md); }
.req-facts { margin: var(--s-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.req-facts dt { font-size: var(--t-xs); color: var(--faint); }
.req-facts dd { margin: 0; font-weight: 600; }
.req-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.req-room { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.req-room-note { color: var(--muted); font-size: var(--t-sm); }
.req .form-status:empty { display: none; }
.req-empty { margin: 0; color: var(--muted); }

/* The hook line in the editor */
.hook-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.hook-word { font-family: var(--display); font-size: var(--t-lg); }
.hook-what { flex: 2 1 200px; }
.hook-who { flex: 1.5 1 160px; }
.hook-preview { margin: 0; font-family: var(--display); font-size: var(--t-xl); color: var(--text); }
.hook-preview:empty { display: none; }
.hook-nudge { margin: 0; }
.count.is-over { color: var(--danger); }

@media (max-width: 719px) {
  .frame { grid-template-columns: 1fr; }
  .frame-cta { width: 100%; }
  .look-top { margin-top: var(--s-6); }
  .look-hook { font-size: calc(var(--t-2xl) * var(--heading-scale, 1)); }
  .best { grid-template-columns: 1fr; gap: var(--s-3); }
  .best-line { font-size: var(--t-md); }
  .best-title h2 { font-size: calc(var(--t-xl) * var(--heading-scale, 1)); }
  .work-card { padding: var(--s-4); }
}
.best-links { display: inline-flex; align-items: center; gap: var(--s-3); }

/* Built with: the typed "Other" tool and the switch to hide the tags. */
.tool-other { max-width: 280px; }
.tools-shown { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 600; color: var(--text); cursor: pointer; }
.field .tools-shown input { appearance: auto; -webkit-appearance: checkbox; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }

/* "Edit my page" for the owner: in the top bar, and floating on phones. */
.bar-edit { min-height: 40px; }
.edit-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30;
  display: none; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 18px;
  font-family: var(--bt-font); font-weight: 700; text-decoration: none;
  color: var(--persimmon-ink); background: var(--persimmon); border-radius: var(--r); box-shadow: var(--shadow-pop);
}
.edit-fab:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
@media (max-width: 719px) {
  .edit-fab:not([hidden]) { display: inline-flex; }
}

/* Onboarding for new builders (/onboard.js): one short screen at a time, inside /me. */
.onboard { display: grid; justify-items: center; padding-top: var(--s-5); padding-bottom: var(--s-7); }
.ob-card {
  width: 100%; max-width: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-6) var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-5);
}
.ob-progress { display: flex; flex-direction: column; gap: var(--s-2); }
.ob-progress-text { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.ob-track { display: block; height: 4px; background: var(--navy-700); border-radius: var(--r-sm); overflow: hidden; }
.ob-fill { display: block; height: 100%; width: 0; background: var(--persimmon); transition: width 150ms ease; }
.ob-step { display: flex; flex-direction: column; gap: var(--s-4); }
.ob-step h1 { margin: 0; font-size: var(--t-2xl); }
.ob-step h1:focus { outline: none; }
.ob-sub { margin: calc(-1 * var(--s-2)) 0 0; color: var(--muted); max-width: 62ch; }
.ob-check { font-size: var(--t-sm); color: var(--faint); min-height: 1.55em; overflow-wrap: anywhere; }
.ob-check.is-ok { color: var(--persimmon); }
.ob-check.is-bad { color: var(--danger-red); }
.ob-locked { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.ob-examples { display: flex; flex-direction: column; gap: var(--s-2); }
.ob-examples .chip { min-height: 44px; text-align: left; }
.ob-step .hook-what input, .ob-step .hook-who input { width: 100%; }
.ob-step .field select { width: 100%; }

/* The project picture: 16:9, the same shape as on their page. */
.ob-image { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.ob-image-box {
  width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.ob-image-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-image-empty { color: var(--faint); font-size: var(--t-sm); }
.ob-image > .err:empty { display: none; }
.ob-step .err:empty { display: none; }

/* A switch: the one place a pill is the honest shape (DESIGN.md, Shape). */
.ob-switch { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; font-weight: 600; color: var(--text); }
.ob-switch input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 48px; height: 28px; border-radius: 14px; position: relative;
  background: var(--navy-800); border: 1px solid var(--navy-600); transition: background-color 150ms ease, border-color 150ms ease;
}
.ob-switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--moon-dim); transition: transform 150ms ease, background-color 150ms ease;
}
.ob-switch input:checked { background: var(--persimmon); border-color: var(--persimmon); }
.ob-switch input:checked::after { transform: translateX(20px); background: var(--persimmon-ink); }
.ob-switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Back on the left, Skip and Next on the right. */
.ob-nav { display: flex; align-items: center; gap: var(--s-4); padding-top: var(--s-2); border-top: 1px solid var(--line); }
.ob-nav .btn { min-height: 46px; }
.ob-skip { margin-left: auto; min-height: 44px; color: var(--muted); }
.ob-card > .form-status:empty { display: none; }

/* Done: their share image as the preview, then the three actions. */
.ob-preview { display: block; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--navy-800); aspect-ratio: 1200 / 630; }
.ob-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ob-link { margin: 0; font-weight: 600; color: var(--persimmon); overflow-wrap: anywhere; }
.ob-done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.ob-done-actions .btn-primary { grid-column: 1 / -1; }
.ob-done-actions .btn { min-height: 46px; }

@media (max-width: 640px) {
  .onboard { padding-top: 0; }
  .ob-card { padding: var(--s-5) var(--s-4) var(--s-4); }
  .ob-nav { position: sticky; bottom: 0; background: var(--surface); padding-bottom: max(var(--s-2), env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .ob-fill, .ob-switch input, .ob-switch input::after { transition: none; }
}
.ob-hide-tools { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 600; color: var(--text); cursor: pointer; }
.ob-hide-tools input { appearance: auto; -webkit-appearance: checkbox; width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }

/* Plain-words search: the homepage box's examples and /find */
.hero-examples { gap: var(--s-2); }

.find-chip {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
  white-space: normal; text-align: left; line-height: 1.3; padding: var(--s-2) 14px;
}
.find-chip:hover { color: var(--text); border-color: var(--line-strong); }
.find-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.find-head { margin-top: var(--s-6); }
.find-head h1 { margin: 0; font-size: var(--t-3xl); }
.find-head .hero-sub { margin-top: var(--s-2); max-width: 56ch; }
.find-form { display: flex; gap: var(--s-2); margin-top: var(--s-5); max-width: 640px; }
.find-form input {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: var(--r);
  background: var(--navy-900); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: var(--t-md);
}
.find-form input::placeholder { color: var(--faint); }
.find-form input:focus { outline: none; border-color: var(--accent); }
.find-examples { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3); margin-top: var(--s-3); }
.find-examples-label { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.find-status { margin: var(--s-6) 0 var(--s-3); color: var(--faint); font-size: var(--t-sm); min-height: 1.55em; }
.find-results { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.find-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.find-card:hover { border-color: var(--line-strong); }
.find-pic { text-decoration: none; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--navy-800); border-bottom: 1px solid var(--line); overflow: hidden; }
.find-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.find-pic .card-letter { font-family: var(--display); font-size: var(--t-4xl); color: var(--navy-500); }
.find-body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-5); flex: 1; }
.find-body p { margin: 0; overflow-wrap: anywhere; }
.find-name { margin: 0; font-size: var(--t-lg); }
.find-name a { color: var(--text); text-decoration: none; }
.find-name a:hover { color: var(--accent); }
.find-hook { color: var(--text); font-size: var(--t-md); }
.find-trust { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--text); }
.find-trust svg { color: var(--accent); }
.find-project { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); font-weight: 600; }
.find-project-name { min-width: 0; overflow-wrap: anywhere; }
.find-why { color: var(--muted); font-size: var(--t-sm); }
.find-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.find-actions .btn { min-height: 44px; }
.find-more-wrap { display: flex; justify-content: center; margin-top: var(--s-5); }
.find-empty { margin-top: var(--s-2); display: flex; flex-direction: column; gap: var(--s-3); }
.find-empty-line { margin: 0; font-size: var(--t-lg); color: var(--text); }
@media (max-width: 719px) {
  .find-head h1 { font-size: var(--t-2xl); }
  .find-results { grid-template-columns: 1fr; }
  .find-body { padding: var(--s-4); }
}

/* ---------- Home: the tree is the first screen ----------
   The painting (brand/tree-hero.png, baked to /hero by scripts/hero/bake.py) sits at the bottom
   of the hero; the midnight sky goes on above it, as far as the words and the search need, so
   nothing covers the canopy. /tree.js (src/tree) brings it to life: the canopy in the wind,
   fireflies, stars, falling leaves and the fruit, each fruit a button laid over the painting.
   --tw is the painting's width: the whole screen, or less on a short wide screen, so the whole
   crown still fits under the words. */
.home { background: var(--night); }
.home-hero {
  --tw: min(100vw, max(760px, calc((100vh - 340px) * 2.716)));
  --tw: min(100vw, max(760px, calc((100svh - 340px) * 2.716)));
  /* Above what follows, so a fruit's card (a sheet at the bottom on a phone) covers the page. */
  position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  background-color: var(--sky);
  /* A few faint stars in the sky above the painting. */
  background-image:
    radial-gradient(circle at 8% 9%, rgb(243 235 221 / 0.7) 0 1px, transparent 1.6px),
    radial-gradient(circle at 23% 21%, rgb(243 235 221 / 0.5) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 41% 6%, rgb(243 235 221 / 0.6) 0 1px, transparent 1.6px),
    radial-gradient(circle at 63% 15%, rgb(243 235 221 / 0.45) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 78% 5%, rgb(243 235 221 / 0.7) 0 1px, transparent 1.6px),
    radial-gradient(circle at 91% 19%, rgb(243 235 221 / 0.5) 0 0.8px, transparent 1.4px),
    radial-gradient(circle at 55% 27%, rgb(243 235 221 / 0.4) 0 0.8px, transparent 1.4px);
}
/* The hero melts into the page below, no hard edge. */
.home-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; z-index: 4; pointer-events: none; background: linear-gradient(var(--night-clear), var(--night)); }
/* The part of the painting from the top of the crown down (the sky above it slides up behind
   the words); a little of the hill is cropped off the bottom. */
.tree-wrap { position: relative; z-index: 1; flex: none; margin-top: auto; height: calc(var(--tw) * 0.3682 + 12px); }
.tree-stage {
  --fade: min(120px, max(0px, calc((100vw - var(--tw)) / 2)));
  position: absolute; left: 50%; bottom: calc(var(--tw) * -0.0394); width: var(--tw); aspect-ratio: 1672 / 940; transform: translateX(-50%);
  /* Narrower than the screen: its sides melt into the sky. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.tree-img, .tree-canvas, .tree-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tree-canvas { opacity: 0; transition: opacity 0.8s ease; }
.tree-stage.is-live .tree-canvas { opacity: 1; }
/* The painting's top edge meets the sky above it with no seam. */
.tree-stage::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8%; z-index: 2; pointer-events: none; background: linear-gradient(var(--sky), rgb(10 21 36 / 0)); }
.tree-fx { z-index: 2; pointer-events: none; }
.tree-overlay { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.home-topbar { position: relative; z-index: 6; width: 100%; max-width: var(--page-wide); margin: 0 auto; padding: var(--s-5) var(--s-6) 0; }
.hero-copy {
  position: relative; z-index: 3; max-width: 1100px; margin: 0 auto; padding: clamp(8px, 3.5vh, 40px) var(--s-5) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-copy h1 { margin: 0; font-size: var(--t-4xl); line-height: 1.08; text-wrap: balance; text-shadow: 0 1px 3px rgb(10 21 36 / 0.8); }
.hero-copy .hero-sub { margin: var(--s-3) 0 0; font-size: var(--t-lg); color: var(--muted); max-width: 72ch; text-shadow: 0 1px 3px rgb(10 21 36 / 0.8); }
.hero-search { display: flex; gap: var(--s-2); width: min(100%, 580px); margin-top: var(--s-4); }
.hero-search input {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 var(--s-4); border-radius: var(--r);
  background: var(--navy-900); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: var(--t-md);
}
.hero-search input::placeholder { color: var(--faint); }
.hero-search input:focus { outline: none; border-color: var(--accent); }
.hero-search .btn { min-height: 52px; }
.hero-examples { justify-content: center; gap: var(--s-2); margin-top: var(--s-3); }
@media (hover: hover) and (pointer: fine) and (min-width: 720px) {
  .hero-examples .find-chip { min-height: 34px; padding: 0 var(--s-3); font-size: var(--t-xs); }
}
.hero-examples .find-chip { background: var(--night-veil); }

/* Fruit: drawn on the painting (the logo's persimmon on a thin stem); this is its button, as big
   as a finger. */
.fruit {
  position: absolute; left: 0; top: 0; width: var(--s, 44px); height: var(--s, 44px); padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; will-change: transform;
}
.fruit:focus-visible { outline: 2px solid var(--persimmon); outline-offset: 2px; }

/* A fruit's card: beside the fruit with a mouse, a sheet at the bottom on a phone. */
.fruit-card {
  position: absolute; left: 0; top: 0; z-index: 7; width: 300px; overflow: hidden;
  background: var(--navy-900); border: 1px solid var(--navy-600); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
  opacity: 0; transition: opacity 150ms;
}
.fruit-card[hidden] { display: none; }
.fruit-card.is-open { opacity: 1; }
.fruit-card-pic { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--navy-800); overflow: hidden; }
.fruit-card-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fruit-card-pic span { font-family: var(--display); font-size: var(--t-3xl); color: var(--navy-500); }
.fruit-card-body { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3) var(--s-4) var(--s-4); }
.fruit-card-body p { margin: 0; overflow-wrap: anywhere; }
.fruit-card-name { margin: 0; font-size: var(--t-lg); line-height: 1.2; }
.fruit-card-by { color: var(--muted); font-size: var(--t-sm); }
.fruit-card-by a { color: var(--text); font-weight: 600; text-decoration: none; }
.fruit-card-by a:hover { color: var(--accent); }
.fruit-card-hook { color: var(--text); font-size: var(--t-md); }
.fruit-card-trust { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--text); }
.fruit-card-trust svg { color: var(--accent); }
.fruit-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-2); }
.fruit-card-actions .btn { min-height: 44px; white-space: nowrap; }
.fruit-card-more { min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: var(--t-sm); color: var(--muted); cursor: pointer; }
.fruit-card-more:hover { color: var(--text); }
.fruit-card-close {
  position: absolute; top: var(--s-2); right: var(--s-2); width: 44px; height: 44px; display: none; place-items: center;
  border: 0; border-radius: 50%; background: var(--night-veil); color: var(--moon); cursor: pointer;
}
.fruit-card.is-sheet {
  position: fixed; left: var(--s-3); right: var(--s-3); top: auto; bottom: var(--s-3); bottom: max(var(--s-3), env(safe-area-inset-bottom));
  width: auto; max-width: 480px; margin: 0 auto; transform: none !important;
}
.fruit-card.is-sheet .fruit-card-close { display: grid; }
/* On a phone: a small picture beside the words, so the tree stays in view above it. */
.fruit-card.is-sheet { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 0 var(--s-3); padding: var(--s-3); }
.fruit-card.is-sheet[hidden] { display: none; }
.fruit-card.is-sheet .fruit-card-pic, .fruit-card.is-sheet .fruit-card-pic.is-empty { aspect-ratio: 1; height: auto; width: 96px; margin: 0; border-radius: var(--r); }
.fruit-card.is-sheet .fruit-card-body { padding: 0 var(--s-6) 0 0; }
.fruit-card.is-sheet .fruit-card-actions { grid-column: 1 / -1; margin-top: var(--s-3); flex-wrap: nowrap; }
.fruit-card.is-sheet .fruit-card-close { top: var(--s-1); right: var(--s-1); background: none; }
/* No picture: a small letter tile instead of an empty block. */
.fruit-card-pic.is-empty { aspect-ratio: auto; height: 56px; width: 56px; margin: var(--s-4) var(--s-4) 0; border-radius: var(--r); }
.fruit-card-pic.is-empty span { font-size: var(--t-xl); }

.fruit-card-skill { color: var(--persimmon); font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.02em; }

/* Under the tree: one chip per branch with its fruit count, then the ways in. */
.hero-below {
  position: relative; max-width: var(--page-wide); margin: 0 auto; padding: var(--s-4) var(--s-6) 0;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center;
}
.branch-chips { justify-content: center; }
.branch-chip { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; text-decoration: none; }
.chip-count { color: var(--persimmon); font-weight: 800; }
.branch-chip:hover .chip-count { color: var(--persimmon-bright); }
.hero-below .hero-actions { justify-content: center; margin-top: 0; }

/* ---------- Home: below the tree ---------- */
.page-home { max-width: var(--page-wide); padding-top: var(--s-8); padding-left: var(--s-6); padding-right: var(--s-6); }
.page-home .section:first-child { margin-top: 0; }
.showcase-head { max-width: 46rem; }
.showcase-head h2 { text-wrap: balance; }
.showcase-body { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s-8); }
.profile-preview { margin: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.pp-frame {
  display: block; overflow: hidden; text-decoration: none; color: var(--text);
  border: 1px solid var(--navy-600); border-radius: var(--r-lg); background: var(--navy-900); box-shadow: var(--shadow-pop);
  transition: border-color 150ms;
}
.pp-frame:hover { border-color: var(--persimmon); }
.pp-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pp-bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); background: var(--navy-800); }
.pp-dots { display: inline-flex; gap: 6px; }
.pp-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--navy-600); }
.pp-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-xs); color: var(--faint); padding: 3px 10px; border-radius: var(--r-sm); background: var(--night); }
.pp-shot { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; background: var(--navy-800); }
.pp-projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.pp-project { display: flex; flex-direction: column; gap: var(--s-2); }
.pp-thumb { aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line); background: var(--navy-800); }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-letter { font-family: var(--display); font-size: var(--t-2xl); color: var(--navy-500); }
.pp-text p { margin: 0; }
.pp-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-weight: 700; font-size: var(--t-sm); }
.pp-name .card-link, .pp-name .card-status { font-size: var(--t-xs); }
.pp-line { color: var(--muted); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-tools { color: var(--faint); font-size: var(--t-xs); margin-top: 2px !important; }
.pp-caption { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.pp-handle { color: var(--muted); }
.pp-go { margin-left: auto; }

.anatomy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: part; }
.anatomy li { counter-increment: part; position: relative; padding: var(--s-4) 0 var(--s-4) var(--s-7); border-top: 1px solid var(--line); }
.anatomy li:first-child { border-top: 0; padding-top: 0; }
.anatomy li::before {
  content: counter(part); position: absolute; left: 0; top: var(--s-4); width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--navy-600); font-size: var(--t-sm); font-weight: 700; color: var(--accent);
}
.anatomy li:first-child::before { top: 0; }
.anatomy h3 { margin: 0; font-family: var(--font); font-size: var(--t-md); font-weight: 700; display: flex; align-items: center; gap: var(--s-2); }
.anatomy p { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--t-md); }
.anatomy .card-link { padding: 0; font-size: var(--t-md); }

.steps h2 { margin: 0 0 var(--s-6); font-size: var(--t-3xl); }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.step-list li { padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.step-n { display: block; font-family: var(--display); font-size: var(--t-3xl); line-height: 1; color: var(--accent); }
.step-list h3 { margin: var(--s-4) 0 0; font-size: var(--t-xl); }
.step-list p { margin: var(--s-2) 0 0; color: var(--muted); font-size: var(--t-md); }
.closing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3) var(--s-5); }
.page-home .footer { margin-top: var(--s-8); }

@media (min-width: 1600px) {
  .hero-copy { max-width: 1040px; }
  .hero-copy h1 { font-size: var(--t-5xl); }
  .hero-copy .hero-sub { font-size: var(--t-xl); }
  .page-home { max-width: 1440px; }
  .showcase-head h2, .steps h2, .closing h2 { font-size: var(--t-4xl); }
  .section { margin-top: 128px; }
}
@media (max-width: 1023px) {
  .step-list { grid-template-columns: 1fr; }
  .showcase-body { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 719px) {
  /* A phone: the whole tree across the bottom (the crown edge to edge, a little of the painting's
     empty sides off screen), and the midnight sky above it as tall as the words need. */
  .home-hero { --tw: calc(100vw / 0.94); min-height: 0; }
  .home-topbar { padding: var(--s-3) var(--s-4) 0; }
  .hero-copy { padding: var(--s-6) var(--s-4) 0; }
  .hero-copy h1 { font-size: var(--t-2xl); }
  .hero-copy .hero-sub { font-size: var(--t-md); margin-top: var(--s-2); }
  .hero-search { margin-top: var(--s-4); }
  .hero-search input, .hero-search .btn { min-height: 48px; }
  .hero-examples .find-chip { padding: 0 var(--s-3); font-size: var(--t-sm); }
  .hero-below { padding: var(--s-3) var(--s-4) 0; gap: var(--s-3); }
  .branch-chips { gap: 6px; }
  .branch-chip { padding: 0 var(--s-3); }
  .page-home { padding-left: var(--s-4); padding-right: var(--s-4); padding-top: var(--s-6); }
  .pp-projects { grid-template-columns: 1fr; }
  .pp-project { flex-direction: row; align-items: flex-start; }
  .pp-thumb { flex: none; width: 112px; }
  .pp-go { margin-left: 0; flex-basis: 100%; }
  .anatomy li { padding-left: var(--s-6); }
}
@media (prefers-reduced-motion: reduce) {
  .tree-canvas { transition: none; }
}
