/* compass-public-visual-system: uxhc-v1 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');

/* ── Tokens ─────────────────────────────────────────── */
:root {
  color-scheme: light;

  --bg:        #f7faf7;
  --paper:     #ffffff;
  --panel:     #ffffff;
  --ink:       #17211f;
  --muted:     #5f6f6a;
  --teal:      #0f766e;
  --teal-dark: #0b5f59;
  --teal-lt:   rgba(15, 118, 110, 0.08);
  --coral:     #d95f43;
  --leaf:      #527a39;
  --gold:      #d99c2b;
  --line:      #d9e5df;
  --soft:      #eef6f1;
  --danger:    #9f2d20;

  --shadow:    0 2px 8px rgba(23, 33, 31, 0.06);
  --shadow-md: 0 6px 20px rgba(23, 33, 31, 0.10);
  --shadow-lg: 0 18px 50px rgba(23, 33, 31, 0.12);

  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Space Grotesk', ui-sans-serif, system-ui, sans-serif;

  --container:  min(1120px, calc(100% - 32px));
  --radius:     8px;
  --site-nav-h: 52px;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.07) 0%, transparent 400px),
    var(--bg);
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

/* ── Progress bar ───────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--coral) 100%);
  z-index: 600;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Site nav ───────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 400;
  height: var(--site-nav-h);
  background: rgba(247, 250, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-nav-inner {
  width: var(--container);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--teal-dark);
  text-decoration: none;
  flex-shrink: 0;
  padding: 5px 8px;
  border-radius: var(--radius);
  transition: background 0.14s;
}

.site-nav-brand:hover { background: var(--teal-lt); }

.site-nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.site-nav-brand span { white-space: nowrap; }

.site-nav-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  flex-shrink: 0;
  margin: 0 6px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}

.site-nav-links::-webkit-scrollbar { display: none; }

.site-nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}

.site-nav-link:hover { background: var(--teal-lt); color: var(--teal-dark); }

.site-nav-link[aria-current="page"] { background: var(--soft); color: var(--teal-dark); }

.site-nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: var(--paper);
  color: var(--teal-dark);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
}

.site-nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 12px;
  display: inline-block;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.site-nav-toggle-icon::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  border-top: 2px solid currentColor;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  width: var(--container);
  margin: 0 auto;
  padding: 52px 0 36px;
}

.hero-lockup {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.hero-badge {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.hero-id { display: grid; gap: 8px; align-content: start; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 12px;
  background: var(--soft);
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-lead {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 700px;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ── Page nav (sticky tab bar) ──────────────────────── */
.page-nav-wrap {
  position: sticky;
  top: var(--site-nav-h);
  z-index: 300;
  background: rgba(247, 250, 247, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.page-nav-inner {
  width: var(--container);
  margin: 0 auto;
  position: relative;
}

.section-nav-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--paper);
  color: var(--teal-dark);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
}

.section-nav-toggle::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.8rem;
  transition: transform 0.16s ease;
}

.section-nav-toggle[aria-expanded="true"]::after { transform: rotate(-180deg); }

.section-nav-current {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.tab-nav {
  display: flex;
  gap: 2px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar { display: none; }

.tab-nav button {
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  min-height: 36px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}

.tab-nav button:hover { background: var(--teal-lt); color: var(--teal-dark); }

.tab-nav button[aria-selected="true"] {
  background: var(--soft);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1.5px var(--teal);
}

/* ── Tab panels ─────────────────────────────────────── */
.tab-panel[hidden] { display: none; }
.tab-panel { animation: fade-up 160ms ease-out; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Main layout ────────────────────────────────────── */
main {
  width: var(--container);
  margin: 0 auto;
  padding: 24px 0 64px;
}

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin-top: 0;
  letter-spacing: -0.01em;
}

h2 { font-size: 1.32rem; line-height: 1.25; margin-bottom: 10px; }
h3 { font-size: 1.04rem; margin-bottom: 8px; }

p { margin-top: 0; margin-bottom: 12px; font-family: var(--font-body); }

a {
  color: var(--teal-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
  transition: color 0.12s;
}

a:hover { color: var(--teal); }

/* ── Focus ──────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Eyebrow ────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ── Tags / Pills ───────────────────────────────────── */
.tag, .status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px 10px;
  background: var(--soft);
  color: var(--teal-dark);
  font-family: var(--font-display);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ── Screen reader only ─────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Grid ───────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  min-width: 0;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
  transition: box-shadow 0.18s, transform 0.18s;
}

.card:not(.download-chooser):not(.notice):hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card p:last-child,
.card ol:last-child,
.card table:last-child,
.card textarea:last-child { margin-bottom: 0; }

.notice { border-left: 4px solid var(--gold); }
.download-chooser { border-left: 4px solid var(--teal); }

/* ── Chooser grid ───────────────────────────────────── */
.chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.chooser-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  transition: box-shadow 0.15s, transform 0.15s;
}

.chooser-grid div:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.chooser-grid strong { display: block; margin-bottom: 5px; color: var(--ink); font-family: var(--font-display); }
.chooser-grid span { display: block; color: var(--muted); font-family: var(--font-body); font-size: 0.9rem; }

/* ── Buttons ────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 4px 8px 4px 0;
  border: 1.5px solid var(--teal);
  border-radius: var(--radius);
  padding: 10px 16px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.14s, color 0.14s;
}

.button:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: #fff;
}

.button.secondary { background: var(--paper); color: var(--teal-dark); }
.button.secondary:hover { background: var(--soft); border-color: var(--teal-dark); transform: translateY(-1px); }

.button.ghost, .button.quiet { background: transparent; color: var(--teal-dark); }
.button.ghost:hover, .button.quiet:hover { background: var(--teal-lt); transform: translateY(-1px); }

.button.disabled, .button:disabled {
  background: #e4ebe7;
  border-color: #a9b8b2;
  color: #5e6f68;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Table ──────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }

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

th { font-family: var(--font-display); font-weight: 800; }

tr:hover td { background: var(--teal-lt); }

/* ── Code ───────────────────────────────────────────── */
code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #edf5f0;
  color: var(--teal-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.93em;
}

/* ── Textarea ───────────────────────────────────────── */
textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfdfb;
  color: var(--ink);
  font: 0.94rem/1.52 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.prompt-card textarea { min-height: 330px; }

/* ── Accordion / details ────────────────────────────── */
details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  min-width: 0;
  overflow: hidden;
}

summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 11px 16px;
  list-style: none;
  user-select: none;
  overflow-wrap: anywhere;
  gap: 8px;
  transition: background 0.12s;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '▾';
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 0.18s;
  display: inline-block;
}

details[open] summary::after { transform: rotate(-180deg); }
summary:hover { background: var(--teal-lt); }
details > :not(summary) { padding: 0 16px 14px; }

/* ── Example card ───────────────────────────────────── */
.example-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1.05fr);
  gap: 20px;
  align-items: start;
}

.example-screenshot {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.example-output { margin: 0 0 18px; }

.example-output-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

/* ── Example switcher ───────────────────────────────── */
.example-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.example-switcher button {
  appearance: none;
  min-height: 36px;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.example-switcher button:hover { background: var(--teal-lt); color: var(--teal-dark); }

.example-switcher button[aria-selected="true"] {
  background: var(--soft);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1.5px var(--teal);
}

.example-panel[hidden] { display: none; }

/* ── Report selector ────────────────────────────────── */
.report-link-grid { align-items: stretch; }

.report-snapshot-stack { display: grid; gap: 18px; margin: 0 0 18px; }

.report-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.report-selector button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.report-selector button:hover { background: var(--soft); border-color: var(--teal); }

.report-selector button[aria-pressed="true"] {
  border-color: var(--teal);
  background: var(--soft);
  color: var(--teal-dark);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.report-frame {
  display: block;
  width: 100%;
  height: 720px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

/* ── Author card ────────────────────────────────────── */
.author-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  align-items: start;
}

.author-photo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.about-link { margin: 0 0 24px; }
.section-heading { margin: 0 0 18px; }

/* ── Tool breakdown ─────────────────────────────────── */
.tool-breakdown dt { margin: 14px 0 6px; font-weight: 800; font-family: var(--font-display); }
.tool-breakdown dd {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  font-family: var(--font-body);
}

/* ── Footer ─────────────────────────────────────────── */
.suite-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  background: var(--paper);
}

.suite-footer-inner {
  width: var(--container);
  margin: 0 auto;
}

.suite-footer-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  padding: 24px;
}

.suite-footer-note { margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--line); font-family: var(--font-body); color: var(--muted); font-size: 0.9rem; }
.suite-footer-heading { margin: 0 0 4px; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 0.95rem; }
.suite-footer-purpose, .suite-footer-legal { margin: 0; font-family: var(--font-body); color: var(--muted); font-size: 0.88rem; }

.suite-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.suite-footer-group h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.71rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.suite-footer-links { display: grid; gap: 2px; }

.suite-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  width: fit-content;
  max-width: 100%;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  overflow-wrap: anywhere;
  transition: background 0.12s, color 0.12s;
}

.suite-footer-links a:hover { background: var(--teal-lt); color: var(--teal-dark); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 720px) {
  .site-nav {
    height: var(--site-nav-h);
    overflow: visible;
  }

  .site-nav-inner {
    position: relative;
    min-height: var(--site-nav-h);
  }

  .site-nav-toggle {
    display: inline-flex;
  }

  .site-nav-sep {
    display: none;
  }

  .site-nav-links {
    flex: none;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-md);
    padding: 6px;
  }

  .js-enabled .site-nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    overflow: visible;
  }

  .js-enabled .site-nav-links.is-open {
    display: grid;
  }

  html:not(.js-enabled) .site-nav {
    height: auto;
  }

  html:not(.js-enabled) .site-nav-inner {
    flex-wrap: wrap;
    padding: 6px 0;
  }

  html:not(.js-enabled) .site-nav-toggle,
  html:not(.js-enabled) .section-nav-toggle {
    display: none;
  }

  html:not(.js-enabled) .site-nav-links {
    display: grid;
    flex-basis: 100%;
  }

  .site-nav-link {
    width: 100%;
    min-height: 44px;
    align-items: center;
    display: flex;
    white-space: normal;
    padding: 10px 12px;
  }

  .section-nav-toggle {
    display: flex;
  }

  .js-enabled .tab-nav {
    display: none;
  }

  .js-enabled .tab-nav.is-open {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 0 0 8px;
    overflow: visible;
  }

  .tab-nav button {
    justify-content: flex-start;
    min-height: 44px;
    width: 100%;
    text-align: left;
    white-space: normal;
  }

  .hero { padding: 36px 0 24px; }
  .hero-lockup { gap: 14px; }
  .hero-badge { width: 52px; height: 52px; }

  .author-card { grid-template-columns: 1fr; }
  .example-card { grid-template-columns: 1fr; }
  .suite-footer-grid { grid-template-columns: 1fr; gap: 12px; }
  .report-frame { height: 560px; }
  .author-photo { width: 88px; height: 88px; }

  td, th { display: block; width: 100%; }
}

@media (max-width: 480px) {
  :root { --container: min(100%, calc(100% - 20px)); }
  .hero h1 { font-size: 1.75rem; }
  .hero-badge { width: 44px; height: 44px; }
}
