/* =====================================================================
   100and10 — interactive explanation modules (progressive enhancement).
   Uses the site design tokens. All content stays readable without JS;
   these styles activate once .js is present / a module is enhanced.
   ===================================================================== */

/* ---- shared: segmented control / tabs ---- */
.xtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.xtab { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--grey-300); background: var(--paper); color: var(--grey-700); font-family: var(--sans);
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
.xtab:hover { border-color: var(--ink); color: var(--ink); }
.xtab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.xtab__n { font-family: var(--mono); font-size: .8rem; opacity: .7; }

/* ---- worlds explorer ---- */
.worlds__panel { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px,4vw,52px); align-items: start; }
.worlds__panel[hidden] { display: none; }
.worlds__eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent, var(--cyan-700)); margin: 0 0 10px; }
.worlds__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0 0 14px; }
.worlds__pr { display: grid; gap: 14px; margin-bottom: 22px; }
.worlds__pr div { border-left: 3px solid var(--accent, var(--cyan-500)); padding-left: 14px; }
.worlds__pr .k { font-size: .8rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey-500); }
.worlds__pr .v { color: var(--ink); font-weight: 500; margin-top: 2px; }
.worlds__list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.worlds__list li { display: flex; gap: 10px; align-items: flex-start; color: var(--grey-700); font-size: .98rem; }
.worlds__list li::before { content: ""; flex: none; width: 16px; height: 22px; background: var(--accent, var(--cyan-700)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230E7C86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10h11m-4-4 4 4-4 4'/%3E%3C/svg%3E") center/16px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230E7C86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10h11m-4-4 4 4-4 4'/%3E%3C/svg%3E") center/16px no-repeat; }
.worlds__aside { background: var(--offwhite); border: 1px solid var(--grey-200); border-radius: var(--radius-lg); padding: 24px; }
.worlds__aside h3 { font-size: .82rem; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--grey-500); margin: 0 0 10px; }
.worlds__aside .ex { color: var(--ink); line-height: 1.55; margin: 0 0 18px; }
.worlds__delim { font-size: .9rem; color: var(--grey-600); border-top: 1px solid var(--grey-200); padding-top: 16px; margin-top: 4px; }
.worlds__delim b { color: var(--ink); }

/* ---- navigator ---- */
.nav2 { background: var(--paper); border: 1px solid var(--grey-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(22px,3vw,34px); max-width: 940px; }
.nav2__q { margin-bottom: 22px; }
.nav2__q > legend, .nav2__q > .q { font-weight: 600; color: var(--ink); font-size: 1.05rem; margin-bottom: 12px; padding: 0; display: block; }
.nav2__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 10px; border: 0; margin: 0; padding: 0; }
.nav2__opt { position: relative; }
.nav2__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.nav2__opt span { display: block; padding: 13px 15px; border: 1px solid var(--grey-300); border-radius: var(--radius); font-size: .96rem; color: var(--grey-700); cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.nav2__opt input:hover + span { border-color: var(--ink); }
.nav2__opt input:checked + span { border-color: var(--cyan-700); background: #ecfbfc; color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--cyan-700); }
.nav2__opt input:focus-visible + span { outline: 3px solid var(--cyan-700); outline-offset: 2px; }
.nav2__result { margin-top: 8px; border-top: 1px solid var(--grey-200); padding-top: 22px; }
.nav2__result[hidden] { display: none; }
.nav2__rlabel { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-500); }
.nav2__rtitle { font-size: 1.35rem; color: var(--ink); margin: 6px 0 10px; }
.nav2__rbody { color: var(--grey-700); line-height: 1.6; margin: 0 0 16px; max-width: 60ch; }
.nav2__rlinks { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }

/* ---- system configurator (2-column workspace) ---- */
.cfg { display: grid; align-items: start; gap: clamp(16px,2vw,24px);
  grid-template-columns: minmax(240px,300px) minmax(0,1fr); }
.cfg__pick { background: var(--paper); border: 1px solid var(--grey-200); border-radius: var(--radius-xl);
  padding: clamp(14px,1.6vw,20px); align-content: start; }
.cfg__picklist { display: grid; gap: 8px; }
.cfg__hint { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-500); margin: 2px 0 10px; }
.cfg__mod { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 13px; border: 1px solid var(--grey-300);
  border-radius: var(--radius); background: var(--paper); font-family: var(--sans); font-size: .95rem; color: var(--ink); cursor: pointer;
  transition: border-color .14s var(--ease), background .14s var(--ease); }
.cfg__mod:hover { border-color: var(--cyan-700); background: var(--offwhite); }
.cfg__mod[aria-pressed="true"] { border-color: var(--cyan-700); background: #ecfbfc; box-shadow: inset 0 0 0 1px var(--cyan-700); }
.cfg__box { width: 19px; height: 19px; border-radius: 5px; border: 1.5px solid var(--grey-400,#b9b6b0); flex: none; display: grid; place-items: center; color: transparent; }
.cfg__box svg { display: block; }
.cfg__mod[aria-pressed="true"] .cfg__box { background: var(--cyan-700); border-color: var(--cyan-700); color: #fff; }
.cfg__mod .ic { display: inline-flex; align-items: center; color: var(--cyan-700); }
.cfg__mod .ic svg { display: block; }
.ic-svg { display: block; }

/* Right side: one unified dark workspace panel = diagram (top) + value strip (bottom), one outer edge */
.cfg__workspace { background: var(--deep); border-radius: var(--radius-xl); overflow: hidden;
  color: #CFEFF1; display: flex; flex-direction: column; min-height: 440px; }
.cfg__map { flex: 1 1 auto; display: flex; flex-direction: column; padding: clamp(20px,2.4vw,28px); }
.cfg__workspace .sysmap__head { margin-bottom: 2px; }
.cfg__workspace h3 { color: #fff; font-size: 1.12rem; margin: 0 0 5px; letter-spacing: -.01em; }
.cfg__stagesub { font-size: .86rem; color: #7FA0A2; margin: 0; line-height: 1.55; }
.cfg__count { display:inline-flex; min-width: 22px; height: 22px; padding: 0 7px; align-items:center; justify-content:center; background: var(--cyan-500); color: var(--deep); border-radius: 999px; font-family: var(--mono); font-size: 12px; font-weight: 600; }

/* system diagram */
.sysmap { position: relative; display: grid; gap: clamp(22px,4vw,38px); padding: 12px 4px 2px; }
.sysmap__wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.sysmap__wire { animation: wireIn .4s var(--ease) both; }
@keyframes wireIn { from { opacity: 0 } to { opacity: 1 } }
.sysmap__band { position: relative; z-index: 1; }
.sysmap__bandlabel { display: block; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #6f9295; margin-bottom: 11px; }
.sysmap__nodes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sysmap__node { display: inline-flex; align-items: center; gap: 7px; line-height: 1; border-radius: 999px; }
.sysmap__node--role { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); color: #DCEFF0; padding: 7px 13px; font-size: .82rem; }
.sysmap__node--obj { border: 1px dashed rgba(255,255,255,.22); color: #9fc7c9; padding: 5px 11px; font-family: var(--mono); font-size: .72rem; }
.sysmap__node--mod { background: var(--deep-2,#0B3A40); border: 1px solid rgba(90,226,230,.42); color: #eafcfd; padding: 9px 14px; border-radius: 11px; font-weight: 600; font-size: .86rem; box-shadow: 0 1px 0 rgba(0,0,0,.25); animation: cfgin .25s var(--ease) both; }
.sysmap__node--mod.is-integrate { border-color: rgba(122,160,162,.5); }
.sysmap__ic { display: inline-flex; color: var(--cyan-500); }
.sysmap__node--mod.is-integrate .sysmap__ic { color: #9fb3b4; }
.sysmap__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin: 4px 0 0; font-size: .74rem; color: #7FA0A2; }
.sysmap__key { display: inline-flex; align-items: center; gap: 7px; }
.sysmap__key::before { content: ""; width: 16px; height: 2px; border-radius: 2px; }
.sysmap__key--custom::before { background: rgba(90,226,230,.7); }
.sysmap__key--integrate::before { background: rgba(122,160,162,.7); }
.cfg__empty { margin: auto; width: 100%; color: #7FA0A2; font-size: .95rem; padding: 40px 16px; text-align: center; border: 1px dashed rgba(255,255,255,.16); border-radius: var(--radius-lg); }

/* value strip (same panel, full-bleed footer): only the build-vs-integrate decision + action, no diagram duplication */
.cfg__stage { background: rgba(0,0,0,.16); border-top: 1px solid rgba(255,255,255,.12);
  padding: clamp(18px,2.2vw,24px) clamp(20px,2.4vw,28px); display: grid; gap: 16px; }
.cfg__stage:empty { display: none; }
.cfg__split { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px 24px; }
.cfg__rk { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #7FA0A2; margin-bottom: 6px; }
.cfg__rv { color: #DCEFF0; font-size: .92rem; line-height: 1.55; margin: 0; }
.cfg__rv b { color: #fff; font-weight: 600; }
.cfg__muted { color: #7FA0A2; }
.cfg__ctarow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.cfg__cta { display: inline-flex; width: auto; flex: 0 0 auto; white-space: normal; text-align: left; }
.cfg__note { flex: 1 1 240px; min-width: 200px; margin: 0; font-size: .78rem; color: #6f9295; line-height: 1.5; }
@keyframes cfgin { from { opacity:0; transform: translateY(4px) } to { opacity:1; transform:none } }

/* ---- generic step/flow explainer (data flow, pipelines) ---- */
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.flow__step { flex: 1 1 150px; min-width: 140px; text-align: left; background: var(--paper); border: 1px solid var(--grey-300); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s var(--ease), transform .08s var(--ease); position: relative; }
.flow__step:hover { border-color: var(--cyan-700); }
.flow__step[aria-expanded="true"] { border-color: var(--ink); }
.flow__n { font-family: var(--mono); font-size: 11px; color: var(--grey-500); }
.flow__t { display: block; font-weight: 600; color: var(--ink); margin-top: 3px; font-size: .98rem; }
.flow__detail { margin-top: 16px; background: var(--offwhite); border: 1px solid var(--grey-200); border-radius: var(--radius-lg); padding: 20px 22px; }
.flow__detail[hidden] { display: none; }
.flow__detail .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-500); }
.flow__detail p { margin: 4px 0 14px; color: var(--grey-700); line-height: 1.55; }

@media (max-width: 860px) {
  .worlds__panel { grid-template-columns: 1fr; }
}
/* configurator: selection card above the workspace on narrow screens */
@media (max-width: 760px) {
  .cfg { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cfg__split { grid-template-columns: 1fr; }
  .cfg__cta { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cfg__chip, .sysmap__node--mod, .sysmap__wire { animation: none; }
}

/* inline SVG icon alignment */
.ico-arr { display: inline-block; vertical-align: -0.14em; }
