/* HNA demos landing page (hna-demo root). Layout only: every colour, size and corner comes from the shared hnaconsole
   files. The one bold element is the flow schematic in the hero; everything else stays quiet. */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); font-family: var(--font); font-size: var(--fs-body); line-height: 1.55; }
a { color: inherit; }
[hidden] { display: none !important; }   /* shared classes like .hna-loading set display, which would beat the attribute */

/* Top bar: lockup left, account right; sits on --page with no rule (DESIGN.md "The shell"). */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); padding: 0 1.5rem; background: var(--page); }
.lockup { display: flex; align-items: center; gap: .625rem; height: 2rem; text-decoration: none; }
.hna-mark { display: block; flex: none; width: 3.125rem; height: 1.375rem; }
.hna-mark [fill="#1e3f66"] { fill: var(--brand-ink); } .hna-mark [stroke="#1e3f66"] { stroke: var(--brand-ink); }
.hna-mark [fill="#159a95"] { fill: var(--brand-teal); } .hna-mark [stroke="#159a95"] { stroke: var(--brand-teal); }
.lockup-hr { flex: none; width: 1px; height: 1.125rem; background: var(--hairline-strong); }
.veradigm-logo { width: 6.375rem; height: auto; background: var(--logo-tile); filter: var(--logo-filter); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }

/* Account menu: initials avatar, identity, theme, sign out. */
.acct { position: relative; }
.avatar { display: grid; place-items: center; flex: none; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; border-radius: 50%; background: var(--avatar-bg); color: var(--avatar-ink); font: inherit; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .02em; cursor: pointer; }
.avatar:hover, .avatar[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--page), 0 0 0 3.5px var(--ink); }
.avatar.lg { width: 2.25rem; height: 2.25rem; font-size: var(--fs-body); cursor: default; }
.avatar.lg:hover { box-shadow: none; }
.acct-menu { position: absolute; right: 0; top: calc(100% + .5rem); width: 17rem; padding: .75rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.acct-id { display: flex; gap: .75rem; align-items: center; padding-bottom: .75rem; border-bottom: 1px solid var(--hairline); }
.acct-name { font-weight: 600; }
.acct-role, .acct-email { font-size: var(--fs-small); color: var(--ink-2); overflow-wrap: anywhere; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .625rem 0; font-size: var(--fs-small); color: var(--ink-2); border-bottom: 1px solid var(--hairline); }
.acct-row select { font: inherit; font-size: var(--fs-small); color: var(--ink); background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--r); padding: .25rem .5rem; }
.acct-signout { width: 100%; margin-top: .625rem; padding: .5rem; font: inherit; font-size: var(--fs-small); color: var(--ink); text-align: left; background: transparent; border: 0; border-radius: var(--r); cursor: pointer; }
.acct-signout:hover { background: var(--row-hover); }

/* Page: four blocks, in order of what people came for. */
main { flex: 1; width: 100%; max-width: 64rem; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; box-sizing: border-box; outline: none; }
.intro { max-width: 40rem; margin-bottom: 2rem; }
.intro .greeting { margin-bottom: .75rem; }
.lead { margin: 0 0 .625rem; font-size: var(--fs-body-lg); line-height: 1.6; }
.sub { margin: 0; color: var(--ink-2); }

.block + .block { margin-top: 3rem; }
.block h2 { margin: 0 0 .25rem; font-size: var(--fs-title); font-weight: 600; }
.access { margin: 0 0 .875rem; font-size: var(--fs-small); color: var(--ink-3); }

/* Demos: one list, one icon style. */
.tool-list { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.tool { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: .875rem 1.25rem; text-decoration: none; }
.tool + .tool { border-top: 1px solid var(--hairline); }
.tool:hover { background: var(--row-hover); }
.tool-ico { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--r); background: var(--surface-2); color: var(--brand-ink); }
.tool-ico.ext { color: var(--ink-2); }
.tool-ico svg { width: 1.375rem; height: 1.375rem; }
.tool-name { margin: 0; font-size: var(--fs-body-lg); font-weight: 600; }
.tool-desc { margin: .125rem 0 0; font-size: var(--fs-small); color: var(--ink-2); }
.tool-note { font-size: var(--fs-small); color: var(--ink-3); }
.tool-go { display: grid; place-items: center; width: 1.5rem; color: var(--ink-3); }
.tool-go svg { width: 1.125rem; height: 1.125rem; }
.tool:hover .tool-go { color: var(--ink); }
.tool.locked .tool-go { opacity: .5; }

