/* Software directory — minimal, fast, premium. No framework, ~one file. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-muted: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1c20;
  --text-soft: #545a63;
  --text-faint: #7a828c;
  --border: #edeef1;
  --border-strong: #dcdee3;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-soft: #ecfdf5;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.08);
  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.5em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.submit-page .form.wizard { margin-top: 28px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--text); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; border-radius: 6px; }

/* ---- Header --------------------------------------------------------------*/
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.02em; }
.brand-mark {
  width: 24px; height: 24px; flex-shrink: 0;
  background: url("/assets/favicon.svg") center / 100% 100% no-repeat;
}
.brand-name { font-size: 16px; }
.main-nav { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.nav-link {
  display: inline-block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 14px; font-weight: 500;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav-link:hover { color: var(--text); background: var(--bg-muted); }

.nav-dropdown { position: relative; }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  display: none; flex-direction: column; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover); padding: 6px;
}
.nav-menu a { padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-soft); }
.nav-menu a:hover { background: var(--bg-muted); color: var(--text); }
.nav-dropdown:hover .nav-menu, .nav-dropdown.open .nav-menu { display: flex; }

.header-search { margin-left: auto; }
.header-search input {
  width: 240px; max-width: 40vw; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg-muted); font-family: inherit;
}
.header-search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); background: #fff; }
.header-cta { flex-shrink: 0; }

/* ---- Buttons -------------------------------------------------------------*/
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 550;
  cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-lg { padding: 12px 22px; font-size: 15px; }

/* ---- Hero ----------------------------------------------------------------*/
.hero { padding: 68px 0 48px; text-align: center; border-bottom: 1px solid var(--border); }
.hero-title { font-size: clamp(28px, 5vw, 44px); font-weight: 700; margin-bottom: 14px; }
.hero-sub { font-size: clamp(15px, 2.5vw, 18px); color: var(--text-soft); max-width: 560px; margin: 0 auto 28px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.hero-search input {
  flex: 1; padding: 13px 16px; font-size: 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; font-family: inherit;
}
.hero-search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }

/* Horizontal category quick-bar under the hero */
.cat-bar { border-bottom: 1px solid var(--border); background: var(--surface); }
.cat-bar-inner { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cat-bar-inner::-webkit-scrollbar { height: 6px; }
.cat-bar-inner::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.cat-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13.5px; font-weight: 500; color: var(--text-soft); background: var(--surface); white-space: nowrap;
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.cat-pill-emoji { font-size: 15px; line-height: 1; }
.tag {
  padding: 6px 12px; font-size: 13px; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.tag:hover { border-color: var(--border-strong); color: var(--text); }

/* ---- Sections ------------------------------------------------------------*/
.section { padding: 44px 0; }
.section-muted { background: var(--bg-muted); border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-title { font-size: 20px; font-weight: 650; margin: 0; }

.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(24px, 4vw, 34px); }
.cat-h1-emoji { font-size: 0.9em; }
.page-lead { color: var(--text-soft); font-size: 17px; max-width: 640px; }
.result-count { color: var(--text-faint); font-size: 14px; margin-top: 6px; }

/* ---- Card grid -----------------------------------------------------------*/
.card-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  position: relative; background: var(--surface); overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: box-shadow .15s, border-color .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); transform: translateY(-2px); }
.card-link { display: block; height: 100%; }
.card-body { padding: 18px; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-muted); border-bottom: 1px solid var(--border); }
.card-media-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.card--media:hover .card-media-img { transform: scale(1.035); }
.card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border); background: #fff; flex-shrink: 0;
}
.card-icon--placeholder {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: var(--accent); background: var(--accent-soft);
}
.card-title-wrap { min-width: 0; }
.card-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.card-desc { color: var(--text-soft); font-size: 14px; margin: 0 0 14px; min-height: 2.8em; }
.card-cta { color: var(--accent); font-size: 13px; font-weight: 600; }

