/* Policy Data Commons — shared styles. Light theme, TPP brand fonts. */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-hover: #efefec;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #16161a;
  --text-2: #55555e;
  --text-3: #8b8b94;
  --red: #FF0033;
  --blue: #1d5d9e;
  --green: #15803d;
  --amber: #b45309;
  --purple: #7B2D8E;
  --font-ui: 'Lexend', -apple-system, sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-ui); }
a { text-decoration: none; color: inherit; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--red); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; }
.brand small { font-weight: 300; color: var(--text-3); font-size: 12px; margin-left: 2px; }
.topnav { display: flex; gap: 26px; font-size: 13.5px; color: var(--text-2); align-items: center; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--text); font-weight: 500; }
.btn { display: inline-block; padding: 9px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; border: 1px solid var(--border-strong); background: var(--bg); font-family: var(--font-ui); }
.btn:hover { background: var(--bg-soft); }
.btn-primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn-primary:hover { background: #333; }

/* ---------- hero ---------- */
.hero { max-width: 880px; margin: 0 auto; padding: 72px 24px 44px; text-align: center; }
.hero .kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); font-weight: 500; margin-bottom: 18px; }
.hero h1 { font-family: var(--font-serif); font-weight: 400; font-size: 44px; line-height: 1.18; letter-spacing: -0.01em; }
.hero p { font-size: 16.5px; color: var(--text-2); margin: 20px auto 0; max-width: 620px; line-height: 1.65; font-weight: 300; }
.search-wrap { max-width: 640px; margin: 34px auto 0; }
.search-wrap input {
  width: 100%; padding: 15px 22px; font-size: 15px; font-family: var(--font-ui);
  border: 1px solid var(--border-strong); border-radius: 999px; outline: none; background: var(--bg);
}
.search-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,93,158,0.12); }
.hero .meta { margin-top: 16px; font-size: 12.5px; color: var(--text-3); }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 8px 24px 40px; }
.chip {
  font-size: 13px; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); color: var(--text-2); background: var(--bg); font-family: var(--font-ui);
}
.chip:hover { background: var(--bg-soft); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 0 40px 72px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 24px; }
.section-head a { font-size: 13px; color: var(--blue); }

