:root {
  --paper: #F3EEDF;
  --paper-2: #E8E0C8;
  --ink: #17140F;
  --ink-2: #55503F;
  --line: #D8CDA9;
  --accent: #A6822F;
  --accent-ink: #17140F;
  --card: #FAF6EA;
  --ok: #4E7A48;
  --warn: #A6791F;
  --bad: #9C3A2E;
  color-scheme: light;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #141414; --paper-2: #1C1C1A; --ink: #EDE6D3; --ink-2: #9C9484;
    --line: #3A3630; --accent: #C6A15B; --accent-ink: #141414; --card: #1A1917;
    --ok: #7FAA79; --warn: #D6A24A; --bad: #C4665A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141414; --paper-2: #1C1C1A; --ink: #EDE6D3; --ink-2: #9C9484;
  --line: #3A3630; --accent: #C6A15B; --accent-ink: #141414; --card: #1A1917;
  --ok: #7FAA79; --warn: #D6A24A; --bad: #C4665A;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

.stripe { height: 3px; background: var(--accent); }

/* ---------- Nav / breadcrumb ---------- */
header.site {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px clamp(18px, 4vw, 40px);
  max-width: 1080px;
  margin: 0 auto;
}
.navleft { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}
.brand em { color: var(--accent); font-style: normal; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
.crumbs::-webkit-scrollbar { display: none; }
.crumbs a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.crumbs a:hover { color: var(--accent); }
.crumbs .here { color: var(--ink); white-space: nowrap; }
.crumbs .sep { opacity: 0.5; }
.navright {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  flex-shrink: 0;
}
.navright a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  padding: 4px 2px;
}
.navright a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.navright a.nav-cta {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 100px;
  padding: 8px 18px;
  /* A solid gold fill with no edge reads fine against the paper
     background, but in dark mode it was blending into the page on
     mobile with no visible button outline. A thin border keyed to the
     fill's own text color gives it a crisp edge in both themes. */
  border: 1px solid var(--accent-ink);
}
.navright a.nav-cta:hover { opacity: 0.88; color: var(--accent-ink); }
/* #auth-slot holds a portaled login pill or account avatar (see
   AuthButton.tsx). It's given its own flex item so it never gets
   crushed against .nav-cta when both are present on narrow screens. */
.navright #auth-slot {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.account-avatar-btn:hover { border-color: var(--accent); }
.account-menu-item:hover { background: var(--paper-2); }
.subnav {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  padding: 0 clamp(18px, 4vw, 40px) 12px;
  max-width: 1080px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav button {
  background: none;
  border: none;
  padding: 4px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.subnav button:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 88px) 0 clamp(36px, 6vw, 56px); }
.hero.compact { padding: clamp(32px, 5vw, 52px) 0 clamp(28px, 4vw, 40px); }
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
h1.title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 6.4vw, 74px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  text-wrap: balance;
  max-width: 18ch;
}
h1.title.mid { font-size: clamp(32px, 5vw, 54px); }
h1.title i { font-style: italic; font-weight: 500; color: var(--accent); }
.thesis {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
  margin: 0 0 30px;
}
.thesis:last-child { margin-bottom: 0; }
.vin {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 22px;
  font-family: var(--mono);
}
.vin .vin-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11.5px;
  color: var(--ink-2);
}
.vin .vin-value {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
/* VINs are masked on the server for everyone; owners/admins get the eye button. */
.vin .vin-toggle {
  align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--line); border-radius: 100px;
  background: none; color: var(--ink-2); cursor: pointer;
}
.vin .vin-toggle:hover { border-color: var(--accent); color: var(--accent); }
.heroSpecs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-family: var(--mono);
  font-size: 13px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-2);
  background: var(--card);
}
.share-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 8px 18px 8px 8px;
  /* A tinted-gold fill, not the plain var(--card) the spec chips above it
     use, so Share doesn't read as just another chip in that row -- it's
     an action, not a label. */
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.share-link svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
}
.share-link:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 24%, var(--card)); transform: translateY(-1px); }
.share-link:hover svg { background: var(--accent); color: var(--accent-ink); }
.share-link.copied { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.share-link.copied svg { background: var(--ok); color: #fff; }
.builderhead .share-link { margin-top: 2px; align-self: flex-start; }
.hero-photo {
  margin-top: clamp(28px, 4vw, 44px);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero-photo img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* ---------- Sections ---------- */
main section { padding: clamp(48px, 7vw, 84px) 0; border-top: 1px solid var(--line); }
main section.tight { padding-top: 0; border-top: none; }
main section.section-compact { padding: clamp(28px, 4vw, 44px) 0; }
.kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 10px;
}
h2.h {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.08;
  margin: 0 0 18px;
  text-wrap: balance;
  max-width: 22ch;
}
h3.h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  margin: 0 0 4px;
}
p.lede { color: var(--ink-2); max-width: 66ch; font-size: 18px; margin: 0 0 8px; }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 14px; }