.badge {
  display: inline-block; padding: 2px 8px; font-size: 11.5px; font-weight: 550;
  border-radius: 999px; line-height: 1.5;
}
.badge-price { background: #f1f3f6; color: #4b5563; }
.badge-oss { background: #ecfdf3; color: #067647; }
.badge-featured { background: var(--accent-soft); color: var(--accent); }
.badge-sponsor { background: #fff3e0; color: #b45309; }

.ribbon {
  position: absolute; top: 12px; right: 12px;
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.ribbon-featured { background: var(--accent); color: #ffffff; }
.ribbon-sponsor { background: #f59e0b; color: #ffffff; }

.empty-state { color: var(--text-faint); padding: 32px 0; text-align: center; }

/* ---- Category chips ------------------------------------------------------*/
.category-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.category-chip {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); font-weight: 550; font-size: 15px;
}
.category-chip:hover { border-color: var(--accent); color: var(--accent); }
.category-chip-emoji { font-size: 18px; line-height: 1; flex-shrink: 0; }
.tag-emoji { font-size: 13px; }

/* ---- Breadcrumbs ---------------------------------------------------------*/
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-faint); padding: 24px 0 0; }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--accent); }

/* ---- Software detail -----------------------------------------------------*/
.article-wrap { padding-bottom: 40px; }
.software { max-width: 820px; }
.software-header { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 22px 0 8px; }
.software-icon { width: 72px; height: 72px; border-radius: 16px; border: 1px solid var(--border); object-fit: cover; }
.software-header-main { flex: 1; min-width: 220px; }
.software-name { font-size: clamp(24px, 4vw, 32px); margin-bottom: 8px; }
.software-desc { color: var(--text-soft); font-size: 17px; margin: 0 0 12px; }
.software-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.software-actions { width: 100%; }
@media (min-width: 640px) { .software-actions { width: auto; } }

.software-screenshot { margin: 26px 0; }
.software-screenshot img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); }

.software-section { margin: 30px 0; }
.software-section h2 { font-size: 19px; }
.prose { color: var(--text); font-size: 16px; }
.prose h3 { font-size: 19px; margin: 26px 0 10px; }
.prose h4 { font-size: 16px; margin: 22px 0 8px; }
.prose h5, .prose h6 { font-size: 14px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--text-faint); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { text-decoration: none; }
.prose strong { font-weight: 650; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em;
  background: var(--bg-muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
/* Buttons embedded in prose must not inherit link (accent) colour/underline. */
.prose a.btn { text-decoration: none; }
.prose a.btn-primary { color: #fff; }
.prose a.btn-ghost { color: var(--text-soft); }

/* Full content page (About, etc.) */
.prose--page { padding: 8px 0 64px; }
.prose--page h1 { font-size: clamp(28px, 5vw, 38px); margin-bottom: 14px; letter-spacing: -0.02em; }
.prose--page h2 { font-size: 21px; margin: 34px 0 10px; }
.prose--page p, .prose--page li { color: var(--text-soft); }
.prose--page .page-lead { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.prose--page ul { padding-left: 20px; }
.prose--page .btn { margin-top: 8px; }

/* Homepage promo / value-prop section */
.promo { border-top: 1px solid var(--border); background: var(--bg-muted); }
.promo-head { max-width: 620px; margin-bottom: 26px; }
.promo-lead { color: var(--text-soft); font-size: 17px; margin: 8px 0 0; }
.promo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 28px; }
.promo-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.promo-emoji { font-size: 26px; line-height: 1; margin-bottom: 12px; }
.promo-card h3 { font-size: 16px; margin-bottom: 8px; }
.promo-card p { color: var(--text-soft); font-size: 14px; margin: 0; }
.promo-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* FAQ accordion (native <details>, no JS) */
.faq-head { justify-content: center; text-align: center; }
.faq-list { max-width: 760px; margin: 4px auto 0; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 4px; gap: 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 16px; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--text-faint); line-height: 1; }
.faq-item[open] summary::after { content: "\2013"; }
.faq-item summary:hover { color: var(--accent); }
.faq-answer { padding: 0 4px 20px; max-width: 680px; color: var(--text-soft); font-size: 15px; line-height: 1.65; }

/* ---- Stats page ---------------------------------------------------------*/
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 10px 0 24px; }
.kpi { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi-num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.kpi-label { font-size: 13px; color: var(--text-faint); }

.stats-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-bottom: 12px; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: 1fr; } }
.chart-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.chart-card--wide { grid-column: 1 / -1; }
.chart-title { font-size: 16px; margin: 0 0 2px; }
.chart-sub { font-size: 13px; color: var(--text-faint); margin: 0 0 20px; }
.chart-note { color: var(--text-faint); font-size: 13px; margin: 14px 0 40px; }

