:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef3f1;
  --ink: #17202a;
  --muted: #60707a;
  --line: #d9e1e4;
  --primary: #17472c;
  --secondary: #0f2f1f;
  --primary-contrast: #ffffff;
  --accent: #d5a93a;
  --signal: #b7472d;
  --info: #236c85;
  --font-heading: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-support: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(27, 40, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--line);
}

button,
select,
input,
textarea,
a {
  min-height: 40px;
}

a {
  color: var(--primary);
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(23, 32, 42, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-contrast);
  font-family: var(--font-support);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.brand-mark[data-shape="roundel"] {
  border-radius: 50%;
}

.brand-mark[data-shape="shield"] {
  clip-path: polygon(12% 0, 88% 0, 88% 62%, 50% 100%, 12% 62%);
  border-radius: 3px;
}

.brand-mark.has-logo {
  width: min(330px, 34vw);
  height: auto;
  min-height: 54px;
  background: transparent;
  clip-path: none;
  border-radius: 0;
}

.brand-mark.has-logo img {
  width: 100%;
  max-height: 70px;
  object-fit: contain;
}

.brand-lockup h1,
.workspace-intro h2,
.proof-band h2,
.implementation h2,
.pricing h2 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-lockup h1 {
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--signal);
  font-family: var(--font-support);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions a,
.domain-pill,
.status-pill,
.proof-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.top-actions a {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
}

.top-actions .feedback-link {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 850;
}

main {
  display: grid;
  gap: clamp(34px, 6vw, 72px);
}

.workspace-shell,
.proof-band,
.implementation,
.pricing {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.workspace-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  gap: 18px;
  padding-top: 22px;
}

.workspace-media {
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.workspace-media img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.workspace-intro {
  display: grid;
  align-content: stretch;
  gap: 18px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.workspace-intro h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4.5vw, 4.2rem);
}

.workspace-intro p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.intro-panel {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-panel label,
.field label,
.mini-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

select,
input {
  padding: 0 12px;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.intro-panel select {
  width: min(320px, 100%);
}

.domain-pill {
  background: var(--surface-strong);
  color: var(--primary);
  font-weight: 800;
}

.module-tabs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(9, minmax(96px, 1fr));
  gap: 6px;
}

.tab-button {
  border-radius: var(--radius);
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
}

.tab-button[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: var(--primary);
}

.app-surface {
  grid-column: 1 / -1;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.view {
  display: grid;
  gap: 22px;
  padding: clamp(18px, 3vw, 30px);
}

.view-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.view-header h2,
.panel h3,
.item-card h3,
.mini-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  letter-spacing: 0;
}

.view-header h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.4rem);
}

.view-header p,
.panel p,
.item-card p,
.mini-card p,
.empty-state,
.table-wrap td {
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-grid,
.two-col,
.proof-grid,
.timeline,
.pricing-grid,
.process-grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
}

.panel,
.item-card,
.mini-card,
.process-card,
.proof-grid article,
.timeline article,
.pricing-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel,
.item-card,
.proof-grid article,
.timeline article,
.pricing-grid article {
  padding: 18px;
}

.mini-card {
  padding: 16px;
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.process-card span {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.process-card p {
  margin: 0;
}

.policy-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.metric {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.metric strong {
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
}

.metric span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 12px;
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li,
.feed-post,
.booking-row,
.service-row,
.campaign-preview {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.list strong,
.feed-post strong,
.booking-row strong,
.service-row strong {
  color: var(--ink);
}

.meta-line,
.row-actions,
.status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  min-height: 28px;
  padding: 4px 9px;
  background: var(--surface-strong);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.warn {
  background: #fff2d6;
  color: #7b4f00;
}

.status-pill.hot {
  background: #ffe5df;
  color: #8a2d1c;
}

.status-pill.info {
  background: #e1f2f6;
  color: #14596e;
}

.form-grid,
.mini-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field.full {
  grid-column: 1 / -1;
}

.settings-section {
  display: grid;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.settings-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.settings-section h3,
.settings-section p {
  margin: 0;
}

.settings-section p {
  color: var(--muted);
  font-family: var(--font-body);
  line-height: 1.5;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  border-radius: var(--radius);
  padding: 0 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-contrast);
}

.secondary-button {
  border-color: var(--info);
  background: var(--info);
  color: #fff;
}

.ghost-button {
  background: #fff;
  color: var(--primary);
}

.danger-button {
  border-color: var(--signal);
  background: var(--signal);
  color: #fff;
}

.brand-preview-panel {
  align-content: start;
}

.portal-preview {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.portal-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: var(--primary);
}

.preview-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-contrast);
}

.preview-logo.stacked {
  align-items: center;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.preview-logo.icon-only .preview-wordmark {
  display: none;
}

.preview-logo-mark {
  display: grid;
  width: 58px;
  min-width: 58px;
  height: 58px;
  place-items: center;
  background: var(--secondary);
  color: var(--primary-contrast);
  font-family: var(--font-support);
  font-size: 0.9rem;
  font-weight: 900;
}

.preview-logo-mark[data-shape="square"] {
  border-radius: var(--radius);
}

.preview-logo-mark[data-shape="roundel"] {
  border-radius: 50%;
}

.preview-logo-mark[data-shape="shield"] {
  clip-path: polygon(12% 0, 88% 0, 88% 62%, 50% 100%, 12% 62%);
  border-radius: 3px;
}

.preview-wordmark {
  display: grid;
  gap: 5px;
}

.preview-wordmark strong {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  line-height: 1;
}

.preview-wordmark em {
  font-family: var(--font-support);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
}

.portal-preview-header .primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--secondary);
}

.preview-logo-asset {
  width: min(260px, 60%);
  max-height: 82px;
  object-fit: contain;
}

.portal-preview-body {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #fff;
}

.portal-preview-body h4 {
  margin: 0;
  color: var(--secondary);
  font-family: var(--font-heading);
  font-size: 1.45rem;
  line-height: 1.05;
}

.portal-preview-body p {
  margin: 0;
}

.swatch-row,
.brand-guidance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch-row span {
  width: 56px;
  height: 28px;
  border: 1px solid rgba(23, 32, 42, 0.18);
  border-radius: var(--radius);
}

.brand-guidance {
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-guidance li {
  flex: 1 1 180px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--muted);
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

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

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

.member-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--primary);
  font-weight: 900;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f5f7;
  color: #42515b;
  font-size: 0.78rem;
  font-weight: 750;
}

.feed-post h3,
.item-card h3,
.mini-card h3 {
  font-size: 1rem;
}

.proof-band,
.implementation,
.pricing {
  display: grid;
  gap: 18px;
}

.proof-grid,
.pricing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proof-kicker {
  min-height: 28px;
  margin-bottom: 10px;
  background: var(--surface-strong);
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 850;
}

.timeline span {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 900;
}

.price {
  margin: 8px 0;
  color: var(--primary);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
}

.price span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 26px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer p {
  margin: 0;
}

@media (max-width: 1040px) {
  .workspace-shell,
  .two-col {
    grid-template-columns: 1fr;
  }

  .module-tabs {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }

  .dashboard-grid,
  .proof-grid,
  .pricing-grid,
  .process-grid,
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .view-header,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-mark.has-logo {
    width: min(320px, 82vw);
  }

  .top-actions {
    justify-content: start;
  }

  .workspace-shell,
  .proof-band,
  .implementation,
  .pricing {
    width: min(100% - 20px, 1240px);
  }

  .module-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .proof-grid,
  .pricing-grid,
  .process-grid,
  .timeline,
  .card-grid,
  .directory-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }
}