/* Feature cards (about: how it works) */
.featurerow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 22px;
}
.feature svg { color: var(--accent); margin-bottom: 12px; }
.feature h4 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 8px; }
.feature p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* Home: builder blocks */
.builderblock + .builderblock { margin-top: 44px; padding-top: 44px; border-top: 1px dashed var(--line); }
.builderblock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 4px;
}
.builderblock-head a.bname { text-decoration: none; }
.builderblock-head a.bname:hover h3.h3 { color: var(--accent); }
.builderblock-tag { font-size: 14.5px; color: var(--ink-2); margin: 0 0 22px; }
.viewprofile { font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.viewprofile:hover { text-decoration: underline; }

.thumbgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.buildthumb {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}
.buildthumb .thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-bottom: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-2);
}
.buildthumb .thumb svg { opacity: 0.5; }
.buildthumb .thumb .ph { font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; }
.buildthumb .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buildthumb .info { padding: 14px 16px 16px; }
.buildthumb .no { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--accent); display: block; margin-bottom: 4px; }
.buildthumb h4 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 6px; }
.buildthumb p { margin: 0; font-size: 14px; color: var(--ink-2); }
.buildthumb.pending { color: var(--ink-2); }
.buildthumb.pending .thumb { border-style: dashed; }

.more-builders {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px dashed var(--line);
  font-size: 14.5px;
  color: var(--ink-2);
  font-style: italic;
}

/* Builder / builds index (used on builder page) */
.buildergrid, .buildgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.buildercard, .buildcard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.buildcard .thumb {
  margin: -22px -22px 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.buildcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buildercard .no, .buildcard .no { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--accent); }
.buildercard h4, .buildcard h4 { font-family: var(--display); font-weight: 600; font-size: 21px; margin: 0; }
.buildercard p, .buildcard p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.buildercard .go, .buildcard .go { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.buildercard.pending, .buildcard.pending { border-style: dashed; color: var(--ink-2); }
.buildercard.pending .no, .buildcard.pending .no { color: var(--ink-2); }

/* Swapped in by AuthButton for the logged-in owning Builder, in place of
   the plain "Coming next" placeholder -- same dashed card, now a link. */
.buildcard.pending.add {
  align-items: center;
  text-align: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.buildcard.pending.add:hover { border-color: var(--accent); color: var(--accent); }
.buildcard.pending.add .add-plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-2);
}
.buildcard.pending.add:hover .add-plus { border-color: var(--accent); color: var(--accent); }

/* Builder profile header */
.builderhead { display: flex; flex-direction: column; gap: 14px; }
.builderhead .blurb { max-width: 62ch; font-size: 17px; color: var(--ink-2); margin: 0; }

