/* Connected Learner component. Uses the site tokens from site.css (--paper, --fg, --navy, --line, fonts) and
   adds one accent per product so the four products stay distinguishable everywhere they appear. */
.cl-root {
  --cl-mc: #b4430f; --cl-mc-soft: #fbeee6;
  --cl-commerce: #0e6f68; --cl-commerce-soft: #e3f3f1;
  --cl-edu: #1e4894; --cl-edu-soft: #e7eef9;
  --cl-dc: #0b6fae; --cl-dc-soft: #e2f1fb;
  --cl-path: #b9c3d3;
}
.cl-mc { --c: var(--cl-mc); --cs: var(--cl-mc-soft); }
.cl-commerce { --c: var(--cl-commerce); --cs: var(--cl-commerce-soft); }
.cl-edu { --c: var(--cl-edu); --cs: var(--cl-edu-soft); }
.cl-dc { --c: var(--cl-dc); --cs: var(--cl-dc-soft); }

.cl-root { display: grid; gap: 18px; min-width: 0; }
.cl-root h3, .cl-root p { margin: 0; }
.cl-panel { background: var(--card, #fff); border: 1px solid var(--line, #d9e1ec); border-radius: var(--r, 10px); padding: 20px; display: grid; gap: 12px; min-width: 0; align-content: start; }
.cl-top { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cl-count { font: 600 .74rem/1.2 var(--f-mono, monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--muted, #56627a); }
.cl-title { font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 800; color: #14244d; margin-top: 6px !important; }
.cl-chip { display: inline-flex; align-items: center; font: 700 .76rem/1 var(--f-body, sans-serif); color: var(--c); background: var(--cs); border: 1px solid var(--c); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.cl-progress { height: 4px; background: var(--line, #d9e1ec); border-radius: 4px; overflow: hidden; }
.cl-progress span { display: block; height: 100%; background: var(--navy, #1e4894); transition: width .25s ease; }
.cl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; }
@media (max-width: 900px) { .cl-grid { grid-template-columns: minmax(0, 1fr); } }
.cl-col { display: grid; gap: 18px; align-content: start; min-width: 0; }

/* loop diagram */
.cl-loop { width: 100%; height: auto; display: block; max-height: 380px; }
.cl-loop text, .cl-archsvg text { font-family: var(--f-body, sans-serif); }
.cl-org { fill: none; stroke: var(--navy, #1e4894); stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .45; }
.cl-org-label { fill: var(--navy, #1e4894); font: 700 10px var(--f-mono, monospace); letter-spacing: .08em; }
.cl-arrow path { fill: none; stroke: var(--cl-path); stroke-width: 2.5; }
.cl-arrow polygon { fill: var(--cl-path); }
.cl-arrow text { fill: var(--muted, #56627a); font-size: 11px; }
.cl-stream path { stroke-dasharray: 5 5; stroke-width: 2; }
.cl-arrow.is-on path { stroke: var(--navy, #1e4894); stroke-width: 4; stroke-dasharray: 10 6; animation: cl-flow .8s linear infinite; }
.cl-arrow.is-on polygon { fill: var(--navy, #1e4894); }
.cl-arrow.is-on text { fill: var(--navy, #1e4894); font-weight: 700; }
@keyframes cl-flow { to { stroke-dashoffset: -16; } }
.cl-node { cursor: pointer; outline: none; }
.cl-node rect { fill: var(--cs); stroke: var(--c); stroke-width: 2; }
.cl-node text { fill: var(--c); font-size: 13px; font-weight: 700; }
.cl-node text.cl-sub { font-size: 11px; font-weight: 600; }
.cl-node.is-on rect { fill: var(--c); stroke-width: 3; }
.cl-node.is-on text { fill: #fff; }
.cl-node:focus-visible rect { stroke: #f2b705; stroke-width: 4; }
.cl-legend { font-size: .8rem; color: var(--muted, #56627a); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-solid, .cl-dashed { display: inline-block; width: 24px; border-top: 3px solid #8a94a6; }
.cl-dashed { border-top-style: dashed; margin-left: 8px; }

/* moves */
.cl-h4 { font: 600 .74rem/1.2 var(--f-mono, monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--blue, #1e4894); }
.cl-moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cl-moves li { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line, #d9e1ec); }
.cl-moves li:first-child { border-top: 0; padding-top: 0; }
.cl-what { font-weight: 700; font-size: .98rem; }
.cl-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted, #56627a); }
.cl-how { font-size: .92rem; color: var(--muted, #56627a); }
.cl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* detail */
.cl-detail { border-top: 4px solid var(--c); }
.cl-detail > p:not(.cl-h4) { font-size: 1rem; line-height: 1.6; }
.cl-mock { background: var(--paper-2, #f4f7fc); border: 1px solid var(--line, #d9e1ec); border-radius: 8px; padding: 16px; display: grid; gap: 10px; min-width: 0; }
.cl-tag { font: 600 .7rem/1 var(--f-mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #56627a); }
.cl-mock-title { font-weight: 800; color: #14244d; }
.cl-email { background: #fff; border: 1px solid var(--line, #d9e1ec); border-radius: 6px; padding: 14px; display: grid; gap: 8px; font-size: .94rem; }
.cl-email hr { border: 0; border-top: 1px solid var(--line, #d9e1ec); margin: 2px 0; width: 100%; }
.cl-cta { justify-self: start; background: var(--navy, #1e4894); color: #fff; font-weight: 700; font-size: .85rem; padding: 9px 14px; border-radius: 6px; }
.cl-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-flow li { background: #fff; border: 1px solid var(--line, #d9e1ec); border-left: 4px solid var(--cl-mc); border-radius: 6px; padding: 8px 10px; font-size: .9rem; }
.cl-flow li span { display: block; font: 600 .68rem/1.2 var(--f-mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--cl-mc); }
.cl-branch { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cl-yes, .cl-no { border-radius: 6px; padding: 8px 10px; font-size: .88rem; border: 1px solid var(--line, #d9e1ec); background: #fff; }
.cl-yes { border-color: var(--cl-commerce); }
.cl-yes em { display: inline-block; font-style: normal; font-weight: 700; font-size: .72rem; color: #fff; background: var(--cl-commerce); border-radius: 999px; padding: 2px 8px; margin-left: 4px; }
.cl-tablewrap { overflow-x: auto; }
/* site.css gives every table a 640px minimum and a navy header row; the mock-ups are small, so undo both here */
.cl-mock table { width: 100%; min-width: 0; border-collapse: collapse; font-size: .88rem; background: #fff; border: 1px solid var(--line, #d9e1ec); border-radius: 6px; }
.cl-mock th, .cl-mock td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line, #d9e1ec); vertical-align: top; overflow-wrap: break-word; }
.cl-mock thead th { background: var(--paper-2, #f4f7fc); font: 600 .7rem/1.2 var(--f-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #56627a); }
.cl-mock code { font: 600 .8rem var(--f-mono, monospace); color: var(--cl-edu); background: none; border: 0; padding: 0; overflow-wrap: break-word; }
.cl-tablewrap { border-radius: 6px; }
.cl-promo td { color: var(--cl-commerce); font-weight: 700; }
.cl-confirm { background: #fff; border: 1px solid var(--line, #d9e1ec); border-left: 4px solid var(--cl-commerce); border-radius: 6px; padding: 12px 14px; display: grid; gap: 4px; font-size: .92rem; }
.cl-days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.cl-days span { background: var(--cl-edu); color: #fff; text-align: center; font-size: .75rem; font-weight: 700; padding: 8px 2px; border-radius: 6px; }
.cl-note { font-size: .84rem; color: var(--muted, #56627a); }
.cl-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.cl-src { background: #fff; border: 1px solid var(--line, #d9e1ec); border-top: 3px solid var(--c); border-radius: 6px; padding: 8px 10px; display: grid; gap: 2px; font-size: .82rem; min-width: 0; overflow-wrap: anywhere; }
.cl-src b { color: var(--c); }
.cl-unified { background: #fff; border: 2px solid var(--cl-dc); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.cl-unified b { color: var(--cl-dc); }
.cl-unified dl, .cl-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.cl-unified dt, .cl-facts dt { font: 600 .68rem/1.3 var(--f-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #56627a); overflow-wrap: anywhere; }
.cl-unified dd, .cl-facts dd { margin: 2px 0 0; font-weight: 700; font-size: .95rem; color: #14244d; }
.cl-facts > div { border-top: 3px solid var(--c); padding-top: 8px; }
.cl-rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; }
.cl-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-say { border-left: 4px solid var(--c); background: var(--cs); padding: 10px 12px; border-radius: 0 6px 6px 0; font-size: .98rem; }
.cl-say span { display: block; font: 600 .68rem/1.3 var(--f-mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--c); margin-bottom: 4px; }

/* navigation */
.cl-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.cl-btn { font: 700 .95rem/1 var(--f-body, sans-serif); padding: 13px 18px; border-radius: 8px; border: 2px solid var(--navy, #1e4894); background: #fff; color: var(--navy, #1e4894); cursor: pointer; }
.cl-btn.cl-primary { background: var(--navy, #1e4894); color: #fff; }
.cl-btn:disabled { opacity: .4; cursor: default; }
.cl-btn:focus-visible, .cl-timeline button:focus-visible, .cl-hops button:focus-visible { outline: 3px solid var(--sky, #2e75b6); outline-offset: 2px; }
.cl-timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cl-timeline button { width: 100%; height: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; background: #fff; border: 1px solid var(--line, #d9e1ec); border-top: 3px solid var(--c); border-radius: 8px; padding: 10px; cursor: pointer; font: inherit; color: var(--fg, #15213b); }
.cl-timeline .cl-n { grid-row: span 2; font: 700 .9rem/1.4 var(--f-mono, monospace); color: var(--c); }
.cl-timeline .cl-t { font-size: .85rem; font-weight: 700; line-height: 1.3; }
.cl-timeline .cl-c { font-size: .72rem; color: var(--muted, #56627a); }
.cl-timeline button.is-done { background: var(--paper-2, #f4f7fc); }
.cl-timeline button.is-on { background: var(--cs); border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }

/* architecture */
.cl-arch-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 900px) { .cl-arch-grid { grid-template-columns: minmax(0, 1fr); } }
.cl-archsvg { width: 100%; height: auto; display: block; }
.cl-box rect { fill: var(--cs); stroke: var(--c); stroke-width: 2; }
.cl-box-h { fill: var(--c); font-size: 15px; font-weight: 800; }
.cl-box-s { fill: var(--muted, #56627a); font-size: 11.5px; }
.cl-hop { cursor: pointer; outline: none; }
.cl-hop path { fill: none; stroke: var(--cl-path); stroke-width: 2.5; }
.cl-hop polygon { fill: var(--cl-path); }
.cl-hop circle { fill: #fff; stroke: var(--navy, #1e4894); stroke-width: 2; }
.cl-hop text { fill: var(--navy, #1e4894); font-size: 12px; font-weight: 800; }
.cl-hop.is-on path { stroke: var(--navy, #1e4894); stroke-width: 4; }
.cl-hop.is-on polygon, .cl-hop.is-on circle { fill: var(--navy, #1e4894); }
.cl-hop.is-on text { fill: #fff; }
.cl-hop:focus-visible circle { stroke: #f2b705; stroke-width: 4; }
.cl-hopdetail { border-top: 4px solid var(--navy, #1e4894); }
.cl-how-big { font-weight: 700; color: var(--navy, #1e4894); }
.cl-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cl-product { background: #fff; border: 1px solid var(--line, #d9e1ec); border-top: 4px solid var(--c); border-radius: var(--r, 10px); padding: 16px; display: grid; gap: 6px; align-content: start; font-size: .94rem; }
.cl-pname { font-weight: 800; color: var(--c); font-size: 1.05rem; }
.cl-prole { font: 600 .7rem/1.3 var(--f-mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #56627a); }
.cl-hops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cl-hops button { width: 100%; text-align: left; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; background: #fff; border: 1px solid var(--line, #d9e1ec); border-radius: 8px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--fg, #15213b); }
.cl-hops button > span:last-child { display: grid; gap: 3px; }
.cl-hops .cl-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--navy, #1e4894); color: var(--navy, #1e4894); font-weight: 800; font-size: .85rem; }
.cl-hops em { font-style: normal; font-size: .85rem; font-weight: 700; color: var(--navy, #1e4894); }
.cl-hops button > span:last-child > span { font-size: .9rem; color: var(--muted, #56627a); }
.cl-hops button.is-on { border-color: var(--navy, #1e4894); background: var(--paper-2, #f4f7fc); }
.cl-hops button.is-on .cl-n { background: var(--navy, #1e4894); color: #fff; }
@media (prefers-reduced-motion: reduce) { .cl-arrow.is-on path { animation: none; } .cl-progress span { transition: none; } }