/* How it works: the steps come first in the markup (Tether is defined before the diagram uses it); the diagram shows on the left. */
.how { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; align-items: start; margin-top: 1rem; }
.flow { order: -1; margin: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.flow svg { display: block; width: 100%; height: auto; }
.flow text { fill: var(--ink-2); font-family: var(--font); font-size: var(--fs-body-lg); text-anchor: middle; }
.flow .t2, .flow .zone { fill: var(--ink-3); font-size: var(--fs-body); }
.flow .wl { fill: var(--ink-3); font-size: var(--fs-body); }
.flow .edge { stroke: var(--hairline-strong); stroke-width: 1; stroke-dasharray: 4 5; }
.flow .db { fill: var(--surface-2); stroke: var(--brand-ink); stroke-width: 1.5; }
.flow .db.ghost { fill: var(--surface); stroke: var(--hairline-strong); }
.flow .db-rim { fill: none; stroke: var(--brand-ink); stroke-width: 1.5; }
.flow .tether rect { fill: var(--surface); stroke: var(--brand-teal); stroke-width: 1.5; }
.flow .tether text { fill: var(--brand-teal); font-weight: 600; }
.flow .sink { fill: var(--surface-2); stroke: var(--brand-teal); stroke-width: 1.5; }
.flow .core { fill: var(--surface-2); stroke: var(--hairline-strong); stroke-width: 1.5; }
.flow .mk-ink { fill: var(--brand-ink); stroke: var(--brand-ink); }
.flow .mk-teal { fill: var(--brand-teal); stroke: var(--brand-teal); }
.flow .wire { fill: none; stroke: var(--hairline-strong); stroke-width: 1.5; }
.flow .arrow.out { fill: var(--brand-teal); } .flow .arrow.in { fill: var(--brand-ink); }
/* The pulse: a short dash travelling each wire. Out is teal, back in is ink. */
.flow .p { fill: none; stroke: var(--brand-teal); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 10 190; stroke-dashoffset: 200; animation: hna-flow 3s linear infinite; }
.flow .p.in { stroke: var(--brand-ink); animation-duration: 3.6s; animation-delay: -1.4s; }
.flow .d1 { animation-delay: -.8s; } .flow .d2 { animation-delay: -1.9s; }
@keyframes hna-flow { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .flow .p { animation: none; display: none; } }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.125rem; }
.steps li { position: relative; padding-left: 2.5rem; color: var(--ink-2); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-size: var(--fs-small); font-weight: 600; }
.steps b { display: block; margin-bottom: .125rem; color: var(--ink); font-weight: 600; }

/* Coming soon: below the demos and without a surface, so it never looks clickable; each item says what it does and what it changes. */
.soon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.soon li { display: flex; gap: 1rem; align-items: flex-start; padding-top: 1rem; border-top: 1px solid var(--hairline); }
.soon-ico { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); }
.soon-ico svg { width: 1.375rem; height: 1.375rem; }
.soon-ico .tl { stroke: var(--brand-teal); }
.soon h3 { margin: 0 0 .25rem; font-size: var(--fs-body-lg); font-weight: 600; }
.soon p { margin: 0; color: var(--ink-2); }

.err { max-width: 32rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.err-title { margin: 0 0 .5rem; font-size: var(--fs-title); }
.btn { font: inherit; font-size: var(--fs-small); font-weight: 600; padding: .5rem .875rem; color: var(--on-ink); background: var(--ink); border: 0; border-radius: var(--r); cursor: pointer; }
.btn:hover { background: var(--ink-hover); }

.foot-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; padding: 1rem; font-size: var(--fs-caption); color: var(--ink-3); }

/* The diagram needs width to keep its labels readable: stack it above the steps before the rest of the page stacks.
   Media-query rem is the browser default (16px), not the page root, so 72rem is about 1152px. Measured, not a typo. */
@media (max-width: 72rem) { .how { grid-template-columns: minmax(0, 1fr); } .flow { max-width: 44rem; } }
/* On a phone the labels would fall below 11px; the three steps say the same thing, so the diagram steps aside. */
@media (max-width: 36rem) { .flow { display: none; } }
@media (max-width: 60rem) {
  .soon { grid-template-columns: minmax(0, 1fr); }
  .tool { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tool .pill, .tool-note { grid-column: 2; justify-self: start; }
  .tool-go { grid-row: 1; grid-column: 3; }
}