/* Baseline spec cards */
.speccards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
}
.card .k {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.card .v { font-size: 16.5px; line-height: 1.45; }
.card .v b { font-weight: 600; }
.provenance {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-2);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

/* Baseline: provenance callout, score bar, at-a-glance, detailed writeup */
.prov {
  background: var(--card);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 0 0 30px;
  max-width: 78ch;
  font-size: 16px;
}
.prov p { margin: 0; max-width: none; color: var(--ink-2); }
.baseline-h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  margin: 42px 0 12px;
}
.baseline-h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18.5px;
  margin: 24px 0 6px;
}
.score { margin: 8px 0 8px; max-width: 720px; }
.score .bar { display: flex; height: 20px; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); }
.score .bar span { display: block; height: 100%; }
.score .bar .g { background: var(--ok); flex: 17; }
.score .bar .y { background: var(--warn); flex: 4; }
.score .bar .r { background: var(--bad); flex: 0; }
.score .legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.score .legend b { color: var(--ink); font-weight: 600; }
.score .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.score .legend .lg i { background: var(--ok); }
.score .legend .ly i { background: var(--warn); }
.score .legend .lr i { background: var(--bad); }
.glance { display: grid; gap: 0; margin: 0 0 8px; max-width: 78ch; }
.glance div { display: grid; grid-template-columns: 140px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.glance div:last-child { border-bottom: 1px solid var(--line); }
.glance dt { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); margin: 0; }
.glance dd { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 560px) { .glance div { grid-template-columns: 1fr; gap: 4px; } }
.detailed p, .detailed ul { max-width: 74ch; color: var(--ink-2); font-size: 16px; }
.detailed ul { padding-left: 1.15em; margin: 0 0 14px; }
.detailed li { margin: 0 0 7px; }
.detailed strong { color: var(--ink); font-weight: 600; }

/* Build plan / phase teaser */
.phaserow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 28px 0 24px;
}
.phase {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  background: var(--card);
}
.phase .num { font-family: var(--display); font-weight: 600; font-size: 34px; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.phase h4 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 0 0 6px; }
.phase p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-size: 16px;
}

/* Gallery */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.gtab {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  cursor: pointer;
}
.gtab:hover { border-color: var(--accent); color: var(--ink); }
.gtab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.photo.gallery-hidden { display: none; }
.gallery-more { margin-top: 18px; }
.shot {
  aspect-ratio: 4/3;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 16px;
  color: var(--ink-2);
}
.shot svg { opacity: 0.55; }
.shot .cap { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.shot .sub { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.gallery-note { margin-top: 16px; font-size: 14.5px; color: var(--ink-2); }
.photo {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
  padding: 0;
  cursor: zoom-in;
  color: inherit;
}
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photo .cap { padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin: 0; }
.photo:hover img { opacity: 0.9; }

/* Photo viewer (PhotoSwipe), themed to match the site */
.pswp {
  --pswp-bg: #0a0907;
  --pswp-placeholder-bg: #1a1814;
  --pswp-icon-color: #EDE7DA;
  --pswp-icon-color-secondary: #0a0907;
  --pswp-icon-stroke-color: #0a0907;
  --pswp-error-text-color: #B2A997;
  --pswp-root-z-index: 100;
  font-family: var(--body);
}
.pswp__counter {
  font-family: var(--mono);
  font-size: 12px;
  color: #B2A997;
  margin-inline-start: 6px;
}
.pswp__button { opacity: .85; }
.pswp__button:hover, .pswp__button:focus-visible { opacity: 1; }
.pswp__motori-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  padding: 36px 20px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(10,9,7,.85), rgba(10,9,7,0));
  color: #EDE7DA;
  font-size: 14.5px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}
.pswp__motori-caption[style*="display: none"] { display: none; }
/* Hide the caption while the photo is zoomed in so it never covers detail. */
.pswp--zoomed-in .pswp__motori-caption { opacity: 0; transition: opacity .2s; }

/* Share modal */
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 9, 7, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.share-modal[hidden] { display: none; }
.share-modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 92vw;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.share-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.share-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.share-modal-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  text-align: center;
}
.share-modal-qr {
  max-width: min(320px, 78vw);
  height: auto;
  border-radius: 12px;
}
.share-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.share-modal-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: none;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.share-modal-actions button:hover { border-color: var(--accent); color: var(--accent); }
.share-modal-actions button.copied { border-color: var(--ok); color: var(--ok); }
.share-modal-hint {
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: center;
  max-width: 40ch;
}

