/* ============================================================
   Intent Solutions partner portal theme.
   Anthropic-docs-style sidebar layout, light, no JS frameworks.
   Booktabs-aesthetic tables (top + header-separator + bottom rules,
   no inner grid, no striping). Single accent color.
   ============================================================ */

/* --- Design tokens ------------------------------------------ */

:root {
  /* Surfaces */
  --bg:           #ffffff;
  --bg-alt:       #f7f7f5;
  --bg-code:      #f4f4f1;

  /* Text */
  --text:         #18181b;
  --text-muted:   #6b7280;
  --text-faint:   #a1a1aa;

  /* Rules */
  --rule:         #e5e5e0;
  --rule-strong:  #18181b;

  /* Accent */
  --accent:       #2563eb;
  --accent-hover: #1d4ed8;

  /* Type */
  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Layout */
  --sidebar-w:    260px;
  --content-max:  880px;
  --body-max:     1400px;

  /* Counter for booktabs "Table N." captions */
  counter-reset: table-counter;
}

/* --- Reset / base ------------------------------------------- */

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

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

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

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* --- Layout grid -------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  max-width: var(--body-max);
  margin: 0 auto;
  min-height: 100vh;
}

.main {
  padding: 40px 48px 80px;
  min-width: 0;
}

.main > * {
  max-width: var(--content-max);
}

/* --- Sidebar ------------------------------------------------ */

.sidebar {
  border-right: 1px solid var(--rule);
  background: var(--bg);
}

.sidebar-inner {
  position: sticky;
  top: 0;
  padding: 32px 24px 24px 32px;
  max-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.brand:hover { text-decoration: none; color: var(--text); }

.partner-badge {
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: 6px;
}
.partner-label {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.partner-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.section-nav .nav-heading {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.section-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.section-nav li { margin: 0; }
.section-nav a {
  display: block;
  padding: 6px 10px;
  margin: 0 -10px;
  color: var(--text);
  font-size: 14px;
  border-radius: 4px;
  border-left: 2px solid transparent;
}
.section-nav a:hover {
  background: var(--bg-alt);
  text-decoration: none;
}
.section-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--bg-alt);
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--text-faint);
  font-size: 12px;
}
.sidebar-footer p { margin: 0; }

/* --- Deliverable header ------------------------------------- */

.deliverable-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.breadcrumb {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }

.deliverable h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.summary {
  margin: 16px 0 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
}

/* --- Deliverable actions (Download PDF, etc.) -------------- */

.deliverable-actions {
  margin: 12px 0 24px;
}
.action-btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
}
.action-btn:hover {
  background: var(--bg-alt);
  text-decoration: none;
  color: var(--text);
}

/* --- Body typography ---------------------------------------- */

.deliverable-body h2 {
  margin: 2.5em 0 0.6em;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 700;
  scroll-margin-top: 16px;
}
.deliverable-body h3 {
  margin: 2em 0 0.5em;
  font-size: 18px;
  letter-spacing: -0.005em;
  font-weight: 600;
}
.deliverable-body h4 {
  margin: 1.6em 0 0.4em;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deliverable-body p { margin: 1em 0; }
.deliverable-body strong { font-weight: 600; }
.deliverable-body ul, .deliverable-body ol { padding-left: 1.5em; }
.deliverable-body li { margin: 0.4em 0; }

.deliverable-body blockquote {
  margin: 1.4em 0;
  padding: 0.4em 1em;
  border-left: 3px solid var(--rule-strong);
  color: var(--text-muted);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

/* --- Code --------------------------------------------------- */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--bg-code);
  border-radius: 3px;
  color: var(--text);
}
pre {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--bg-code);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.5;
}
pre code {
  padding: 0;
  background: transparent;
  font-size: 14px;
}

/* --- Tables — booktabs aesthetic ---------------------------- */

table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5em 0;
  width: 100%;
  font-size: 15px;
}

thead tr {
  border-top: 1.5px solid var(--rule-strong);
}
thead th {
  border-bottom: 1px solid var(--rule);
  padding: 0.7em 1em 0.7em 0;
  text-align: left;
  font-weight: 600;
  vertical-align: bottom;
  color: var(--text);
}
thead th:not(:last-child) { padding-right: 1.5em; }

tbody td {
  border-bottom: 1px solid transparent;
  padding: 0.6em 1em 0.6em 0;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
tbody td:not(:last-child) { padding-right: 1.5em; }
tbody tr:last-child td {
  border-bottom: 1.5px solid var(--rule-strong);
}

caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.6em;
  counter-increment: table-counter;
  font-size: 14px;
}
caption::before {
  content: "Table " counter(table-counter) ". ";
}

/* No striping. No inner vertical lines. By design. */

/* --- Deliverable card list (section landing) ---------------- */

.deliverable-list-heading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 36px 0 14px;
  padding: 0;
  border: 0;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 32px;
}

.card {
  padding: 20px 22px 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.card:hover {
  border-color: var(--rule-strong);
}

.card-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.card-top { justify-content: space-between; }

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-title a {
  color: var(--text);
  text-decoration: none;
}
.card-title a:hover {
  color: var(--accent);
}

.card-meta {
  margin: 4px 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.card-summary {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.card-action-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.card-action-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  text-decoration: none;
}
.card-action-secondary {
  color: var(--text);
  border-color: var(--rule-strong);
  background: var(--bg);
}
.card-action-secondary:hover {
  background: var(--bg-alt);
  text-decoration: none;
  color: var(--text);
}

/* --- Status pills (Closed / In flight / Upcoming) ----------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-closed {
  color: #166534;
  background: #dcfce7;
}
.status-in-flight, .status-in_flight {
  color: #92400e;
  background: #fef3c7;
}
.status-upcoming, .status-pending {
  color: #475569;
  background: #f1f5f9;
}

/* --- Curated links hub -------------------------------------- */

.links-hub {
  margin-top: 48px;
  padding: 24px 0 0;
  border-top: 1px solid var(--rule);
}
.links-hub h2 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.links-hub ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.links-hub li {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.links-hub li:last-child { border-bottom: 0; }
.links-hub a { color: var(--accent); }

/* --- Page footer -------------------------------------------- */

.page-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--text-faint);
  font-size: 12px;
}

/* --- Hero (root index) -------------------------------------- */

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
}
.hero {
  max-width: 540px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 36px;
  letter-spacing: -0.02em;
}
.hero-tagline {
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: 17px;
}
.hero-note {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
.hero-contact {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Reduced motion ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Print -------------------------------------------------- */

@media print {
  .sidebar, .page-footer { display: none; }
  .layout { display: block; }
  .main { padding: 0; }
  body { font-size: 11pt; }
  a { color: var(--text); text-decoration: underline; }
}

/* --- Mobile breakpoint -------------------------------------- */

@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .sidebar-inner {
    position: static;
    max-height: none;
    padding: 20px 24px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }
  .partner-badge { flex: 1; min-width: 200px; }
  .section-nav { width: 100%; }
  .main { padding: 24px; }
  .deliverable h1 { font-size: 26px; }
}
