/*
Theme Name: hipaa.chat
Theme URI: https://hipaa.chat
Description: Block child theme of Twenty Twenty-Five for hipaa.chat: a narrow hub on chat under HIPAA in the Chanty family (Figtree) with its own indigo voice — section-coloured pillars, router cards, no verdict cards and no forms. Managed by the content panel.
Template: twentytwentyfive
Version: 0.1.2
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: hipaa-chat
*/

/* ---------- layout ---------- */
.entry-content > * { max-width: var(--wp--style--global--content-size); margin-left: auto; margin-right: auto; }
.hx-wide .entry-content > * { max-width: var(--wp--style--global--wide-size); }
.entry-content a:not(.wp-element-button) { color: var(--wp--preset--color--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content a:not(.wp-element-button):hover { color: var(--wp--preset--color--accent-dark); }
.entry-content h2 { margin-top: 2.2em; padding-top: 0.2em; }
.entry-content h3 { margin-top: 1.6em; }
.entry-content > p:first-of-type { font-size: 1.15rem; color: var(--wp--preset--color--muted); }
.wp-block-post-title { max-width: var(--wp--style--global--wide-size); margin: 0.2em auto 0.6em; }

/* ---------- header ---------- */
.hx-header { background: var(--wp--preset--color--base); position: sticky; top: 0; z-index: 20; }
.hx-wordmark { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.1rem; color: var(--wp--preset--color--ink); text-decoration: none; letter-spacing: -0.01em; }
.hx-wordmark .hx-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px 9px 9px 2px; background: var(--wp--preset--color--accent); color: #fff; }
.hx-wordmark .hx-mark svg { width: 16px; height: 16px; }
.hx-wordmark .hx-tld { color: var(--wp--preset--color--accent); font-weight: 600; }
.hx-header .wp-block-navigation a { color: var(--wp--preset--color--contrast); }
.hx-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }
.hx-cta { border: 1px solid var(--wp--preset--color--line); border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.88rem; font-weight: 600; color: var(--wp--preset--color--ink); text-decoration: none; white-space: nowrap; }
.hx-cta:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }
@media (min-width: 901px) { .hx-header > .wp-block-group { flex-wrap: nowrap; } .hx-header .wp-block-navigation, .hx-header .wp-block-navigation__container { flex-wrap: nowrap; margin-right: 0.5rem; } }
@media (max-width: 600px) { .hx-cta { display: none; } }

/* ---------- breadcrumbs ---------- */
.hx-crumbs { font-size: 0.9rem; color: var(--wp--preset--color--muted); display: flex; flex-wrap: wrap; gap: 0.4rem; max-width: var(--wp--style--global--wide-size); margin: 0 auto 0.4rem; }
.hx-crumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.hx-crumbs a:hover { color: var(--wp--preset--color--accent); }
.hx-crumbs span { color: var(--wp--preset--color--line); }

/* ---------- section ribbon on pillar and guide pages ---------- */
.hx-section-live .wp-block-post-title, .hx-section-api .wp-block-post-title, .hx-section-ai .wp-block-post-title, .hx-section-video .wp-block-post-title { position: relative; }
.hx-kickerline { max-width: var(--wp--style--global--wide-size); margin: 0 auto 0.2rem; }
.hx-kicker { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; text-decoration: none; }
.hx-kicker .hx-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wp--preset--color--accent); }
.hx-kicker--live { color: var(--wp--preset--color--live); } .hx-kicker--live .hx-dot { background: var(--wp--preset--color--live); }
.hx-kicker--api { color: var(--wp--preset--color--api); } .hx-kicker--api .hx-dot { background: var(--wp--preset--color--api); }
.hx-kicker--ai { color: var(--wp--preset--color--ai); } .hx-kicker--ai .hx-dot { background: var(--wp--preset--color--ai); }
.hx-kicker--video { color: var(--wp--preset--color--video); } .hx-kicker--video .hx-dot { background: var(--wp--preset--color--video); }

/* ---------- key answer box (paragraph starting with "In short:") ---------- */
.hx-answer { border: 1px solid var(--wp--preset--color--line); border-left: 6px solid var(--wp--preset--color--accent); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.5rem auto; background: var(--wp--preset--color--soft); font-size: 0.98rem; }
.hx-answer p { margin: 0.25rem 0; }

