/* model: the Practical Model of Intelligent AI Use as a ring of ten stations.
   Default styles are the complete static view (no JS, reduced motion). .model--live (added by JS) turns it
   into the pinned scene where the gold baton travels the ring. */

.sec.model { padding: 0; overflow: clip; }
.model__stage { position: relative; padding: var(--pad-y) 0; }
.model__sky {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 60% at 28% 52%, rgba(59, 127, 224, .16), transparent 70%),
    radial-gradient(ellipse 30% 40% at 30% 50%, rgba(226, 176, 98, .06), transparent 70%);
}
.model__sky::before {
  /* faint stars, drifting slowly in live mode */
  content: ''; position: absolute; inset: -10% -5%; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 88% 64%, #E2B062 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 86%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 72%, #B4BFD2 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 58% 34%, #B4BFD2 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 28%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 6%, #E2B062 50%, transparent 51%);
  background-size: 640px 520px;
}

.model__grid {
  position: relative;
  /* the same ring column and panel width with and without motion, so headings wrap the same */
  --ring: min(calc(100svh - 132px), 46vw, 760px); max-width: 1560px;
  display: grid; grid-template-columns: var(--ring) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
}

/* ring */
.model__ring-col { display: flex; justify-content: center; position: sticky; top: 110px; }
.model--live .model__ring-col { position: relative; top: auto; }
.model__ring { position: relative; width: var(--ring); aspect-ratio: 1; container-type: inline-size; }
.model__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.model__ticks line { stroke: rgba(180, 191, 210, .28); stroke-width: 2; }
.model__spoke { stroke: var(--gold); stroke-opacity: .4; stroke-width: 1.5; transition: stroke-opacity .6s, stroke .6s; }
.model__guide { fill: none; stroke: var(--cobalt); stroke-opacity: .3; stroke-width: 2; stroke-dasharray: 2 12; }
.model__track { fill: none; stroke: rgba(180, 191, 210, .2); stroke-width: 3; }
.model__progress { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; filter: drop-shadow(0 0 8px rgba(226, 176, 98, .55)); }
.model__return { fill: none; stroke: #F0C989; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: 0; opacity: .9; filter: drop-shadow(0 0 5px rgba(226, 176, 98, .5)); }
.model__arrow { fill: #F0C989; opacity: .9; }
.model__disc-rim { fill: none; stroke: var(--gold-line); stroke-width: 2; }
.model__disc-dash { fill: none; stroke: var(--gold); stroke-opacity: .35; stroke-width: 2; stroke-dasharray: 1 9; }
.model__baton { display: none; }
.model__hand { stroke-width: 3; stroke-linecap: round; }
.model__tail { fill: none; stroke: var(--gold); stroke-linecap: round; }
.model__tail--1 { stroke-width: 9; stroke-opacity: .8; }
.model__tail--2 { stroke-width: 7; stroke-opacity: .35; }
.model__tail--3 { stroke-width: 5; stroke-opacity: .16; }
.model__tip { fill: #FFF3DC; }
.model__tails { opacity: .3; }
.model__spark, .model__signal { display: none; }
.model__spark path:not(.model__spark-dot) { fill: none; stroke: #F3D29A; stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(226, 176, 98, .9)); }
.model__spark-dot, .model__signal-dot { stroke: none; fill: #FFF1D6; filter: drop-shadow(0 0 8px rgba(255, 220, 160, 1)); }
.model--live .model__spark, .model--live .model__signal { display: inline; }
.model__light {
  position: absolute; left: 0; top: 0; width: 900px; height: 900px; margin: -450px 0 0 -450px; opacity: 0;
  background: radial-gradient(circle, rgba(226, 176, 98, .12), rgba(59, 127, 224, .06) 40%, transparent 68%);
}
.model__motes path { fill: var(--gold); }

.model__diamond {
  fill: var(--gold); stroke: var(--gold); stroke-width: 3;
  transform-box: fill-box; transform-origin: center;
  transition: fill .5s, stroke-opacity .5s, transform .6s var(--ease-out);
}
.model__halo { fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.model__num-label {
  font-family: var(--f-body); font-weight: 600; font-size: 28px; font-variant-numeric: tabular-nums;
  fill: var(--gold); transition: fill .5s;
}

/* the core of the ring */
.model__core {
  position: absolute; left: 50%; top: 50%; width: 36%; height: 36%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  pointer-events: none;
}
.model__core-mark svg { width: max(28px, 8cqw); height: max(28px, 8cqw); }
.model__core-outer { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.model__core-inner { fill: var(--gold); }
.model__core-num { display: none; }
.model__core-name {
  margin-top: 6px; font-family: var(--f-display); font-style: italic; font-weight: 500;
  font-size: max(14px, 3.3cqw); line-height: 1.25; color: var(--white);
}

/* panel */
.model__title { margin-bottom: 18px; font-size: clamp(2rem, 3vw, 3.2rem); }
.model__lede { font-size: clamp(1.05rem, 1.15vw, 1.18rem); color: var(--white); opacity: .9; margin-bottom: 34px; }
.model__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 36px; counter-reset: none; }
.model__name { font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; line-height: 1.25; color: var(--white); display: flex; gap: 12px; }
.model__name-num { color: var(--gold); font-family: var(--f-body); font-variant-numeric: tabular-nums; font-weight: 600; flex: none; width: 26px; }
.model__q { margin-top: 6px; padding-left: 38px; font-size: 1rem; line-height: 1.55; color: var(--mist); }

.model__end { margin-top: 44px; padding-top: 30px; border-top: 1px solid rgba(226, 176, 98, .3); }
.model__end-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.45rem, 2vw, 1.9rem); line-height: 1.2; color: var(--white); }
.model__quote { margin: 14px 0 0; padding-left: 18px; border-left: 2px solid var(--gold); }
.model__quote p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.08rem, 1.2vw, 1.2rem); line-height: 1.5; color: var(--white); }
.model__under { margin-top: 20px; font-size: 1rem; color: var(--mist); }
.model__principles { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }
.model__principles li {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 12px;
  border: 1px solid rgba(226, 176, 98, .45); color: var(--white); font-weight: 500; font-size: .98rem; line-height: 1.3;
}
.model__principles li::before { content: ''; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); flex: none; }
.model__bottom { margin-top: 20px; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: clamp(1.15rem, 1.4vw, 1.4rem); line-height: 1.4; color: var(--gold); }

.model__meter, .model__hits, .model__next { display: none; }
.model--live .model__next {
  display: flex; align-items: baseline; gap: 10px; margin-top: clamp(22px, 4vh, 40px);
  color: var(--mist); font-size: 1rem;
}
.model__next span { font-size: .875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(180, 191, 210, .7); }
.model__next span::after { content: ''; display: inline-block; width: 28px; height: 1px; margin-left: 10px; vertical-align: middle; background: var(--gold-line); }
.model__next b { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- live: the pinned scene ---------- */
.model--live .model__stage {
  height: 100vh; height: 100svh; padding: 92px 0 28px;
  display: flex; align-items: center;
}
.model--live .model__sky::before { animation: model-drift 90s linear infinite; }
@keyframes model-drift { to { transform: translate3d(-640px, -260px, 0); } }
.model--live .model__grid {
  width: 100%; align-items: center;
}
.model--live .model__ring { width: var(--ring); perspective: 1400px; }
.model--live .model__svg { transform-style: preserve-3d; }
.model--live .model__baton { display: inline; }
.model--live .model__progress { stroke-dashoffset: 100; }
.model--live .model__return { stroke-dashoffset: 100; }
.model--live .model__arrow { opacity: 0; }
.model--live .model__spoke { stroke: rgba(180, 191, 210, .12); stroke-opacity: 1; }
.model--live .model__spoke.is-lit { stroke: var(--gold); stroke-opacity: .55; }
.model--live .model__diamond { fill: var(--night); stroke-opacity: .55; }
.model--live .model__num-label { fill: rgba(180, 191, 210, .6); }
.model--live .is-passed .model__diamond { fill: var(--gold); stroke-opacity: 1; }
.model--live .is-passed .model__num-label { fill: var(--gold); }
.model--live .is-active .model__diamond { fill: #FFE7BC; stroke: #FFE7BC; stroke-opacity: 1; transform: scale(1.4); filter: drop-shadow(0 0 10px rgba(226, 176, 98, .9)); }
.model--live .is-active .model__num-label { fill: var(--white); }
.model--live .is-active .model__halo { animation: model-pulse 2.2s var(--ease-out) infinite; }
.model--live .is-hover .model__diamond { transform: scale(1.3); stroke-opacity: 1; }
.model--live .is-hover .model__num-label { fill: var(--white); }
@keyframes model-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.8); } }

