/* TaffeeAI site: light page, dark plum tiles, dark header and footer */
body { background: #ffffff; color: #1a1028; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: #f6a37c; color: #27114b; font-weight: 600; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 0.5rem; }
:focus-visible { outline: 2px solid #ef8a5b; outline-offset: 2px; border-radius: 6px; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 40; background: #1a0b33; border-bottom: 1px solid #2f1a55; }
.site-footer { background: #1a0b33; color: #efe9f8; }
.nav-link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0.85rem; border-radius: 0.5rem; font-size: 0.9rem; font-weight: 500; color: #d9cdee; }
.nav-link:hover { color: #ffffff; background: rgba(255, 255, 255, 0.07); }
.nav-link.is-active { color: #ffffff; box-shadow: inset 0 -2px 0 #f6a37c; border-radius: 0.5rem 0.5rem 0 0; }
.nav-drop .drop-menu { position: absolute; left: 0; top: 100%; min-width: 15rem; padding: 0.4rem; margin-top: 0.4rem; background: #27114b; border: 1px solid #3d2470; border-radius: 0.75rem; box-shadow: 0 20px 40px -12px rgba(0,0,0,0.5); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 120ms, transform 120ms, visibility 120ms; }
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: none; }
.drop-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0.7rem; border-radius: 0.5rem; color: #efe9f8; font-size: 0.9rem; font-weight: 500; }
.drop-item:hover { background: rgba(255, 255, 255, 0.08); }
.drop-all { color: #f9bf9f; border-top: 1px solid #3d2470; margin-top: 0.3rem; padding-top: 0.7rem; border-radius: 0 0 0.5rem 0.5rem; }

/* buttons and links */
.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: 0.75rem; font-weight: 600; color: #27114b; background: #f6a37c; }
.btn-primary:hover { background: #ef8a5b; }
.btn-ghost { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: 0.75rem; font-weight: 600; color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.link-dark { color: #5b21b6; font-weight: 600; }
.link-dark:hover { color: #27114b; text-decoration: underline; }
.link-light { color: #f9bf9f; font-weight: 600; }
.link-light:hover { color: #ffffff; text-decoration: underline; }
.src-link { color: #cdbfe3; text-decoration: underline; text-decoration-color: rgba(205, 191, 227, 0.45); }
.src-link:hover { color: #ffffff; text-decoration-color: #ffffff; }

/* bands */
.eyebrow { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #f6a37c; }
.band-white { background: #ffffff; }
.band-tint { background: #f6f1fc; border-top: 1px solid #ece2f7; border-bottom: 1px solid #ece2f7; }
.hero-bg {
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgba(239, 138, 91, 0.20), transparent 60%),
    radial-gradient(50rem 30rem at 0% 100%, rgba(124, 58, 237, 0.28), transparent 60%),
    linear-gradient(160deg, #1b0c35 0%, #22104a 60%, #2b145c 100%);
}
.page-hero { background: radial-gradient(50rem 22rem at 90% 0%, rgba(239, 138, 91, 0.16), transparent 60%), linear-gradient(160deg, #1b0c35 0%, #27114b 100%); }

/* dark tiles on the light page */
.tile { background: linear-gradient(160deg, #2b1556 0%, #22104a 100%); color: #efe9f8; border: 1px solid #3a2168; border-radius: 1rem; box-shadow: 0 14px 30px -18px rgba(39, 17, 75, 0.55); }
.tile-link { transition: border-color 120ms, transform 120ms; }
.tile-link:hover { border-color: #f6a37c; transform: translateY(-1px); }

/* status badges */
.badge { display: inline-flex; align-items: center; font-size: 0.75rem; font-weight: 700; padding: 0.18rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.badge-v1 { color: #27114b; background: #f6a37c; }
.badge-design { color: #f9bf9f; background: transparent; border: 1px dashed #f6a37c; }
.badge-partly { color: #e0ccff; background: rgba(167, 139, 250, 0.15); border: 1px solid rgba(224, 204, 255, 0.4); }

/* evidence filter (on light page) */
.chip { font-size: 0.875rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid #d4bdea; color: #3b1c6e; background: #ffffff; }
.chip:hover { border-color: #27114b; }
.chip[aria-pressed="true"] { background: #27114b; border-color: #27114b; color: #ffffff; }
.tag { border: 1px solid #4a3570; border-radius: 999px; padding: 0.1rem 0.5rem; color: #e6d8f3; font-weight: 500; }
.ev-card.is-dim { display: none; }

/* tooltips and charts inside dark tiles */
.chart-tip { position: absolute; z-index: 5; pointer-events: none; max-width: 22rem; background: #ffffff; color: #1a1028; font-size: 0.8125rem; line-height: 1.4; padding: 0.55rem 0.7rem; border-radius: 0.5rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); transform: translate(-50%, calc(-100% - 8px)); opacity: 0; transition: opacity 120ms; }
.chart-tip.show { opacity: 1; }
.bar { fill: #f6a37c; }
.hit { cursor: default; outline: none; }
.hit:hover .bar, .hit:focus .bar { fill: #f9bf9f; }

/* component diagrams (dark tiles) */
.dg rect { stroke-width: 1.5; }
.dg-run rect { fill: #3a1d6e; stroke: #b79cf0; }
.dg-caller rect { fill: #252750; stroke: #8b9bd8; }
.dg-store rect { fill: #3d2346; stroke: #e7a07f; }
.dg-mount rect { fill: #1f3333; stroke: #7cc4b4; }
.dg-plan rect { fill: transparent; stroke: #8f7fae; stroke-dasharray: 6 5; }
.dg-vol rect { fill: #1f0e3d; stroke: #5a447f; }
.dg:hover rect, .dg:focus rect { stroke: #f6a37c; stroke-width: 2; }
.dg-host { fill: rgba(255, 255, 255, 0.03); stroke: #7a62a6; stroke-width: 1.5; }
.dg-title { fill: #ffffff; font-size: 16.5px; font-weight: 700; }
.dg-sub { fill: #ddd2f0; font-size: 13.5px; }
.dg-col { fill: #f6a37c; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; }
.dg-note { fill: #cdbfe3; font-size: 12.5px; }
.dg-arrow { stroke: #f6a37c; stroke-width: 2; }
.dg-dashed { stroke-dasharray: 6 5; }
.dg-arrow-label { fill: #f9bf9f; font-size: 12px; font-weight: 600; }
.dg-key { fill: #1f0e3d; stroke: #4a3570; }

/* reference architecture (original light look) */
.diagram-card { background: #ffffff; border: 1px solid #e3d5f2; border-radius: 1.25rem; padding: 1rem; box-shadow: 0 20px 50px -28px rgba(39, 17, 75, 0.45); }
.rt { font-size: 20px; font-weight: 700; fill: #1f2a44; }
.rs { font-size: 15px; fill: #1f2a44; }
.rs2 { font-size: 14px; fill: #33405e; }
.rst { font-size: 16px; font-weight: 700; fill: #1f2a44; }
.rrepo { font-size: 13px; fill: #5b6478; font-family: 'JetBrains Mono', monospace; }
.rt-out { font-size: 18px; font-weight: 700; fill: #8a8f9c; }
.rs-out { font-size: 14px; fill: #9aa0ad; }
.rtag-out { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; fill: #a3a8b4; }
.r-out { fill: #f4f4f6; stroke: #c3c7d0; stroke-width: 1.5; stroke-dasharray: 6 5; }
.r-neutral { fill: #f7f7f9; stroke: #c3c7d0; stroke-width: 1.5; }
.r-stage { fill: #ffffff; stroke: #4f9a45; stroke-width: 1.5; }
.r-inner { fill: #f3eefb; stroke: #6a3fb5; stroke-width: 1.5; stroke-dasharray: 6 4; }
.rin { font-size: 14px; fill: #4a2a85; }
.rin-b { font-size: 15px; font-weight: 700; fill: #4a2a85; }
.r-key { fill: #ffffff; stroke: #1f2a44; stroke-width: 1.5; }
.rb-v1 { fill: #27114b; }
.rb-design { fill: #ffffff; stroke: #27114b; stroke-width: 1.5; stroke-dasharray: 4 3; }
.rb-text { font-size: 13px; font-weight: 700; fill: #ffffff; }
.rb-text-d { font-size: 13px; font-weight: 700; fill: #27114b; }
.ra-today { stroke: #27114b; stroke-width: 2.5; }
.ra-designed { stroke: #b4532a; stroke-width: 2.5; stroke-dasharray: 7 5; }
.ra-out { stroke: #a3a8b4; stroke-width: 2; }
.ra-in { stroke: #1f2a44; stroke-width: 2; }
.ra-loop { stroke: #2e7d32; stroke-width: 2.5; stroke-dasharray: 7 5; fill: none; }
.rl { font-size: 13px; font-weight: 700; }
.rl-today { fill: #27114b; }
.rl-designed { fill: #b4532a; }
.rl-out { fill: #8a8f9c; }
.rl-loop { font-size: 13px; font-weight: 700; fill: #2e7d32; }

.copy-btn { position: absolute; top: 0.6rem; right: 0.6rem; font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.65rem; border-radius: 0.4rem; border: 1px solid #4a3570; color: #e6d8f3; background: #22104a; }
.copy-btn:hover { border-color: #f6a37c; }

@media (prefers-reduced-motion: reduce) { .chart-tip, .nav-drop .drop-menu, .tile-link { transition: none; } html { scroll-behavior: auto; } }
.hero-chip { display: inline-flex; align-items: center; font-size: 0.8125rem; font-weight: 600; padding: 0.3rem 0.75rem; border-radius: 999px; color: #f3ecf9; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); }
.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; font-size: 0.85rem; line-height: 1; color: #7c6a9c; cursor: help; border-radius: 999px; }
.info-tip:hover, .info-tip:focus { color: #27114b; }
.info-tip-box { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 17rem; padding: 0.6rem 0.75rem; border-radius: 0.5rem; background: #1a0b33; color: #efe9f8; font-size: 0.75rem; font-weight: 400; line-height: 1.45; box-shadow: 0 10px 24px rgba(0,0,0,0.35); opacity: 0; visibility: hidden; transition: opacity 120ms; z-index: 20; }
.info-tip:hover .info-tip-box, .info-tip:focus .info-tip-box, .info-tip:focus-within .info-tip-box { opacity: 1; visibility: visible; }

/* market study: five-tile chain */
.ms-row { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 1024px) { .ms-row { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0.5rem; } }
.ms-arrow { display: none; color: #b4532a; font-weight: 700; font-size: 1.25rem; align-self: center; }
@media (min-width: 1024px) { .ms-arrow { display: block; } }
.ms-tile { text-align: left; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.85rem 1rem; border-radius: 1rem; background: linear-gradient(160deg, #2b1556 0%, #22104a 100%); border: 2px solid #3a2168; color: #efe9f8; box-shadow: 0 14px 30px -18px rgba(39,17,75,0.55); transition: border-color 120ms, transform 120ms; }
.ms-tile:hover { border-color: #f6a37c; }
.ms-tile[aria-expanded="true"] { border-color: #f6a37c; transform: translateY(-2px); }
.ms-num { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #f6a37c; }
.ms-title { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 1.05rem; font-weight: 600; line-height: 1.25; color: #ffffff; }
.ms-fig { margin-top: auto; padding-top: 0.2rem; font-family: 'Space Grotesk', Inter, sans-serif; font-size: 1.35rem; font-weight: 700; color: #f6a37c; }
.ms-hence { background: #f6a37c; border-color: #f6a37c; }
.ms-hence .ms-num, .ms-hence .ms-title, .ms-hence .ms-fig { color: #27114b; }
.ms-hence[aria-expanded="true"] { border-color: #27114b; }
.ms-chip { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.26); border-radius: 0.85rem; padding: 1rem; }
details > summary { list-style: none; }
details > summary::before { content: "▸ "; }
details[open] > summary::before { content: "▾ "; }
.pillar-card { background: #fde8da; color: #27114b; border: 1px solid #f9c7aa; border-radius: 0.85rem; padding: 1.1rem; box-shadow: 0 10px 24px -14px rgba(0,0,0,0.6); }
.pillar-card p:first-of-type { color: #27114b; }
.pillar-icon { display: inline-flex; width: 2.5rem; height: 2.5rem; padding: 0.45rem; border-radius: 0.65rem; color: #ffffff; }
.pillar-icon svg { width: 100%; height: 100%; }

/* pillar colour coding (matches the reference architecture) */
.pillar-card { border-width: 2px; }
.pc-context { background: #e4d4fa; border-color: #7a4fc4; } .pc-context .pillar-icon { background: #7a4fc4; }
.pc-capabilities { background: #d4e6fb; border-color: #3a76c0; } .pc-capabilities .pillar-icon { background: #3a76c0; }
.pc-governance { background: #fbdcc0; border-color: #d07a2c; } .pc-governance .pillar-icon { background: #d07a2c; }
.pc-orchestrator { background: #d8efd0; border-color: #3f8f36; } .pc-orchestrator .pillar-icon { background: #3f8f36; }
.pc-telemetry { background: #cdece8; border-color: #2a8f85; } .pc-telemetry .pillar-icon { background: #2a8f85; }
.pillar-card { color: #161c30; }

/* reference architecture overlay */
.arch-dialog { width: min(1200px, 94vw); max-height: 92vh; padding: 1.5rem; border: 0; border-radius: 1.25rem; background: #ffffff; box-shadow: 0 40px 90px -20px rgba(0,0,0,0.6); }
.arch-dialog::backdrop { background: rgba(20, 10, 38, 0.72); backdrop-filter: blur(3px); }
.arch-close { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 0.6rem; font-size: 1.1rem; font-weight: 700; color: #27114b; background: #f3ecf9; }
.arch-close:hover { background: #e6d8f3; }
.hdr-icon { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.7rem; border-radius: 0.6rem; color: #e6d8f3; }
.hdr-icon:hover { color: #ffffff; background: rgba(255,255,255,0.08); }

/* link the detail strip to the selected tile */
.ms-detail { position: relative; overflow: visible; }
.ms-detail::before { content: ""; position: absolute; top: -11px; left: var(--notch-x, 50%); width: 20px; height: 20px; transform: translateX(-50%) rotate(45deg); background: #2b1556; border-left: 1px solid #3a2168; border-top: 1px solid #3a2168; border-radius: 3px 0 0 0; }
.ms-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #f6a37c; }

/* early-access sign-up overlay */
.signup-dialog { width: min(560px, 94vw); max-height: 94vh; padding: 1.6rem; border: 0; border-radius: 1.25rem; background: #ffffff; box-shadow: 0 40px 90px -20px rgba(0,0,0,0.6); }
.signup-dialog::backdrop { background: rgba(20, 10, 38, 0.72); backdrop-filter: blur(3px); }
.field { margin-top: 0.35rem; width: 100%; border: 1px solid #d4bdea; border-radius: 0.6rem; padding: 0.6rem 0.75rem; font-size: 0.95rem; color: #1a1028; background: #ffffff; }
.field:focus { outline: 2px solid #ef8a5b; outline-offset: 1px; border-color: #27114b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; }