/* ---------- featured ---------- */
.featured {
  display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: 16px; margin-bottom: 56px; background: var(--bg-soft);
}
.featured-body { padding: 38px 42px; }
.badge { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.badge-featured { background: rgba(255,0,51,0.08); color: var(--red); }
.featured h3 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; margin: 16px 0 12px; }
.featured p { font-size: 15px; color: var(--text-2); line-height: 1.7; font-weight: 300; }
.featured-stats { display: flex; gap: 34px; margin: 26px 0; }
.stat b { display: block; font-size: 22px; font-weight: 500; }
.stat span { font-size: 12px; color: var(--text-3); }
.featured-visual { background: #101014; padding: 34px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.fake-row { background: #1b1b21; border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.fake-row span { color: #d6d6dd; font-size: 13px; }
.fake-row em { font-style: normal; font-size: 11px; color: #6e6e78; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 9px; }

/* ---------- catalog cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 12px; background: var(--bg); transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.maintainer { font-size: 11.5px; color: var(--text-3); }
.card h3 { font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em; }
.card p { font-size: 13.5px; color: var(--text-2); line-height: 1.6; font-weight: 300; flex: 1; }
.access { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 5px; border: 1px solid var(--border); color: var(--text-2); }
.tag-mcp { border-color: rgba(123,45,142,0.35); color: var(--purple); }
.tag-api { border-color: rgba(29,93,158,0.35); color: var(--blue); }
.card-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; font-size: 12px; color: var(--text-3); }
.fresh { color: var(--green); }

/* ---------- how-it-works band ---------- */
.how { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-inner { max-width: 1120px; margin: 0 auto; padding: 64px 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.how-step .num { font-family: var(--font-serif); font-size: 30px; color: var(--red); }
.how-step h3 { font-size: 16px; font-weight: 500; margin: 12px 0 8px; }
.how-step p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; font-weight: 300; }

/* ---------- CTA + footer ---------- */
.submit-cta { max-width: 760px; margin: 0 auto; text-align: center; padding: 76px 24px; }
.submit-cta h2 { font-family: var(--font-serif); font-weight: 400; font-size: 30px; margin-bottom: 14px; }
.submit-cta p { font-size: 15px; color: var(--text-2); line-height: 1.7; font-weight: 300; margin-bottom: 28px; }
footer { border-top: 1px solid var(--border); padding: 34px 40px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); }
footer .links { display: flex; gap: 22px; }
footer a:hover { color: var(--text); }

/* ---------- product detail page ---------- */
.product-hero { max-width: 1120px; margin: 0 auto; padding: 48px 40px 32px; }
.crumbs { font-size: 12.5px; color: var(--text-3); margin-bottom: 22px; }
.crumbs a { color: var(--blue); }
.product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.product-head h1 { font-family: var(--font-serif); font-weight: 400; font-size: 36px; }
.product-head .sub { font-size: 15px; color: var(--text-2); font-weight: 300; margin-top: 10px; max-width: 640px; line-height: 1.65; }
.product-actions { display: flex; gap: 10px; flex-shrink: 0; }
.product-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; padding: 18px 22px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.product-meta div span { display: block; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.product-body { max-width: 1120px; margin: 0 auto; padding: 8px 40px 72px; display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: 22px; margin: 34px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 14.5px; color: var(--text-2); line-height: 1.75; font-weight: 300; margin-bottom: 12px; }
.prose ul { padding-left: 20px; font-size: 14.5px; color: var(--text-2); line-height: 1.75; font-weight: 300; }
.codeblock { background: #101014; color: #d6d6dd; border-radius: var(--radius); padding: 18px 20px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 1.7; overflow-x: auto; margin: 10px 0 18px; }
.codeblock .cm { color: #6e6e78; }
.sample-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 18px; }
.sample-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border-strong); }
.sample-table td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.side-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.side-card h3 { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 14px; }
.side-card .row { display: flex; justify-content: space-between; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.side-card .row:last-child { border-bottom: none; }
.side-card .row b { font-weight: 500; }
.changelog li { list-style: none; padding: 10px 0 10px 18px; border-left: 2px solid var(--border-strong); position: relative; font-size: 13px; color: var(--text-2); }
.changelog li b { display: block; color: var(--text); font-weight: 500; font-size: 12px; margin-bottom: 2px; }

/* ---------- docs page ---------- */
.docs-layout { max-width: 1120px; margin: 0 auto; padding: 48px 40px 72px; display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
.docs-nav { position: sticky; top: 90px; align-self: start; font-size: 13.5px; }
.docs-nav a { display: block; padding: 7px 12px; border-radius: 7px; color: var(--text-2); }
.docs-nav a:hover { background: var(--bg-soft); }
.docs-nav a.active { background: var(--bg-soft); color: var(--text); font-weight: 500; }
.docs-nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 18px 0 6px 12px; }
.docs-nav .group:first-child { margin-top: 0; }
.endpoint { display: flex; align-items: center; gap: 10px; margin: 22px 0 6px; }
.method { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 5px; background: rgba(21,128,61,0.1); color: var(--green); font-family: ui-monospace, monospace; }
.endpoint code { font-family: ui-monospace, monospace; font-size: 13.5px; }

/* ---------- forms (submit page) ---------- */
.form-wrap { max-width: 640px; margin: 0 auto; padding: 56px 24px 80px; }
.form-wrap h1 { font-family: var(--font-serif); font-weight: 400; font-size: 34px; margin-bottom: 12px; }
.form-wrap > p { font-size: 15px; color: var(--text-2); font-weight: 300; line-height: 1.7; margin-bottom: 34px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--text-3); font-weight: 300; margin-top: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; font-size: 14px; font-family: var(--font-ui);
  border: 1px solid var(--border-strong); border-radius: 8px; outline: none; background: var(--bg); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,93,158,0.12); }
.checks { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-2); }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 300; }
.notice { background: rgba(180,83,9,0.07); border: 1px solid rgba(180,83,9,0.25); color: var(--amber); border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 28px; }

/* ---------- page hero (about/docs) ---------- */
.page-hero { max-width: 880px; margin: 0 auto; padding: 64px 24px 20px; text-align: center; }
.page-hero h1 { font-family: var(--font-serif); font-weight: 400; font-size: 38px; }
.page-hero p { font-size: 16px; color: var(--text-2); margin: 16px auto 0; max-width: 600px; line-height: 1.7; font-weight: 300; }

@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured-visual { display: none; }
  .how-inner { grid-template-columns: 1fr; gap: 28px; }
  .topnav { display: none; }
  .hero h1 { font-size: 32px; }
  .product-body { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
}