.model--live .model__core-mark { display: none; }
.model--live .model__core-num {
  display: block; position: relative; overflow: clip; padding: 0 .1em;
  font-family: var(--f-display); font-weight: 600; font-size: 13cqw; line-height: 1.12; color: var(--white);
  font-variant-numeric: tabular-nums; height: 1.12em; min-width: 1.6em;
}
.model--live .model__core-num span { position: absolute; left: 0; right: 0; top: 0; }
.model--live .model__core-name { position: relative; overflow: clip; height: 1.6em; width: 100%; margin-top: 2px; color: var(--gold); font-size: max(14px, 3.2cqw); padding-bottom: .3em; }
.model--live .model__core-name span { position: absolute; left: 0; right: 0; top: 0; white-space: nowrap; }
.model--live .model__core.is-end .model__core-num { display: none; }
.model--live .model__core.is-end .model__core-mark { display: block; }
.model--live .model__core.is-end .model__core-name { height: 3em; }
.model--live .model__core.is-end .model__core-name span { white-space: normal; }

.model--live .model__hits { display: block; position: absolute; inset: 0; pointer-events: none; }
.model__hit {
  position: absolute; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto;
  transform: translate(-50%, -50%) rotate(45deg); border-radius: 0;
}
.model__hit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.model--live .model__title { margin-bottom: 14px; }
.model--live .model__lede { margin-bottom: clamp(20px, 3.4vh, 40px); }
.model--live .model__deck { display: grid; }
.model--live .model__steps, .model--live .model__end { grid-area: 1 / 1; }
.model--live .model__steps { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.model--live .model__step { grid-area: 1 / 1; visibility: hidden; }
.model--live .model__step.is-current, .model--live .model__end.is-current { visibility: visible; }
.model--live .model__end { visibility: hidden; margin: 0; padding: 0; border: 0; }
.model--live .model__name { font-size: clamp(1.6rem, 2.3vw, 2.15rem); line-height: 1.18; display: flow-root; }
.model--live .model__name-num { display: none; }
.model--live .model__q {
  margin-top: 16px; padding: 4px 0 4px 22px; border-left: 2px solid var(--gold);
  font-family: var(--f-display); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.85rem); line-height: 1.38; color: var(--white);
}