/* Updates timeline */
.timeline { margin-top: 28px; max-width: 70ch; }
.entry {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.entry:last-of-type { padding-bottom: 0; }
.entry .date { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.entry h5 { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 0 0 6px; }
.entry p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 520px) { .entry { grid-template-columns: 1fr; gap: 4px; } }
.more-soon { margin-top: 6px; padding: 18px 0 0; color: var(--ink-2); font-size: 14.5px; font-style: italic; }

/* Follow / social */
.feed-block { margin-top: 30px; }
.feed-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.feed-label svg { flex-shrink: 0; opacity: 0.8; }
.postgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 560px) { .postgrid { grid-template-columns: repeat(2, 1fr); } }
.post {
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-2);
  padding: 8px;
  text-align: center;
}
.post.reel { aspect-ratio: 9 / 16; }
.post svg { opacity: 0.5; }
.post .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em; }
.embedrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 700px) { .embedrow { grid-template-columns: 1fr; } }
.embedcol { min-width: 0; display: flex; flex-direction: column; }
.embedcol .feed-label { justify-content: center; }
.embedcol .embed-holder { display: flex; justify-content: center; max-width: 100%; overflow-x: auto; }
.embed-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-2);
  font-style: italic;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.follow-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.social {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 100px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  background: var(--card);
}
.social:hover { border-color: var(--accent); color: var(--accent); }
.follow-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); font-family: var(--mono); }

.backlink { padding: 30px 0 0; }

footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
  color: var(--ink-2);
  font-size: 13.5px;
}
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer .fmono { font-family: var(--mono); }

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

/* ---------- Phase 2: forms, status banners, buttons ---------- */
.formcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
  max-width: 640px;
}
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.field .hint { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.field input[type="text"],
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 14px;
}
.field input[type="text"]:focus,
.field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  border-radius: 100px;
  padding: 11px 22px;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.status-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 24px;
  font-size: 14.5px;
}
.status-banner .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status-banner.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.status-banner.ok .label { color: var(--ok); }
.status-banner.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--card)); }
.status-banner.warn .label { color: var(--warn); }
.status-banner.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--card)); }
.status-banner.bad .label { color: var(--bad); }

/* Three tiles per row at any width (percentage-based, not a fixed px size)
   so a narrow phone viewport doesn't strand the "+ Add" tile alone on its
   own row with a big gap next to it -- which is what a fixed 96px tile did
   once only 2 fit per row. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
  max-width: 340px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.photo-add {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
  background: var(--paper);
}
.photo-add:hover { border-color: var(--accent); color: var(--accent); }

/* PDFs have no thumbnail to show, so documents list as filename chips
   instead of the photo-grid tiles above. */
.doc-chip-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.doc-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-size: 14px;
}
.doc-chip .doc-chip-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-chip .remove {
  border: none;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.doc-chip .remove:hover { color: var(--bad); }
.doc-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px;
  background: var(--paper);
  margin-top: 8px;
}
.doc-add:hover { border-color: var(--accent); color: var(--accent); }

.form-error { color: var(--bad); font-size: 14px; margin-top: 16px; }

/* Form controls: iOS/Android apply their own chrome (rounded corners,
   inner shadow, default button gradient) to inputs, textareas and buttons
   unless it's explicitly turned off, which fought with our own styling on
   mobile. */
.field input[type="text"],
.field textarea,
.btn-primary,
.btn-secondary {
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 480px) {
  /* Stacked, full-width actions read much better than three buttons
     wrapping onto uneven rows, with Cancel's margin-left:auto stranding it
     alone on its own line. */
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn-primary,
  .btn-row .btn-secondary { width: 100%; justify-content: center; }
  .btn-row .btn-cancel { margin-left: 0 !important; order: 3; }
}