/* ---------- tables ---------- */
.entry-content .wp-block-table, .entry-content table { max-width: var(--wp--style--global--wide-size); }
.entry-content figure.wp-block-table { overflow-x: auto; }
.entry-content table { font-size: 0.9rem; border-collapse: collapse; width: 100%; }
.entry-content table th, .entry-content table td { padding: 0.6em 0.75em; border: 1px solid var(--wp--preset--color--line); vertical-align: top; text-align: left; }
.entry-content table th { background: var(--wp--preset--color--soft); font-weight: 600; }
.entry-content table tr:nth-child(even) td { background: #fbfcfe; }
.entry-content table td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------- table of contents ---------- */
.hx-toc { border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 0.9rem 1.2rem; margin: 1.5rem auto; background: #fff; font-size: 0.93rem; }
.hx-toc strong { display: block; margin-bottom: 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--wp--preset--color--muted); }
.hx-toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.hx-toc li { margin: 0.15rem 0; break-inside: avoid; }
.hx-toc a { text-decoration: none; }

/* ---------- sources ---------- */
.hx-sources { background: var(--wp--preset--color--soft); border-radius: 10px; padding: 1rem 1.25rem; font-size: 0.92rem; }
.hx-sources ul { margin: 0.4rem 0 0; }
.hx-verified { font-family: var(--wp--preset--font-family--mono); font-size: 0.82rem; color: var(--wp--preset--color--muted); }

/* ---------- child-page cards on hubs ---------- */
.hx-hub .entry-content ul:not(.hx-plain) { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.9rem; }
.hx-hub .entry-content ul:not(.hx-plain) > li { border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 0.9rem 1.1rem; background: #fff; }
.hx-hub .entry-content ul:not(.hx-plain) > li a { font-weight: 600; text-decoration: none; }
.hx-hub .entry-content ul:not(.hx-plain) > li:hover { border-color: var(--wp--preset--color--accent); }

/* ---------- footer (dark) ---------- */
.hx-footer { font-size: 0.92rem; background: var(--wp--preset--color--ink) !important; color: #b9b6d6; }
.hx-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.hx-footer-col h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #8c88b3; margin: 0 0 0.6rem; }
.hx-footer-col ul { list-style: none; padding: 0; margin: 0; }
.hx-footer-col li { margin: 0.3rem 0; }
.hx-footer a { color: #eceaf6; text-decoration: none; }
.hx-footer a:hover { color: #b3acff; }
.hx-footer .hx-wordmark { color: #fff; }
.hx-footer .hx-wordmark .hx-tld { color: #b3acff; }
.hx-footer-disclosure { max-width: 32rem; }
.hx-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.14); color: #8c88b3; font-size: 0.85rem; }
@media (max-width: 900px) { .hx-footer-grid { grid-template-columns: 1fr 1fr; } .hx-toc ol { columns: 1; } }
@media (max-width: 600px) { .hx-footer-grid { grid-template-columns: 1fr; } }

/* ---------- front page: dark hero, chat-bubble router ---------- */
.hx-front .wp-block-post-title { display: none; }
.hx-hero { position: relative; overflow: hidden; padding: 4.5rem 1rem 5.5rem; background: var(--wp--preset--color--ink); color: #eceaf6; }
.hx-hero-bg { position: absolute; inset: 0; z-index: 0; background:
  radial-gradient(55rem 30rem at 80% -20%, rgba(99,91,255,0.45), transparent 65%),
  radial-gradient(40rem 24rem at 5% 115%, rgba(13,148,136,0.25), transparent 60%); }
.hx-hero-bubbles { position: absolute; inset: 0; z-index: 0; opacity: 0.12; }
.hx-hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; text-align: center; }
.hx-eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: #b3acff; font-weight: 700; margin: 0 0 0.9rem; }
.hx-hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.5rem); line-height: 1.08; margin: 0 auto 1rem; letter-spacing: -0.02em; max-width: 22ch; color: #fff; }
.hx-hero-lead { font-size: 1.15rem; color: #b9b6d6; max-width: 44rem; margin: 0 auto; }

/* router: chat-style question/answer bubbles overlapping the hero */
.hx-router { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; max-width: 1180px; margin: -3.2rem auto 0; padding: 0 1rem; }
.hx-route { display: flex; flex-direction: column; text-decoration: none; }
.hx-route-q { align-self: flex-start; max-width: 92%; background: var(--wp--preset--color--soft); border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); font-size: 0.85rem; padding: 0.45rem 0.85rem; border-radius: 14px 14px 14px 3px; margin: 0 0 0.55rem 0.4rem; }
.hx-route-a { flex: 1; display: flex; flex-direction: column; gap: 0.45rem; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 18px 18px 3px 18px; padding: 1.15rem 1.25rem 1.2rem; box-shadow: 0 14px 34px rgba(10,10,35,0.25); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.hx-route:hover .hx-route-a { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(10,10,35,0.3); }
.hx-route-t { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; font-weight: 700; color: var(--wp--preset--color--ink); }
.hx-route-t .hx-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hx-route--live .hx-dot { background: var(--wp--preset--color--live); }
.hx-route--api .hx-dot { background: var(--wp--preset--color--api); }
.hx-route--ai .hx-dot { background: var(--wp--preset--color--ai); }
.hx-route--video .hx-dot { background: var(--wp--preset--color--video); }
.hx-route-d { font-size: 0.9rem; color: var(--wp--preset--color--muted); flex: 1; }
.hx-route-go { font-size: 0.9rem; font-weight: 600; color: var(--wp--preset--color--accent); }
.hx-route:hover .hx-route-go { color: var(--wp--preset--color--accent-dark); }

/* elsewhere strip */
.hx-elsewhere { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 1180px; margin: 1.2rem auto 0; padding: 0 1rem; }
.hx-else { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; border: 1px dashed var(--wp--preset--color--line); border-radius: 3px 14px 14px 14px; background: var(--wp--preset--color--soft); padding: 0.85rem 1.1rem; font-size: 0.92rem; color: var(--wp--preset--color--muted); }
.hx-else strong { color: var(--wp--preset--color--ink); font-weight: 600; }
.hx-else a { font-weight: 600; white-space: nowrap; }
.hx-front .hx-hub { margin-top: 2.5rem; }
@media (max-width: 900px) { .hx-router { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .hx-hero { padding: 2.5rem 1rem 4rem; } .hx-router, .hx-elsewhere { grid-template-columns: 1fr; } .hx-router { margin-top: -2.6rem; } }

/* ---------- sticky table of contents on wide screens ---------- */
@media (min-width: 1100px) {
  main:not(.hx-hub):not(.hx-front) .entry-content:has(.hx-toc) { display: grid; grid-template-columns: minmax(0, 1fr) 250px; column-gap: 3rem; align-items: start; }
  main:not(.hx-hub):not(.hx-front) .entry-content:has(.hx-toc) > * { grid-column: 1; margin-left: 0 !important; margin-right: 0 !important; justify-self: stretch; width: 100%; }
  main:not(.hx-hub):not(.hx-front) .entry-content:has(.hx-toc) > :not(figure):not(table):not(.hx-answer):not(.hx-sources):not(h2) { max-width: 780px; }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc { grid-column: 2; grid-row: 1 / span 400; position: sticky; top: 84px; margin: 0; max-width: none; padding: 0 0 0 1rem; border: 0; border-left: 2px solid var(--wp--preset--color--line); border-radius: 0; background: transparent; max-height: calc(100vh - 100px); overflow: auto; }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc ol { columns: 1; padding-left: 0; list-style: none; }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc li { margin: 0.35rem 0; line-height: 1.35; }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc a { color: var(--wp--preset--color--muted); display: block; padding-left: 0.6rem; margin-left: calc(-1rem - 2px); border-left: 2px solid transparent; }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc a:hover { color: var(--wp--preset--color--accent); }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc a.is-active { color: var(--wp--preset--color--ink); font-weight: 600; border-left-color: var(--wp--preset--color--accent); }
  main:not(.hx-hub):not(.hx-front) .entry-content > .hx-toc .hx-toc-meta { margin-top: 1rem; font-size: 0.8rem; color: var(--wp--preset--color--muted); }
}

.hx-planned { color: inherit; }
