:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-alt: #f0f4f8;
  --ink: #0b1f30;
  --muted: #50616a;
  --line: #d9ded8;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #ffb82e;
  --info: #1d4ed8;
  --warning: #b45309;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 8px;
  --shadow: 0 12px 28px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.94);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 228px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 128px;
  height: 40px;
  flex: 0 0 128px;
  overflow: hidden;
  background: transparent url("brand/winwin-logo-horizontal.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.brand-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0;
}

.brand-subtitle::after {
  content: "Documentation";
  font-size: 12px;
}

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

.nav a {
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  padding: 7px 10px;
}

.nav a:hover,
.nav a.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 22px 64px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: center;
  margin-bottom: 30px;
}

.page-head.compact {
  grid-template-columns: minmax(0, 1fr);
}

.eyebrow {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.16;
}

h1 {
  margin: 0;
  font-size: 38px;
  max-width: 820px;
}

h2 {
  margin: 0 0 16px;
  font-size: 25px;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lead {
  max-width: 790px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.system-map {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.panel.soft {
  background: var(--surface-alt);
}

.panel h2:last-child,
.panel h3:last-child,
.panel p:last-child,
.panel ul:last-child,
.panel ol:last-child {
  margin-bottom: 0;
}

.doc-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.05);
}

.doc-card:hover {
  border-color: #9bb8b3;
  text-decoration: none;
}

.doc-card p {
  color: var(--muted);
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  margin-top: 34px;
}

.main [id] {
  scroll-margin-top: 92px;
}

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

.section-heading h2,
.section-heading p {
  margin-bottom: 0;
}

.section-heading p {
  max-width: 620px;
  color: var(--muted);
}

.app-previews {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 18px;
}

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

.presentation-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.05);
}

.presentation-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  object-fit: contain;
}

.presentation-copy {
  padding: 20px;
}

.presentation-copy h2,
.presentation-copy h3 {
  margin-bottom: 9px;
}

.presentation-copy > p:not(.eyebrow),
.presentation-list {
  color: var(--muted);
}

.presentation-list {
  padding-left: 20px;
}

.presentation-list li + li {
  margin-top: 7px;
}

.presentation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.app-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.05);
}

.app-preview:hover {
  border-color: #9bb8b3;
  text-decoration: none;
}

.app-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  object-position: top;
}

.app-preview.desktop img {
  aspect-ratio: 8 / 5;
}

.app-preview.mobile img {
  aspect-ratio: 43 / 56;
}

.app-preview-copy {
  padding: 14px 16px 16px;
}

.app-preview-copy strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.app-preview-copy span {
  color: var(--muted);
  font-size: 13px;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.guide-link {
  border-bottom: 2px solid var(--brand);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  padding: 8px 2px 6px;
}

.guide-link:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

.download-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  margin-top: 30px;
  padding: 24px;
}

.download-band h2,
.download-band p {
  margin: 0;
}

.download-band p {
  max-width: 700px;
  color: var(--muted);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.download-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 14px;
  text-align: center;
}

.download-action.secondary {
  background: var(--surface);
  color: var(--brand-dark);
}

.download-action:hover {
  background: var(--brand-dark);
  color: #ffffff;
  text-decoration: none;
}

.download-meta {
  margin-top: 8px !important;
  font-size: 13px;
}

.guide-section {
  margin-top: 46px;
}

.guide-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.guide-section-head h2,
.guide-section-head p {
  margin: 0;
}

.guide-section-head p {
  max-width: 650px;
  color: var(--muted);
}

.guide-section-head a {
  font-size: 14px;
  font-weight: 800;
}

.guide-step {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.5fr);
  gap: 28px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}

.guide-step.reverse {
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
}

.guide-step.mobile {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.guide-copy {
  min-width: 0;
}

.guide-copy h3 {
  font-size: 23px;
}

.guide-copy p,
.guide-copy li {
  color: var(--muted);
}

.guide-copy ol,
.guide-copy ul {
  padding-left: 22px;
}

.guide-copy li + li {
  margin-top: 8px;
}

.step-label {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screenshot-figure {
  min-width: 0;
  margin: 0;
}

.screenshot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screenshot.mobile {
  max-width: 430px;
}

.screenshot-figure figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.usage-item {
  border-top: 3px solid var(--brand);
  background: var(--surface);
  padding: 16px;
}

.usage-item h3 {
  font-size: 16px;
}

.usage-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

th {
  background: #eef3f2;
  color: #334155;
  font-size: 13px;
  text-transform: uppercase;
}

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

.phase-list {
  display: grid;
  gap: 14px;
}

.phase {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.phase-title {
  margin: 0;
  font-size: 19px;
}

.progress {
  width: 180px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--brand);
  transition: width 0.2s ease;
}

.checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.check-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink);
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand);
}