/* vertical columns */
.bars-v { display: flex; align-items: flex-end; gap: 6px; height: 180px; }
.bar-v-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar-v-value { font-size: 11px; color: var(--text-faint); height: 13px; line-height: 1; font-variant-numeric: tabular-nums; }
.bar-v-fill { width: 100%; max-width: 40px; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar-v-col:hover .bar-v-fill { background: var(--accent-hover); }
.bar-v-label { font-size: 11px; color: var(--text-faint); white-space: nowrap; }

/* horizontal bars */
.bars-h { display: flex; flex-direction: column; gap: 11px; }
.bar-h-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 12px; }
.bar-h-label { font-size: 13.5px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-h-label--link:hover { color: var(--accent); }
.bar-h-emoji { font-size: 13px; }
@media (max-width: 480px) { .bar-h-row { grid-template-columns: 120px 1fr auto; } }
.bar-h-track { height: 12px; background: var(--bg-muted); border-radius: 999px; overflow: hidden; }
.bar-h-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; min-width: 4px; }
.bar-h-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* open-source split bar */
.split-bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.split-seg { display: block; height: 100%; }
.split-seg--a { background: var(--accent); }
.split-seg--b { background: var(--border-strong); }
.split-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-soft); }
.split-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.dot--a { background: var(--accent); }
.dot--b { background: var(--border-strong); }