/* ---------- Phase 2: admin tables ---------- */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.admin-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  vertical-align: top;
}
.admin-table tr.selected td { background: var(--paper-2); }
.admin-table tr.clickable { cursor: pointer; }
.admin-table tr.clickable:hover td { background: var(--paper-2); }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge.submitted, .badge.denied_resubmit, .badge.changes_requested { color: var(--warn); border-color: var(--warn); }
.badge.approved, .badge.published { color: var(--ok); border-color: var(--ok); }
.badge.denied_final, .badge.denied, .badge.banned { color: var(--bad); border-color: var(--bad); }
.badge.draft { color: var(--ink-2); }
.detail-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-top: 20px;
}
.detail-panel h4 { margin: 0 0 14px; }
.detail-row { margin-bottom: 14px; }
.detail-row .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: block;
  margin-bottom: 4px;
}
.detail-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.detail-photos img { width: 100px; height: 100px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { opacity: 0.88; }

/* Hero photo picker (Builder form) */
.photo-thumb .hero-tag {
  position: absolute; left: 4px; bottom: 4px;
  background: var(--accent, #b8332b); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 100px;
}
.photo-thumb .hero-btn {
  position: absolute; left: 4px; bottom: 4px;
  background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer;
  font-size: 11px; padding: 3px 8px; border-radius: 100px;
}
.photo-thumb .hero-btn:hover { background: rgba(0,0,0,.85); }
.photo-thumb .hero-btn:disabled { opacity: .5; cursor: default; }

/* Drag-and-drop zones (Builder form) */
.dropzone { position: relative; border-radius: 8px; transition: background .12s, outline-color .12s; outline: 2px dashed transparent; outline-offset: 4px; }
.dropzone.over { background: rgba(184, 51, 43, .06); outline-color: var(--accent, #b8332b); }
.dropzone-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--accent, #b8332b); background: rgba(255,255,255,.7);
  border-radius: 8px; pointer-events: none;
}

/* Dashboard tables: status badges and action buttons share one height */
.admin-table td { vertical-align: middle; }
.admin-table .badge,
.admin-table .btn-primary,
.admin-table .btn-secondary,
.admin-table .btn-danger {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  line-height: 1;
  text-decoration: none;
}
.admin-table .btn-primary,
.admin-table .btn-secondary,
.admin-table .btn-danger { padding: 0 16px; font-size: 14px; }
.admin-table .badge { padding: 0 12px; }
.admin-table .row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-table .row-actions .btn-secondary, .admin-table .row-actions .btn-danger { width: auto; }

/* Overlay dialog (Admin review) */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(20, 18, 12, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto;
}
.modal-card {
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px;
  width: 100%; max-width: 640px; padding: 24px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h4 { margin: 0; font-size: 20px; }
.modal-x { background: none; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.modal-x:hover { color: var(--ink); }

/* Owner share kit (Instagram / Facebook), appended to the share dialog */
.share-social { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 360px; }
.share-social[hidden] { display: none; }
.share-social-row { display: flex; gap: 12px; justify-content: center; }
.share-social-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 96px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: none;
  color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.share-social-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.share-social-btn:disabled { opacity: .55; cursor: default; }
.share-social-caption { display: flex; flex-direction: column; gap: 6px; width: 100%; font-size: 12.5px; color: var(--ink-2); }
.share-social-caption textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px; resize: vertical;
}

/* Home: a Builder's builds swipe sideways when there is more than one. */
.thumbgrid.single { grid-template-columns: minmax(240px, 340px); }
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.carousel-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.carousel-track > .buildthumb {
  flex: 0 0 min(320px, 78%);
  scroll-snap-align: start;
}
.carousel-btn {
  position: absolute;
  top: calc(50% - 40px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 2;
}
.carousel-btn:hover { border-color: var(--accent); color: var(--accent); }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
.carousel-btn[hidden] { display: none; }
@media (hover: none) { .carousel-btn { display: none; } }

/* Builder page: builds stack in one column and scroll down the page. */
.buildstack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
  max-width: 760px;
}

/* Builder page: owner-only "Nominate" button + its share sheet. */
.builder-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.builderhead .builder-actions .share-link { margin-top: 2px; }
.nom-sheet { max-width: 440px; }
.nom-lede { margin: 0 0 16px; font-size: 14.5px; color: var(--ink-2); }
.nom-small { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); word-break: break-word; }
.nom-error { margin: 0; color: var(--bad, #b3202a); font-size: 14.5px; }
.nom-photo { cursor: pointer; display: inline-flex; align-items: center; }