.check-item span {
  color: var(--muted);
}

.notice {
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  background: #fffbeb;
  color: #78350f;
  padding: 14px 16px;
}

.ok {
  color: var(--ok);
  font-weight: 800;
}

.risk {
  color: var(--danger);
  font-weight: 800;
}

.brand-identity-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(440px, 1.15fr);
  gap: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #eef3f2;
  padding: 34px;
}

.brand-logo-stage {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 34px;
}

.brand-logo-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-logo-stage figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.brand-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.brand-status {
  border: 1px solid #9bb8b3;
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

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

.brand-preview {
  display: flex;
  min-width: 0;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 24px;
}

.brand-preview.dark {
  border-color: #183247;
  background: #0b1f30;
  color: #f7f5f0;
}

.brand-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-preview figcaption {
  display: grid;
  gap: 2px;
  margin-top: 16px;
}

.brand-preview figcaption span {
  color: var(--muted);
  font-size: 13px;
}

.brand-preview.dark figcaption span {
  color: #b8c5c9;
}

.brand-size-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.brand-size-sample {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.brand-size-sample img {
  display: block;
  flex: 0 0 auto;
}

.brand-size-sample figcaption {
  display: grid;
  gap: 2px;
}

.brand-size-sample figcaption span {
  color: var(--muted);
  font-size: 13px;
}

.brand-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.brand-swatch {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 0 16px 16px;
}

.brand-swatch-color {
  height: 112px;
  margin: 0 -16px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-swatch h3 {
  margin-bottom: 6px;
}

.brand-swatch code {
  font-weight: 800;
}

.brand-swatch p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.tone-trust {
  background: #0f766e;
}

.tone-midnight {
  background: #0b1f30;
}

.tone-saffron {
  background: #ffb82e;
}

.tone-sand {
  background: #f7f5f0;
}

.tone-white {
  background: #ffffff;
}

.tone-success {
  background: #15803d;
}

.tone-danger {
  background: #b91c1c;
}

.tone-info {
  background: #1d4ed8;
}

.brand-contrast-table {
  margin-top: 18px;
}

.brand-type-sample {
  display: grid;
  gap: 8px;
  border-left: 4px solid var(--accent);
  background: #fff8e7;
  font-family: Cairo, "Noto Sans Arabic", ui-sans-serif, system-ui, sans-serif;
  margin: 18px 0;
  padding: 18px;
}

.brand-type-sample strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.25;
}

.brand-type-sample span {
  color: var(--brand-dark);
  font-size: 22px;
  font-weight: 700;
}

.brand-rule {
  border-top-width: 4px;
}

.brand-rule.positive {
  border-top-color: var(--ok);
}

.brand-rule.negative {
  border-top-color: var(--danger);
}

.brand-rule ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.brand-rule li + li {
  margin-top: 7px;
}

.brand-final-status {
  border-left-color: var(--brand);
  background: #e7f3f0;
  color: var(--ink);
}

.brand-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.brand-asset-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.brand-asset-card:hover {
  background: #eef3f2;
  text-decoration: none;
}

.brand-asset-card strong {
  color: var(--ink);
}

.brand-asset-card span {
  color: var(--muted);
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  margin-top: 46px;
  padding-top: 18px;
}

code {
  border-radius: 5px;
  background: #edf2f7;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.93em;
  padding: 2px 5px;
}

pre {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101827;
  color: #f8fafc;
  padding: 16px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

@media (max-width: 900px) {
  .topbar-inner,
  .page-head,
  .grid.cols-2,
  .grid.cols-3,
  .status-strip,
  .app-previews,
  .presentation-grid,
  .download-band,
  .guide-step,
  .guide-step.reverse,
  .guide-step.mobile,
  .usage-grid,
  .brand-identity-hero,
  .brand-preview-grid,
  .brand-size-grid {
    grid-template-columns: 1fr;
  }

  .brand-identity-hero {
    padding: 24px;
  }

  .topbar-inner {
    display: grid;
  }

  .nav {
    justify-content: flex-start;
  }

  .section-heading,
  .guide-section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  h1 {
    font-size: 31px;
  }

  .phase-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress {
    width: 100%;
  }

  .screenshot.mobile {
    margin: 0 auto;
  }

  .download-actions {
    justify-content: flex-start;
  }

  .download-action {
    width: 100%;
  }

  .main [id] {
    scroll-margin-top: 190px;
  }
}
