:root {
  --bg: #f7f9fd;
  --bg2: #eef4fb;
  --card: rgba(255,255,255,.86);
  --card2: rgba(255,255,255,.96);
  --line: #dbe5f1;
  --text: #102033;
  --muted: #5f6f84;
  --accent: #0e7490;
  --accent2: #7c3aed;
  --gold: #d97706;
  --good: #15803d;
  --bad: #b91c1c;
  --shadow: 0 20px 55px rgba(35, 56, 85, .12);
  --soft-shadow: 0 10px 28px rgba(35, 56, 85, .10);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(14,116,144,.13), transparent 26rem),
    radial-gradient(circle at 84% 4%, rgba(124,58,237,.10), transparent 28rem),
    linear-gradient(180deg, var(--bg), var(--bg2));
}
a { color: inherit; }
.page-shell { width: min(1180px, calc(100% - 38px)); margin: 0 auto; padding: 28px 0 58px; }
.navbar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(18px); box-shadow: var(--soft-shadow);
  position: sticky; top: 14px; z-index: 10;
}
.brand { font-weight: 800; letter-spacing: .01em; text-decoration: none; display:flex; align-items:center; gap: 10px; }
.brand-dot { width: 12px; height: 12px; border-radius: 99px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 0 5px rgba(14,116,144,.10); }
.navlinks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.navlinks a, .pill-link {
  text-decoration: none; color: var(--muted); border: 1px solid transparent; border-radius: 999px;
  padding: 8px 12px; font-size: 14px;
}
.navlinks a:hover, .pill-link:hover { color: var(--text); border-color: var(--line); background: #fff; }
.hero { padding: 50px 0 26px; display: grid; grid-template-columns: 1.22fr .78fr; gap: 28px; align-items: stretch; }
.hero h1 { font-size: clamp(24px, 4.2vw, 40px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -.045em; max-width: 980px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; margin: 0 0 16px; }
.lead { font-size: clamp(15px, 1.7vw, 18px); line-height: 1.58; color: var(--muted); max-width: 760px; margin: 0; }
.hero-card, .glass-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.76));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-card { padding: 26px; display:flex; flex-direction: column; justify-content: space-between; min-height: 290px; overflow: hidden; position: relative; }
.hero-card::before { content:""; position:absolute; inset: -45% -25% auto auto; width: 280px; height:280px; background: radial-gradient(circle, rgba(14,116,144,.14), transparent 68%); }
.metric { display: grid; gap: 8px; position: relative; }
.metric strong { font-size: 48px; letter-spacing: -.04em; }
.metric span { color: var(--muted); line-height: 1.6; }
.cta-row { display:flex; flex-wrap:wrap; gap: 12px; margin-top: 24px; }
.button {
  appearance: none; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px;
  color: var(--text); text-decoration: none; background: #fff; font-weight: 760; cursor:pointer;
  box-shadow: 0 6px 14px rgba(15,23,42,.05);
}
.button.primary { background: linear-gradient(135deg, #0e7490, #2563eb); color: #fff; border-color: transparent; }
.button.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.button:disabled { opacity: .48; cursor:not-allowed; }
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,23,42,.10); }
.section { margin-top: 28px; }
.section-title { display:flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 16px; }
.section-title h2 { font-size: clamp(20px, 3vw, 30px); margin: 0; letter-spacing: -.04em; }
.section-title p { margin: 0; color: var(--muted); max-width: 650px; line-height: 1.55; }
.card-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.link-card {
  display:block; min-height: 172px; padding: 22px; border-radius: 22px; text-decoration:none;
  border: 1px solid var(--line); background: rgba(255,255,255,.86); box-shadow: var(--soft-shadow);
}
.link-card:hover { background: #fff; border-color: rgba(14,116,144,.40); transform: translateY(-2px); }
.link-card .tag { color: var(--accent); font-size: 12px; letter-spacing:.12em; text-transform: uppercase; font-weight: 850; }
.link-card h3 { font-size: 19px; letter-spacing: -.025em; margin: 20px 0 8px; }
.link-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.content-card { padding: 28px; }
.content-card p, .content-card li { color: var(--muted); line-height: 1.75; }
.content-card h1 { font-size: clamp(22px, 3.2vw, 34px); line-height: 1.08; letter-spacing: -.045em; margin: 0 0 14px; }
.content-card h2 { margin-top: 34px; }
.split { display:grid; grid-template-columns: .95fr 1.05fr; gap: 18px; }
.footer { margin-top: 42px; color: var(--muted); font-size: 14px; display:flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.codebox, pre { background: #f8fafc; color: #0f172a; border: 1px solid var(--line); border-radius: 16px; padding: 16px; overflow:auto; }
code { color: #0f172a; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 7px; padding: 1px 5px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.96); color: var(--text);
  border-radius: 14px; padding: 12px 13px; font: inherit; outline: none;
}
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: rgba(14,116,144,.7); box-shadow: 0 0 0 3px rgba(14,116,144,.12); }
label { display:block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.controls { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; align-items:end; }
.option-row { display:flex; flex-wrap: wrap; gap: 9px; margin: 10px 0 0; }
.option-chip { display:inline-flex; align-items:center; gap: 7px; border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 10px; color:var(--muted); font-size: 13px; }
.table-wrap { overflow-x:auto; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.74); }
table.data { width:100%; border-collapse: collapse; min-width: 1000px; }
table.data th { position: sticky; top: 0; background: #eaf3fb; color: var(--accent); text-align:left; font-size: 13px; letter-spacing:.08em; text-transform:uppercase; }
table.data th, table.data td { border-bottom: 1px solid #e5edf6; padding: 10px 12px; vertical-align: top; }
table.data td { color: #172033; }
table.data tr:hover td { background: #f8fbff; }
.notice { border: 1px solid #bae6fd; background: #f0f9ff; color: #075985; border-radius: 16px; padding: 14px 16px; line-height:1.55; }
.notice.good { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.notice.bad { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
@media (max-width: 920px) { .hero, .split { grid-template-columns: 1fr; } .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .controls { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .page-shell { width: min(100% - 24px, 1180px); } .navbar { border-radius: 22px; align-items:flex-start; flex-direction:column; position: static; } .card-grid { grid-template-columns: 1fr; } .controls { grid-template-columns: 1fr; } .hero { padding-top: 42px; } }


/* v5 refinements */
.page-title-small { font-size: clamp(24px, 3.8vw, 38px) !important; line-height: 1.12 !important; letter-spacing: -.045em !important; max-width: 980px; }
.newform-widget { position:relative; z-index:1; display:grid; gap:14px; }
.newform-kicker { color:var(--accent); text-transform:uppercase; letter-spacing:.12em; font-size:12px; font-weight:850; }
.newform-main { display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.newform-main strong { font-size:clamp(25px,4vw,42px); letter-spacing:-.05em; }
.newform-main span { color:var(--muted); font-weight:800; }
.newform-q { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; background:#f8fafc; border:1px solid var(--line); border-radius:14px; padding:10px 12px; font-size:12px; line-height:1.55; word-break:break-word; white-space:pre-line; }
.newform-values { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.newform-value { border:1px solid var(--line); border-radius:14px; padding:9px 10px; background:#fff; }
.newform-value small { display:block; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; margin-bottom:3px; }
.newform-value code { font-size:12px; white-space:normal; }
.hpdb-intro { display:grid; gap:16px; margin-bottom:22px; }
.hpdb-intro-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,.7fr); gap:16px; align-items:start; }
.hpdb-intro-card { background:#fff; border:1px solid #e8edf3; border-radius:12px; padding:18px; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.hpdb-intro-card h2 { margin:0 0 10px; font-size:21px; color:#555; font-weight:600; }
.hpdb-intro-card p, .hpdb-intro-card li { color:#555; font-size:15px; line-height:1.7; }
.hpdb-intro-card ol { padding-left:22px; margin:8px 0 0; }
.hpdb-formula { overflow-x:auto; background:#f5f7fa; border:1px solid #e9eef5; border-radius:10px; padding:10px 12px; margin:10px 0; color:#444; }
@media(max-width:800px){ .hpdb-intro-grid,.newform-values { grid-template-columns:1fr; } }

/* v8.1 mobile continuity refinements */
@media (max-width: 640px) {
  html, body { min-width: 0; overflow-x: hidden; }
  body {
    background:
      linear-gradient(145deg, rgba(248,245,255,.98) 0%, rgba(241,249,255,.98) 48%, rgba(238,244,251,.98) 100%);
    background-attachment: fixed;
    background-size: cover;
  }
  .page-shell {
    width: min(100% - 16px, 1180px);
    padding-left: 0;
    padding-right: 0;
  }
  .navbar {
    width: 100%;
    max-width: none;
    border-radius: 22px;
    padding: 13px;
  }
  .navbar .brand,
  .navbar .navlinks { width: 100%; }
  .navbar .navlinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .navbar .navlinks a {
    text-align: center;
    background: rgba(255,255,255,.72);
    border-color: rgba(219,229,241,.80);
  }
  .hero,
  .glass-card,
  .content-card { width: 100%; max-width: none; }
}
