:root {
  --idp-orange: #FC6401;
  --idp-black: #000000;
  --idp-white: #FFFFFF;
  --idp-grey: #F1F1F1;
  --idp-orange-tint-1: #FFC39D;
  --idp-orange-tint-2: #FFE1CE;
  --ink: #000000;
  --ink-soft: #3d3d3d;
  --rule: #dcdcdc;
  --night: #0b0b0c;
  --night-2: #17171a;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 72ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--idp-white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--idp-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--idp-orange); }
:focus-visible { outline: 3px solid var(--idp-orange); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--idp-white); padding: 8px 12px; z-index: 20; }

/* Top bar */
.top { background: var(--night); color: var(--idp-white); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #26262a; }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--idp-white); flex-shrink: 0; }
.brand img { display: block; width: 148px; height: auto; }
.brand-sub { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #c9c9c9; border-left: 1px solid #3a3a3f; padding-left: 14px; }
.top nav { margin-left: auto; display: flex; gap: 2px; }
.top nav a { color: #e6e6e6; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 9px; white-space: nowrap; border-radius: 6px; }
.top nav a:hover { color: var(--idp-white); background: var(--night-2); }
.top nav a[aria-current="page"] { color: var(--idp-white); box-shadow: inset 0 -3px 0 var(--idp-orange); border-radius: 0; }
.menu { display: none; margin-left: auto; background: none; border: 1px solid #4a4a50; color: var(--idp-white); font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 6px; }

/* Hero */
.hero { background: var(--night); color: var(--idp-white); padding: 72px 0 80px; }
.hero .eyebrow { color: var(--idp-orange); }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 20px; max-width: 18ch; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--idp-orange); }
.hero p.lede { font-size: 20px; line-height: 1.5; color: #dedede; max-width: 60ch; margin: 0 0 28px; }
.hero code { background: #232327; color: var(--idp-white); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.token { margin: 0; white-space: pre; background: var(--night-2); border: 1px solid #2c2c31; border-radius: 12px; padding: 20px 22px; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #e9e9e9; overflow-x: auto; }
.token .k { color: #a9a9a9; }
.token .hl { color: var(--idp-orange); font-weight: 700; }
.token-cap { font-size: 13px; color: #b5b5b5; margin: 12px 2px 0; }

.page-head { background: var(--idp-grey); padding: 48px 0 40px; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 12px; font-weight: 800; max-width: 24ch; }
.page-head p { font-size: 19px; color: var(--ink-soft); max-width: var(--measure); margin: 0; }

.eyebrow, .page-head p.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.eyebrow::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--idp-orange); margin-right: 10px; }
.hero .eyebrow::before { display: none; }

/* Sections */
section.band { padding: 56px 0; }
section.band.grey { background: var(--idp-grey); }
section.band + section.band { border-top: 1px solid var(--rule); }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 16px; font-weight: 800; }
h3 { font-size: 19px; line-height: 1.3; margin: 32px 0 8px; font-weight: 700; }
p, ul, ol { max-width: var(--measure); margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 8px; }
li::marker { color: var(--idp-orange); font-weight: 700; }
strong { font-weight: 700; }
code { font-family: var(--mono); font-size: .88em; background: var(--idp-grey); padding: 1px 5px; border-radius: 4px; }
.grey code, .page-head code { background: #e2e2e2; }
pre.code { font-family: var(--mono); font-size: 14px; line-height: 1.6; background: var(--night); color: #ececec; padding: 18px 20px; border-radius: 10px; overflow-x: auto; margin: 0 0 20px; max-width: 860px; }
pre.code code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; font-weight: 700; font-size: 15px; text-decoration: none; padding: 12px 18px; border-radius: 8px; border: 2px solid var(--idp-orange); }
.btn.primary { background: var(--idp-orange); color: var(--idp-black); }
.btn.primary:hover { background: var(--idp-orange-tint-1); border-color: var(--idp-orange-tint-1); color: var(--idp-black); }
.btn.ghost { color: var(--idp-white); border-color: #55555b; }
.btn.ghost:hover { border-color: var(--idp-orange); color: var(--idp-white); }

/* Cards and steps */
.grid { display: grid; gap: 20px; margin: 24px 0 8px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--idp-white); border: 1px solid var(--rule); border-radius: 12px; padding: 22px; }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--idp-orange); color: var(--idp-black); font-weight: 800; font-size: 15px; margin-bottom: 12px; }
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--idp-orange); color: var(--ink); box-shadow: 0 0 0 1px var(--idp-orange); }
a.card .go { font-weight: 700; font-size: 14px; color: var(--ink); border-bottom: 2px solid var(--idp-orange); }
.callout { background: var(--idp-orange-tint-2); border-left: 5px solid var(--idp-orange); border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 24px 0; max-width: 860px; }
.callout p { max-width: none; }
.callout p:last-child { margin-bottom: 0; }
.stat { font-size: 40px; font-weight: 800; line-height: 1; color: var(--idp-orange); margin-bottom: 8px; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 20px 0 24px; border: 1px solid var(--rule); border-radius: 10px; background: var(--idp-white); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
thead th { background: var(--night); color: var(--idp-white); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #fafafa; }
td.id, th.id { white-space: nowrap; font-weight: 700; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--ink); white-space: nowrap; }
.pill.done { background: var(--idp-orange); border-color: var(--idp-orange); color: var(--idp-black); }
.pill.part { background: var(--idp-orange-tint-2); border-color: var(--idp-orange); }
.pill.prop { background: var(--idp-white); }

/* Diagrams */
figure.diagram { margin: 24px 0 28px; background: var(--idp-white); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; overflow-x: auto; }
figure.diagram pre.mermaid { margin: 0; text-align: center; font-family: var(--mono); font-size: 12px; white-space: pre; color: #777; }
figure.diagram pre.mermaid[data-processed] { color: inherit; }
figure.diagram svg { max-width: 100%; height: auto; }
figure.diagram.wide svg { min-width: 1000px; }
figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 12px; max-width: var(--measure); }

/* Next link and footer */
.next-row { padding-top: 8px; padding-bottom: 56px; }
a.next { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; font-weight: 800; font-size: 20px; border: 2px solid var(--ink); border-radius: 10px; padding: 14px 20px; }
a.next span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--idp-orange); }
a.next:hover { border-color: var(--idp-orange); color: var(--ink); }
.home .next-row { display: none; }
.foot { background: var(--night); color: #cfcfcf; padding: 40px 0; font-size: 14px; }
.foot-row { display: flex; gap: 32px; align-items: flex-start; }
.foot img { width: 148px; flex-shrink: 0; margin-top: 2px; }
.foot p { margin: 0; max-width: 78ch; }

@media (max-width: 1180px) {
  .brand-sub { display: none; }
}
@media (max-width: 920px) {
  .hero-grid, .grid.two, .grid.three, .grid.four { grid-template-columns: minmax(0, 1fr); }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu { display: block; }
  .top-row { flex-wrap: wrap; }
  .top nav { display: none; width: 100%; margin: 0; padding: 4px 0 14px; flex-direction: column; }
  .top nav.open { display: flex; }
  .top nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--idp-orange); }
  .hero { padding: 48px 0 56px; }
  .foot-row { flex-direction: column; gap: 16px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .grid.four { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
}
@media print {
  .top, .foot, .next-row, .menu { display: none; }
  section.band { padding: 20px 0; }
}