.model--live .model__meter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: clamp(22px, 4vh, 44px); }
.model__bars { display: flex; gap: 5px; }
.model__bars i { display: block; width: 22px; height: 3px; background: rgba(180, 191, 210, .22); transition: background-color .4s; }
.model__bars i.is-on { background: var(--gold); box-shadow: 0 0 8px rgba(226, 176, 98, .6); }
.model__count { font-weight: 600; color: var(--white); font-variant-numeric: tabular-nums; font-size: .98rem; }
.model__count b { color: var(--gold); font-weight: 600; }
.model__hint { color: var(--mist); font-size: .95rem; }

/* split line masks inside the panel */
.model__step .split-line-mask, .model__end .split-line-mask { padding-bottom: .3em; margin-bottom: -.55em; }
/* the last line only pulls back its own bottom padding, so a split heading is exactly as tall as the unsplit one
   (the first line's -.25em top margin is then returned) */
.model .split-line-mask:last-child { margin-bottom: -.5em; }
.model__step .split-line-mask:last-child, .model__end .split-line-mask:last-child { margin-bottom: -.3em; }
.model__name, .model__q, .model__end-title, .model__quote p, .model__bottom { display: flow-root; }

/* tablet and phone */
@media (max-width: 1080px) and (min-width: 761px) {
  .model__grid { --ring: min(calc(100svh - 132px), 44vw); }
  .model--live .model__hint { display: none; }
}
@media (max-width: 960px) {
  .model__steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .model__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .model__panel { display: contents; }
  .model__title { order: 1; }
  .model__lede { order: 2; }
  .model__ring-col { order: 3; margin: 6px 0 30px; position: relative; top: auto; }
  .model__deck { order: 4; }
  .model__meter { order: 5; }
  .model__ring { width: min(100%, 420px); }
  .model__title { font-size: 1.9rem; }
  .model__end-title { font-size: 1.25rem; }
  .model__num-label { font-size: 54px; }

  .model--live .model__stage { padding: 88px 0 16px; align-items: flex-start; }
  .model--live .model__grid { --ring: min(70vw, 31svh); grid-template-columns: minmax(0, 1fr); align-content: start; }
  .model--live .model__title { margin-bottom: 6px; }
  .model--live .model__lede { font-size: .98rem; line-height: 1.5; margin-bottom: 8px; }
  .model--live .model__ring-col { margin: 2px 0 14px; }
  .model--live .model__name { font-size: 1.4rem; }
  .model--live .model__q { margin-top: 10px; padding-left: 14px; font-size: 1.1rem; line-height: 1.42; }
  .model--live .model__meter { order: 4; margin: 0 0 18px; justify-content: center; }
  .model--live .model__deck { order: 5; }
  .model--live .model__hint { display: none; }
  .model--live .model__quote { margin-top: 8px; padding-left: 12px; }
  .model--live .model__quote p { font-size: .98rem; line-height: 1.42; }
  .model--live .model__under { display: none; }
  .model--live .model__principles { margin-top: 10px; gap: 6px; }
  .model--live .model__principles li { font-size: .875rem; padding: 4px 9px 4px 8px; gap: 7px; }
  .model--live .model__bottom { margin-top: 10px; font-size: 1.02rem; }
  .model__bars i { width: 16px; }
}
