/* Shared styles for inner pages */
.page-hero { padding: 80px 0 48px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); font-variation-settings: "SOFT" 100, "WONK" 0; margin: 0 0 16px; line-height: 1.05; }
.page-hero .lead { margin-bottom: 0; }
.crumb { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 20px; display: flex; gap: 8px; }
.crumb a:hover { color: var(--ink); }
.nav-links a.current { color: var(--ink); }
.nav-links a.current::after { width: 100%; }
.page-section { padding: 64px 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.7rem; margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 14px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 16px 0 24px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.note { border-left: 3px solid var(--solar); background: var(--card); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; font-size: .95rem; }
.toc { position: sticky; top: 96px; align-self: start; font-size: .9rem; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--border); color: var(--muted); transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.on { color: var(--ink); border-color: var(--signal); }
.with-toc { display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
.pill-tag { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--border); color: var(--ink-2); }
.pill-tag.ok { background: #eaf6ee; color: #2d7a4f; border-color: #bfe3cc; }
.pill-tag.warn { background: #fdf1e0; color: #9a5d05; border-color: #f2d5a6; }
.pill-tag.bad { background: #fbe9e9; color: #a33a3a; border-color: #f0c2c2; }

/* ---- DOCS ---- */
.code { background: var(--dark); color: #e8e4dc; border-radius: 12px; overflow: hidden; margin: 14px 0 22px; font-size: .84rem; position: relative; }
.code-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--dark-2); border-bottom: 1px solid var(--border-dark); }
.code-tab { font-family: var(--mono); font-size: .75rem; padding: 4px 10px; border-radius: 6px; color: #b8b1a6; }
.code-tab.active { background: rgba(255,255,255,.1); color: #fff; }
.copy { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: #b8b1a6; padding: 4px 10px; border: 1px solid var(--border-dark); border-radius: 6px; transition: all .2s; }
.copy:hover { color: #fff; border-color: #fff; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); line-height: 1.6; display: none; }
.code pre.active { display: block; }
.tok-k { color: #f0a45d; } .tok-s { color: #9fd3b4; } .tok-c { color: #7d877d; font-style: italic; } .tok-n { color: #c9d3f5; }
.endpoint { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: .9rem; margin: 30px 0 8px; }
.method { font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 5px; background: var(--signal); color: #fff; }
.method.get { background: #2d7a4f; }
.try { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 20px 0 30px; }
.try-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.try input { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .9rem; background: var(--paper); }
.try-out { background: var(--dark); color: #9fd3b4; font-family: var(--mono); font-size: .8rem; padding: 14px; border-radius: 8px; min-height: 120px; white-space: pre-wrap; }

/* ---- CAREERS ---- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.value { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.value h3 { font-size: 1.15rem; }
.value p { font-size: .92rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: .85rem; transition: all .2s; }
.filter.active, .filter:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.roles { display: grid; gap: 10px; }
.role-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 20px 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; align-items: center; transition: transform .3s var(--ease), border-color .3s; }
.role-card:hover { transform: translateX(6px); border-color: var(--signal); }
.role-card h3 { font-size: 1.15rem; margin: 0; }
.role-card .meta { font-family: var(--mono); font-size: .78rem; color: var(--muted); display: flex; gap: 14px; }
.role-card .apply { grid-row: 1 / 3; color: var(--signal); font-weight: 600; font-size: .9rem; }
.role-card.hidden { display: none; }
.perks { columns: 2; gap: 40px; margin-top: 20px; }
.perks li { break-inside: avoid; padding: 10px 0 10px 24px; position: relative; color: var(--ink-2); border-bottom: 1px solid var(--border); }
.perks li::before { content: "◆"; position: absolute; left: 0; color: var(--solar); font-size: .6rem; top: 16px; }

/* ---- JOURNAL ---- */
.feature-post { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 32px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 40px; }
.post-art { aspect-ratio: 4/3; border-radius: 12px; background: linear-gradient(160deg, var(--signal), var(--lilac)); position: relative; overflow: hidden; }
.post-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.2) 1px, transparent 1px); background-size: 18px 18px; }
.post-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.post-art:has(img)::after { background: linear-gradient(180deg, transparent 55%, rgba(27,24,24,.35)); }
.post:hover .post-art img, .feature-post:hover .post-art img { transform: scale(1.05); }
.post-art.b { background: linear-gradient(160deg, var(--solar), #f2c78a); }
.post-art.c { background: linear-gradient(160deg, var(--ink), #5a524e); }
.post-art.d { background: linear-gradient(160deg, #2d7a4f, #9fd3b4); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post { display: flex; flex-direction: column; gap: 12px; transition: transform .3s var(--ease); }
.post:hover { transform: translateY(-4px); }
.post .post-art { aspect-ratio: 16/10; }
.post h3 { font-size: 1.25rem; margin: 0; }
.post-meta { font-family: var(--mono); font-size: .75rem; color: var(--muted); display: flex; gap: 12px; }
.post p { font-size: .92rem; }
.newsletter { display: flex; gap: 10px; max-width: 520px; margin-top: 16px; }
.newsletter input { flex: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border); font: inherit; background: var(--card); }

/* ---- SECURITY ---- */
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0 8px; }
.cert { padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.cert b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.4rem; }
.cert span { font-size: .8rem; color: var(--muted); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.control { padding: 20px 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.control::before { content: "✓"; color: #2d7a4f; font-weight: 700; }
.control b { display: block; margin-bottom: 4px; }
.control span { font-size: .9rem; color: var(--ink-2); }
.residency { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.region { padding: 22px; border-radius: 12px; background: var(--dark); color: var(--paper); }
.region .mono { color: var(--solar); }
.region h3 { color: var(--paper); margin: 6px 0 8px; }
.region p { color: #b8b1a6; font-size: .9rem; }

/* ---- PATIENT RIGHTS ---- */
.rights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
.right { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.right .mono { color: var(--solar); }
.right h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.right p { font-size: .92rem; margin: 0; }
.dash { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 24px; box-shadow: 0 30px 70px -40px rgba(27,24,24,.3); }
.dash-head { padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--paper); display: flex; justify-content: space-between; align-items: center; }
.grant { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 18px 20px; border-bottom: 1px solid var(--border); align-items: center; transition: opacity .4s, background .4s; }
.grant:last-child { border-bottom: 0; }
.grant b { font-size: 1rem; }
.grant .meta { font-family: var(--mono); font-size: .76rem; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.grant .btn { grid-row: 1 / 3; padding: 8px 16px; font-size: .85rem; }
.grant.revoked { background: var(--paper-2); }
.grant.revoked b { text-decoration: line-through; color: var(--muted); }
.grant.revoked .btn { background: transparent; color: var(--muted); border-color: var(--border); pointer-events: none; }
.btn-danger { border: 1px solid #e3b5b5; color: #a33a3a; background: #fff; }
.btn-danger:hover { background: #fbe9e9; }

/* ---- STATUS ---- */
.status-banner { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-radius: 12px; background: #eaf6ee; border: 1px solid #bfe3cc; color: #2d7a4f; font-weight: 600; margin-bottom: 30px; }
.status-banner .live-dot { background: #2d7a4f; } .status-banner .live-dot::after { border-color: #2d7a4f; }
.status-banner .mono { margin-left: auto; color: #4f8a66; }
.components { display: grid; gap: 10px; }
.component { padding: 18px 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; }
.component h3 { font-size: 1.05rem; margin: 0; font-family: var(--sans); font-weight: 600; }
.uptime { grid-column: 1 / -1; display: flex; gap: 2px; height: 30px; }
.uptime i { flex: 1; background: #9fd3b4; border-radius: 2px; transform: scaleY(0); transform-origin: bottom; animation: bar .5s var(--ease) forwards; }
.uptime i.p { background: #f2c78a; } .uptime i.d { background: #e3a1a1; }
@keyframes bar { to { transform: scaleY(1); } }
.uptime-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.metric { padding: 22px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.metric b { font-family: var(--serif); font-weight: 400; font-size: 2rem; display: block; }
.metric span { font-size: .85rem; color: var(--muted); }
.sparkline { height: 40px; margin-top: 10px; }
.sparkline path { fill: none; stroke: var(--signal); stroke-width: 2; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.incidents { margin-top: 40px; }
.incident { padding: 18px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 120px 1fr; gap: 20px; }
.incident .mono { color: var(--muted); }
.incident b { display: block; margin-bottom: 4px; }
.incident p { font-size: .92rem; margin: 0; }

/* ---- LOGIN ---- */
.auth { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--dark); color: var(--paper); padding: 72px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 20% 100%, rgba(11,38,114,.6), transparent 70%); }
.auth-side > * { position: relative; }
.auth-side blockquote { font-family: var(--serif); font-size: 1.6rem; line-height: 1.35; font-variation-settings: "SOFT" 100, "WONK" 1; margin: 0 0 20px; }
.auth-side cite { font-family: var(--mono); font-size: .8rem; color: #b8b1a6; font-style: normal; }
.auth-form { padding: 72px 64px; display: grid; align-content: center; justify-items: stretch; max-width: 520px; margin: 0 auto; width: 100%; }
.auth-form h1 { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; margin-bottom: 8px; }
.auth-form .sub { color: var(--muted); margin-bottom: 30px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--card); transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field.err input { border-color: #c95c5c; }
.field.err .hint { color: #a33a3a; }
.auth-form .btn { width: 100%; margin-top: 8px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; font-size: .8rem; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.sso { display: grid; gap: 8px; }
.auth-foot { margin-top: 24px; font-size: .85rem; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--signal); font-weight: 600; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0 16px; }
.otp input { text-align: center; font-family: var(--mono); font-size: 1.3rem; padding: 12px 0; }
.step { display: none; } .step.on { display: block; animation: fadeDown .4s var(--ease); }

/* ---- NEWS ---- */
.news-feature { margin-bottom: 36px; }
.funding-art { background: radial-gradient(600px 300px at 20% 0%, rgba(218,138,20,.5), transparent 60%), linear-gradient(160deg, var(--signal), #071a4d); display: grid; place-items: center; }
.funding-art::after { background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 18px 18px; }
.funding-mark { position: relative; z-index: 1; text-align: center; color: #fff; display: grid; gap: 4px; }
.funding-amt { font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1; font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.03em; }
.funding-by { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #f2c78a; }
.news-list { display: grid; gap: 10px; }
.news-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: start; padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s var(--ease); }
.news-item:hover { transform: translateX(6px); border-color: var(--signal); box-shadow: -6px 0 0 var(--signal); }
.news-date { color: var(--muted); padding-top: 4px; }
.news-item h3 { font-size: 1.3rem; margin: 8px 0 6px; }
.news-item p { font-size: .93rem; margin: 0; }
.news-item .apply { color: var(--signal); font-weight: 600; font-size: .9rem; padding-top: 4px; white-space: nowrap; }
@media (max-width: 700px) { .news-item { grid-template-columns: 1fr; gap: 8px; } }

/* ---- ARTICLE / USE CASE / ROLE extras ---- */
.article p { font-size: 1.08rem; line-height: 1.8; margin-bottom: 22px; }
.article p:first-child::first-letter { font-family: var(--serif); font-size: 3.4em; float: left; line-height: .85; margin: 6px 10px 0 0; color: var(--signal); }
.share { display: flex; gap: 14px; align-items: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.share a { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.share a:hover { color: var(--signal); }
.quote { margin: 40px auto 0; max-width: 760px; text-align: center; }
.quote p { font-family: var(--serif); font-size: 1.6rem; line-height: 1.35; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--ink); margin-bottom: 12px; }
.quote cite { font-family: var(--mono); font-size: .8rem; color: var(--muted); font-style: normal; }
.role-facts { display: grid; gap: 14px; padding: 20px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.role-facts div { display: grid; gap: 2px; }
.role-facts b { font-size: .95rem; }
.apply-form { margin-top: 10px; }
.apply-form input[type=file] { padding: 8px; }
.page-hero .post-meta { justify-content: flex-start; }

@media (max-width: 900px) {
  .with-toc { grid-template-columns: 1fr; } .toc { display: none; }
  .values, .posts, .certs, .metrics { grid-template-columns: 1fr 1fr; }
  .feature-post, .controls, .residency, .rights { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .perks { columns: 1; }
}
@media (max-width: 600px) {
  .values, .posts, .certs, .metrics { grid-template-columns: 1fr; }
  .auth-form { padding: 40px 24px; }
  .role-card { grid-template-columns: 1fr; } .role-card .apply { grid-row: auto; }
}
