:root {
  --bg: #f3efe6;
  --paper: rgba(255, 252, 246, 0.85);
  --ink: #1f1d17;
  --muted: #5d5546;
  --line: rgba(35, 31, 24, 0.14);
  --accent: #b6461e;
  --accent-deep: #842d11;
  --accent-soft: #f4c5a5;
  --olive: #32422d;
  --gold: #c58f28;
  --shadow: 0 22px 60px rgba(58, 42, 17, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(198, 143, 40, 0.24), transparent 22%),
    radial-gradient(circle at top right, rgba(180, 70, 30, 0.16), transparent 20%),
    linear-gradient(180deg, #f8f3ea 0%, #efe6d8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar,
.panel,
.hero {
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(255, 250, 242, 0.8);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

.brand small,
.stat-label,
.eyebrow,
.fine-print {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  color: #fff7ef;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-link,
.button,
.pill,
input,
select,
textarea {
  border-radius: 14px;
}

.nav-link {
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.nav-link.active {
  background: var(--ink);
  color: #fff9f0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 20px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255, 249, 241, 0.9), rgba(248, 230, 205, 0.82));
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-market {
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 0.95;
  max-width: 12ch;
}

.hero-copy,
.section-copy,
.stack-list,
.check-list {
  max-width: 66ch;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-panel,
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 20px;
  border-radius: 24px;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #fff8ef;
}

.button-primary:hover {
  background: var(--accent-deep);
}

.button-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.panel {
  padding: 22px;
  border-radius: 26px;
}

.stats-panel,
.layout-grid,
.approval-grid,
.network-grid,
.parts-grid,
.request-grid,
.control-grid {
  display: grid;
}

.stats-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.stats-panel > div {
  padding: 10px 6px;
}

.approval-panel {
  margin-bottom: 18px;
}

.private-panel {
  margin-bottom: 18px;
}

.admin-only[hidden] {
  display: none;
}

.approval-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.approval-summary {
  display: grid;
  gap: 12px;
}

.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.stats-panel strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

.layout-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head h2,
.hero-panel h2,
.network-card h3,
.part-card h3,
.request-card h3 {
  margin: 0;
}

.control-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(49, 36, 18, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(182, 70, 30, 0.2);
  border-color: var(--accent);
}

.network-editor,
.parts-grid,
.network-grid,
.request-grid {
  gap: 16px;
}

.network-editor {
  display: flex;
  flex-direction: column;
}

.network-row,
.network-card,
.part-card,
.request-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 20px;
}

.network-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
  align-items: start;
  gap: 14px;
  padding: 14px;
}

.network-fields {
  display: grid;
  gap: 10px;
}

.network-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.network-link-input {
  font-size: 0.92rem;
}

.button-tertiary {
  background: rgba(50, 66, 45, 0.08);
  border: 1px solid var(--line);
  color: var(--olive);
}

.button-danger {
  background: rgba(132, 45, 17, 0.1);
  border: 1px solid rgba(132, 45, 17, 0.25);
  color: var(--accent-deep);
}

.status-approved {
  background: rgba(50, 66, 45, 0.12);
}

.status-pending {
  background: rgba(197, 143, 40, 0.18);
}

.status-not-applied {
  background: rgba(182, 70, 30, 0.12);
}

.network-row p,
.network-card p,
.part-card p,
.request-card p,
.request-card ul,
.check-list,
.stack-list {
  margin: 0;
}

.network-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.network-card,
.part-card,
.request-card {
  padding: 18px;
}

.network-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  background: rgba(197, 143, 40, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.parts-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.part-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.part-card header,
.request-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.price-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.price-chip,
.meta-chip {
  padding: 8px 10px;
  background: rgba(50, 66, 45, 0.1);
  border-radius: 999px;
  font-size: 0.9rem;
}

.part-card .button {
  width: 100%;
}

.text-link {
  color: var(--accent-deep);
  font-weight: 700;
}

.repair-layout {
  align-items: start;
}

.repair-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.repair-form label:nth-child(7),
.repair-form label:nth-child(8),
.repair-form .form-actions {
  grid-column: 1 / -1;
}

.stack-list,
.check-list {
  padding-left: 18px;
}

.request-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.request-card ul {
  padding-left: 18px;
}

.fine-print {
  margin-top: 14px;
  font-size: 0.87rem;
}

.empty-state {
  padding: 26px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
}

/* ── Disclosure banner ── */
.disclosure-banner {
  margin-bottom: 18px;
  padding: 11px 20px;
  background: rgba(198, 143, 40, 0.12);
  border: 1px solid rgba(198, 143, 40, 0.3);
  border-radius: 14px;
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
}

.disclosure-banner p {
  margin: 0;
}

.disclosure-banner a {
  color: var(--accent-deep);
  font-weight: 600;
}

/* ── Site footer ── */
.site-footer {
  margin-top: 32px;
  padding: 22px 0 8px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 24px;
  font-size: 0.87rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-nav a {
  color: var(--accent-deep);
  font-weight: 600;
}

.footer-disclosure {
  flex-basis: 100%;
  margin-top: 6px;
}

/* ── About & legal pages ── */
.hero-about,
.hero-legal {
  margin-bottom: 18px;
}

.legal-panel {
  max-width: 820px;
}

.legal-body h2 {
  margin: 2em 0 0.5em;
  font-size: 1.2rem;
}

.legal-body h3 {
  margin: 1.4em 0 0.4em;
  font-size: 1rem;
}

.legal-body p,
.legal-body ul {
  margin: 0 0 1em;
  line-height: 1.7;
  max-width: 72ch;
}

.legal-body ul {
  padding-left: 20px;
}

.legal-body a {
  color: var(--accent-deep);
  font-weight: 600;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.about-aside {
  border-radius: 20px;
}

.about-aside h3 {
  margin-top: 0;
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.partner-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.partner-card h3 {
  margin: 0 0 8px;
}

.partner-card p {
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0 0 12px;
  color: var(--muted);
}

.contact-panel {
  margin-top: 18px;
}

.contact-grid p {
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .hero,
  .layout-grid,
  .approval-grid,
  .stats-panel,
  .control-grid,
  .repair-form,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head,
  .network-row,
  .hero-actions,
  .form-actions {
    align-items: stretch;
  }

  .topbar,
  .section-head,
  .network-row,
  .part-card header,
  .request-card header {
    flex-direction: column;
  }
}