.proscons { display: grid; gap: 24px; }
@media (min-width: 640px) { .proscons { grid-template-columns: 1fr 1fr; } }
.list-pros, .list-cons { list-style: none; padding: 0; margin: 0; }
.list-pros li, .list-cons li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--text-soft); }
.list-pros li::before { content: "✓"; position: absolute; left: 0; color: #16a34a; font-weight: 700; }
.list-cons li::before { content: "–"; position: absolute; left: 4px; color: #94a3b8; font-weight: 700; }

.link-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.link-list a {
  padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-soft); background: var(--surface);
}
.link-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Icons --------------------------------------------------------------*/
.icon { display: inline-block; width: 20px; height: 20px; vertical-align: middle; flex-shrink: 0; }
.icon--sm { width: 16px; height: 16px; }

/* ---- Share buttons ------------------------------------------------------*/
.section-eyebrow {
  font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); margin: 0 0 14px;
}
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; font-size: 14px; font-weight: 550; font-family: inherit;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: background .15s, border-color .15s, color .15s;
}
.share-btn .icon { width: 17px; height: 17px; }
.share-btn:hover { border-color: var(--text); }
.share-x:hover { background: #000; color: #fff; border-color: #000; }
.share-li:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-copy.copied { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }

/* ---- Stay connected grid ------------------------------------------------*/
.connect-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.connect-item {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.connect-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.connect-item .icon { grid-row: 1 / span 2; color: var(--text-soft); }
.connect-item:hover .icon { color: var(--accent); }
.connect-label { font-size: 14px; font-weight: 600; }
.connect-value { font-size: 12.5px; color: var(--text-faint); word-break: break-all; }
.connect-emoji { grid-row: 1 / span 2; font-size: 20px; line-height: 1; width: 22px; text-align: center; }
.connect-item--static { cursor: default; }
.connect-item--static:hover { border-color: var(--border); box-shadow: none; }
.connect-item--static:hover .icon { color: var(--text-soft); }

/* ---- Software detail: two-column layout ---------------------------------*/
.software-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) {
  .software-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .software-aside { position: sticky; top: 78px; }
}
.software-layout .software { max-width: none; }
.software-aside { display: flex; flex-direction: column; gap: 16px; }
.aside-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px; }
.aside-card .section-eyebrow { margin-bottom: 12px; }
/* In the narrow sidebar, share buttons and connect items stack full width. */
.software-aside .share-row { flex-direction: column; }
.software-aside .share-btn { width: 100%; justify-content: flex-start; }
/* Info items as one cohesive list separated by divider lines (no inner boxes) */
.software-aside .connect-grid { display: flex; flex-direction: column; gap: 0; }
.software-aside .connect-item {
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  padding: 13px 2px; border-bottom: 1px solid var(--border);
}
.software-aside .connect-item:first-child { padding-top: 2px; }
.software-aside .connect-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.software-aside .connect-item:hover { box-shadow: none; border-color: var(--border); }
.software-aside .connect-item[href]:hover .connect-label { color: var(--accent); }
.software-aside .connect-item[href]:hover .icon { color: var(--accent); }
/* Compact, icon-only share row (sits below the Info card) */
.share-card { padding: 14px 16px; }
.share-card .section-eyebrow { margin-bottom: 10px; }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-head .section-eyebrow { margin: 0; }
.software-aside .share-row--compact { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.software-aside .share-btn.share-icon { width: 38px; height: 38px; padding: 0; justify-content: center; flex: 0 0 auto; }
.share-btn.share-icon .icon { width: 18px; height: 18px; }

/* ---- Video facade (no JS/network cost until clicked) --------------------*/
.software-video { margin: 30px 0; }
.video-facade {
  position: relative; cursor: pointer; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 9; background: #000;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; font-size: 22px;
}
.video-facade iframe, .preview-video { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: var(--radius); }

/* ---- Forms ---------------------------------------------------------------*/
.form { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 60px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 550; }
.field span small { font-weight: 400; color: var(--text-faint); }
.field input, .field textarea, .field select {
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; font-weight: 400;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.field input[type="file"] { padding: 8px 10px; font-size: 14px; cursor: pointer; background: var(--bg-muted); }
.field input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 550;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
.form-hint { font-size: 13px; color: var(--text-faint); margin: -2px 0 0; }
.field-group-label { font-size: 13px; font-weight: 650; color: var(--text-soft); margin: 6px 0 -4px; padding-top: 6px; border-top: 1px solid var(--border); }
.field-group-label small { font-weight: 400; color: var(--text-faint); }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 20px; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.form-section legend { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding: 0 8px; }
.form-section legend small { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Wizard: full-width two-column panel — vertical stepper on the left, fields right */
.container.submit-page { max-width: none; }
.submit-page .page-head { padding: 24px 0 4px; }
.form.wizard {
  display: grid; grid-template-columns: 240px 1fr; gap: 0;
  margin: 16px 0 48px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow);
}
.wizard-steps { padding: 20px 18px; background: var(--bg-muted); border-right: 1px solid var(--border); }
.wizard-body { min-width: 0; display: flex; flex-direction: column; }
.wizard .form-section.step { border: 0; border-radius: 0; padding: 26px 22px 22px; gap: 14px; }
.step-legend { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin: 0; }
.step-legend small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.form.wizard:not(.js) .form-section.step + .form-section.step { border-top: 1px solid var(--border); }
.wizard .form-nav { margin: 0; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-muted); }

/* Vertical stepper in the side column */
.stepper--vertical { display: flex; flex-direction: column; align-items: stretch; margin: 0; overflow: visible; }
.stepper--vertical .stepper-item {
  flex: 0 0 auto; flex-direction: row; align-items: center; gap: 12px;
  min-width: 0; padding: 0 0 26px; text-align: left;
}
.stepper--vertical .stepper-item:last-child { padding-bottom: 0; }
.stepper--vertical .stepper-item::before { left: 15px; top: 32px; width: 2px; height: 100%; }
.stepper--vertical .stepper-item:first-child::before { display: block; }
.stepper--vertical .stepper-item:last-child::before { display: none; }
.stepper--vertical .stepper-label { white-space: normal; font-size: 13px; }

@media (max-width: 720px) {
  .form.wizard { grid-template-columns: 1fr; }
  .wizard-steps { border-right: 0; border-bottom: 1px solid var(--border); padding: 18px 20px; }
  .stepper--vertical { flex-direction: row; }
  .stepper--vertical .stepper-item { flex: 1; flex-direction: column; gap: 7px; padding: 0; text-align: center; }
  .stepper--vertical .stepper-item::before { left: -50%; top: 15px; width: 100%; height: 2px; }
  .stepper--vertical .stepper-item:first-child::before { display: none; }
  .stepper--vertical .stepper-item:last-child::before { display: block; }
}

/* Rich-text (markdown) editor */
.rte-wrap { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 550; }
.field-label small { font-weight: 400; color: var(--text-faint); }
.rte { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.rte:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.rte-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--border); background: var(--bg-muted); }
.rte-toolbar button { font: inherit; font-size: 13px; line-height: 1; padding: 6px 10px; border: 1px solid transparent; background: transparent; border-radius: 6px; cursor: pointer; color: var(--text-soft); }
.rte-toolbar button:hover { background: var(--surface); border-color: var(--border); color: var(--text); }
.rte-toolbar button strong, .rte-toolbar button em { font-size: 14px; }
.rte-spacer { flex: 1; }
.rte-count { font-size: 12px; color: var(--text-faint); padding: 0 6px; white-space: nowrap; }
.rte-count.under { color: #b45309; font-weight: 600; }
.rte-preview-toggle.active { background: var(--surface); border-color: var(--border-strong); color: var(--accent); font-weight: 600; }
.rte textarea { display: block; width: 100%; border: 0; padding: 12px 14px; font: inherit; font-size: 15px; background: transparent; resize: vertical; min-height: 170px; }
.rte textarea:focus { outline: none; }
.rte-preview { padding: 14px; min-height: 170px; font-size: 15px; }
.rte-preview:empty::before { content: "Nothing to preview yet."; color: var(--text-faint); }
.field select.multi { padding: 6px; font-size: 14px; }
.field select.multi option { padding: 4px 6px; border-radius: 4px; }
.char-count { font-size: 12px; color: var(--text-faint); align-self: flex-end; }
.char-count.over { color: #dc2626; font-weight: 600; }

/* ---- Input with leading icon --------------------------------------------*/
.input-icon {
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
}
.input-icon .icon { color: var(--text-faint); flex-shrink: 0; }
.input-icon input {
  border: 0 !important; background: transparent; flex: 1; min-width: 0;
  padding: 10px 0; font-size: 15px; font-family: inherit;
}
.input-icon input:focus { outline: none; }
.input-icon:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.input-icon:focus-within .icon { color: var(--accent); }
.social-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .social-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Stepper (shown only with JS wizard) --------------------------------*/
.stepper { display: none; list-style: none; padding: 0; margin: 4px 0 10px; overflow-x: auto; }
.wizard.js .stepper { display: flex; }
.stepper-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1;
  min-width: 68px; position: relative; font-size: 12px; color: var(--text-faint);
}
.stepper-item::before {
  content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.stepper-item:first-child::before { display: none; }
.stepper-item.is-active::before, .stepper-item.is-done::before { background: var(--accent); }
.stepper-dot {
  position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--border);
  font-weight: 650; font-size: 13px; color: var(--text-faint); transition: all .15s;
}
.stepper-item.is-active .stepper-dot { border-color: var(--accent); color: var(--accent); }
.stepper-item.is-done .stepper-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper-item.is-done, .stepper-item.is-active { cursor: pointer; }
.stepper-label { white-space: nowrap; }
.stepper-item.is-active .stepper-label { color: var(--text); font-weight: 600; }

/* ---- Wizard steps + nav -------------------------------------------------*/
.wizard.js .step { display: none; }
.wizard.js .step.is-active { display: flex; }
.form-nav { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.form-nav-spacer { flex: 1; }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

.search-page-form { display: flex; gap: 8px; max-width: 560px; margin-top: 14px; }
.search-page-form input { flex: 1; padding: 11px 14px; font-size: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-family: inherit; }

.alert { padding: 14px 16px; border-radius: var(--radius); margin: 18px 0; font-size: 14px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert ul { margin: 0; padding-left: 18px; }

/* ---- Pagination ----------------------------------------------------------*/
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 36px 0; }
.page-link {
  min-width: 38px; padding: 8px 12px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-soft); background: var(--surface);
}
.page-link:hover { border-color: var(--border-strong); color: var(--text); }
.page-link.is-current { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-gap { padding: 8px 4px; color: var(--text-faint); }

/* ---- Footer --------------------------------------------------------------*/
.site-footer { border-top: 1px solid var(--border); background: var(--bg-muted); margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; padding: 40px 20px 24px; }
.footer-tagline { color: var(--text-faint); font-size: 14px; max-width: 320px; margin: 8px 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.footer-nav a { color: var(--text-soft); font-size: 14px; }
.footer-nav a:hover { color: var(--accent); }
.footer-legal { padding: 0 20px 32px; color: var(--text-faint); font-size: 13px; }

/* ---- Error pages ---------------------------------------------------------*/
.error-page { text-align: center; padding: 90px 20px; }
.error-code { font-size: 56px; font-weight: 800; color: var(--accent); margin: 0; letter-spacing: -0.03em; }
.error-page h1 { font-size: 26px; margin: 8px 0 12px; }

/* ---- Dark mode -----------------------------------------------------------*/
/* Light theme is intentionally forced (color-scheme: light on :root) for a
   consistent, maximally-readable minimal look — no dark-mode overrides. */

@media (max-width: 640px) {
  .header-cta { display: none; }
  .header-search { margin-left: auto; }
  .header-search input { width: 150px; }
}
