/* Shared styles for the portal homepage. The scenario map keeps its own
   stylesheet in scenarios/index.html. */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --brand: #76063C;
  --brand-light: #9a1a5a;
  --brand-bg: rgba(118, 6, 60, 0.07);
  --sand: #E7E0C9;
  --text: #2b2b2b;
  --text-light: #5B6770;
  --line: #e5e2db;
  --bg: #fff;
  --bg-alt: #f7f6f3;
  --code-bg: #1f1d1b;
  --code-text: #f3efe6;
  --code-dim: #a69f92;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  --max: 1040px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:hover { color: var(--brand-light); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* --- Sections --- */
section { padding: 72px 0; }
section[id] { scroll-margin-top: 64px; }
section.alt { background: var(--bg-alt); }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(24px, 3.5vw, 30px); line-height: 1.2; font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.lead { font-size: 18px; color: var(--text-light); max-width: 720px; }
.section-head { margin-bottom: 30px; }
.section-head p { color: var(--text-light); max-width: 720px; }
.note { margin-top: 18px; color: var(--text-light); font-size: 15px; }
@media (max-width: 640px) { section { padding: 52px 0; } }

/* --- Hero --- */
.hero { padding: 76px 0 64px; }
.hero h1 { max-width: 820px; margin-bottom: 18px; }
.hero .lead { margin-bottom: 32px; }

/* --- Cards --- */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card p { color: var(--text-light); font-size: 15px; }
a.card.use { display: block; text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
a.card.use:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--text); }
.use .num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
}

/* --- Scenario links --- */
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; }
.linkrow a {
  font-size: 14px; font-weight: 600; text-decoration: none; color: #1f1f1f;
  background: var(--sand); padding: 8px 18px; border-radius: 50px;
}
.linkrow a:hover { background: var(--bg); color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }

/* --- Endpoint list --- */
code { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { background: var(--brand-bg); color: var(--brand); padding: 1px 6px; border-radius: 5px; }
.endpoints { list-style: none; border-top: 1px solid var(--line); }
.endpoints li {
  display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: baseline;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.endpoints a { text-decoration: none; }
.endpoints span { color: var(--text-light); font-size: 15px; }
@media (max-width: 680px) { .endpoints li { grid-template-columns: 1fr; gap: 4px; } }

/* --- Reference table --- */
table.ref { width: 100%; border-collapse: collapse; font-size: 15px; }
table.ref th { text-align: left; font-size: 13px; color: var(--text-light); font-weight: 600; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--line); }
table.ref td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ref td:first-child { white-space: nowrap; width: 1%; padding-right: 22px; }
@media (max-width: 560px) { table.ref td:first-child { white-space: normal; } }

/* --- Code block --- */
pre {
  background: var(--code-bg); color: var(--code-text); border-radius: var(--radius);
  padding: 20px 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.55;
}
pre code { font-size: inherit; }
pre .c { color: var(--code-dim); }

/* --- Steps --- */
.steps { padding-left: 22px; display: grid; gap: 8px; max-width: 760px; }
.steps li::marker { color: var(--brand); font-weight: 700; }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.contact-item:hover { border-color: var(--brand); color: var(--text); }
.contact-item svg { width: 26px; height: 26px; color: var(--brand); flex: none; }
.contact-item b { display: block; font-size: 15px; }
.contact-item span { font-size: 14px; color: var(--text-light); word-break: break-all; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 13px; color: var(--text-light); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer a { color: var(--text-light); }

/* --- Product map --- */
.map-h2 { font-size: 22px; margin: 40px 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
.map-h3 { font-size: 15px; color: var(--text-light); margin: 22px 0 6px; }
.map { list-style: none; }
.map li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.map li b { min-width: 190px; }
.map li a { font-size: 14px; text-decoration: none; }
.map .stage {
  font-size: 12px; font-weight: 700; color: #9a3412; background: #fde4d8;
  padding: 2px 8px; border-radius: 50px;
}
.map li .stage + a { margin-left: auto; }
.map li b + a { margin-left: auto; }
@media (max-width: 560px) { .map li b { min-width: 0; width: 100%; } .map li b + a, .map li .stage + a { margin-left: 0; } }
