/* Content strategy: system timeline/funnel + rubricator */

.sys { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: 'mon stage' 'ctl stage'; gap: 14px clamp(16px, 2.4vw, 32px); align-items: start; }
.sys-mon { grid-area: mon; --c: #5bbf86; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.sys-mon-top { display: flex; gap: 14px; align-items: center; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.sys-mon-top .rec { color: var(--rec); }
.sys-mon-top span:nth-child(2) { color: var(--text); font-variant-numeric: tabular-nums; }
.sys-mon-top span:last-child { margin-left: auto; }
.sys-mon-body { padding: clamp(18px, 2.2vw, 28px); border-left: 4px solid var(--c); min-height: 300px; transition: border-color 0.3s; }
.sys-mon.cut .sys-mon-body > * { animation: sys-in 0.5s var(--ease-out) both; }
.sys-mon.cut .sys-mon-body > *:nth-child(2) { animation-delay: 0.04s; } .sys-mon.cut .sys-mon-body > *:nth-child(3) { animation-delay: 0.08s; } .sys-mon.cut .sys-mon-body > *:nth-child(4) { animation-delay: 0.12s; }
@keyframes sys-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sys-mon h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: var(--display-w); font-variation-settings: var(--display-vs); letter-spacing: var(--display-ls); font-size: clamp(28px, 3vw, 44px); line-height: 1.05; }
.sys-mon-body > p:first-of-type { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.sys-get-h { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sys-mon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sys-mon li { display: flex; gap: 10px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.sys-mon li::before { content: ''; width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--c); flex: none; }
.sys-ctl { grid-area: ctl; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.sys-play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.sys-play[aria-pressed='true'] { border-color: var(--rec); }
.sys-stage {
  grid-area: stage; position: relative; height: clamp(360px, 52vh, 480px); border-radius: var(--radius); overflow: hidden;
  background: #121214; border: 1px solid var(--line); color: #f1efea;
}
.sys-ruler { position: absolute; left: 48px; right: 0; top: 0; height: 22px; border-bottom: 1px solid rgba(255,255,255,.1);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 1px, transparent 1px 60px) left bottom / 100% 9px no-repeat, repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 1px, transparent 1px 12px) left bottom / 100% 5px no-repeat; transition: opacity 0.4s; }
.sys-lanes { position: absolute; left: 0; top: 22px; bottom: 0; width: 48px; display: grid; grid-template-rows: 1fr 1fr 1fr; border-right: 1px solid rgba(255,255,255,.1); font-family: var(--f-mono); font-size: 10.5px; color: #a3a097; transition: opacity 0.4s; }
.sys-lanes span { display: grid; place-items: center; border-bottom: 1px solid rgba(255,255,255,.06); }
.sys-stage[data-view='fn'] .sys-ruler, .sys-stage[data-view='fn'] .sys-lanes { opacity: 0; }
.sys-blocks { position: absolute; inset: 0; }
.sys-b {
  position: absolute; left: 0; top: 0; height: 64px; padding: 0; border: 0; border-radius: 6px; cursor: pointer; overflow: hidden; text-align: left; color: #fff;
  background: color-mix(in srgb, var(--c) 58%, #0b0b0c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); will-change: transform;
  transition: filter 0.2s, box-shadow 0.2s;
}
.sys-b::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.sys-b:hover { filter: brightness(1.15); }
.sys-b[aria-selected='true'] { box-shadow: inset 0 0 0 2px #fff; }
.sys-b:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sys-b-in { position: absolute; left: 10px; right: 8px; top: 12px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.sys-b-in b { font-weight: 500; font-size: 10px; opacity: 0.75; }
.sys-b-n { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.sys-wave { position: absolute; left: 0; right: 0; bottom: 4px; height: 14px; opacity: 0.45;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.7) 0 2px, transparent 2px 5px); -webkit-mask: linear-gradient(transparent 0, #000 30%, #000 70%, transparent); mask: linear-gradient(transparent 0, #000 30%, #000 70%, transparent); }
.sys-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; pointer-events: none; z-index: 3; }
.sys-head i { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--rec); box-shadow: 0 0 8px var(--rec); }
.sys-head i::before { content: ''; position: absolute; left: -5px; top: 0; width: 12px; height: 12px; background: var(--rec); clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%); }
.sys-stage[data-view='fn'] .sys-head { opacity: 0; }

/* rubricator */
.rub { display: grid; gap: 16px; }
.rub-niches { display: flex; flex-wrap: wrap; gap: 8px; }
.rub-n { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-weight: 600; font-size: 14.5px; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.rub-n:hover { border-color: var(--text); }
.rub-n[aria-checked='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.rub-board { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); padding: 12px; overflow: hidden; }
.rub-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0 0 8px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.rub-days span { padding-left: 4px; }
.rub-tracks { display: grid; gap: 8px; padding-top: 8px; }
.rub-lane { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-height: 132px; padding-top: 20px; border-bottom: 1px dashed var(--line); }
.rub-lane:last-child { border-bottom: 0; }
.rub-lane-n { position: absolute; left: 4px; top: 2px; font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }
.rub-c {
  grid-column: calc(var(--d) + 1); position: relative; min-height: 104px; padding: 0; border: 0; border-radius: 8px; cursor: pointer; text-align: left;
  background: color-mix(in oklab, var(--c) 18%, var(--surface-2)); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--line);
  perspective: 600px; transition: transform 0.55s var(--ease-out), opacity 0.4s; transition-delay: calc(var(--d) * 55ms);
}
.rub-c.drop { transform: translateY(-46px) scale(0.96); opacity: 0; transition: none; }
.rub-front, .rub-back { position: absolute; inset: 0; padding: 10px 10px 10px 13px; display: grid; align-content: start; gap: 4px; backface-visibility: hidden; transition: transform 0.5s var(--ease-out), opacity 0.3s; }
.rub-back { transform: rotateY(180deg); opacity: 0; align-content: center; font-size: 13px; line-height: 1.35; }
.rub-c.flip .rub-front { transform: rotateY(-180deg); opacity: 0; }
.rub-c.flip .rub-back { transform: none; opacity: 1; }
.rub-f { font-size: 10px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.rub-c b { font-size: 14px; line-height: 1.2; }
.rub-i { font-size: 12.5px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rub-g { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c); font-weight: 600; }
.rub-c:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rub-foot { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.rub-bal { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.rub > * { min-width: 0; }
.rub-bal-h { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rub-bar { flex: 1; min-width: 0; display: flex; gap: 3px; height: 30px; }
.rub-bar i { display: flex; align-items: center; padding: 0 10px; border-radius: 6px; background: color-mix(in oklab, var(--c) 30%, var(--surface)); box-shadow: inset 0 -3px 0 var(--c); min-width: 0; overflow: hidden; transition: flex-grow 0.6s var(--ease-out); }
.rub-bar span { font-size: 11px; white-space: nowrap; color: var(--text); }
.rub-legend { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 900px) {
  .sys { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'ctl' 'mon'; }
  .sys-stage { height: 300px; }
  .sys-mon-body { min-height: 0; }
  .sys-b-in { flex-direction: column; gap: 0; top: 8px; left: 7px; }
  .sys-b-n { font-size: 12px; }
  .sys-lanes, .sys-ruler { width: 34px; } .sys-ruler { left: 34px; width: auto; }
  /* the week becomes a vertical day list: one row per day, its clips side by side */
  .rub-days { display: none; }
  .rub-tracks { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rub-lane { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding-top: 22px; }
  .rub-c { min-height: 0; }
  .rub-front { position: relative; inset: auto; }
  .rub-back { inset: 0; }
  .rub-i { -webkit-line-clamp: 4; }
  .rub-n { padding: 0 14px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .rub-c, .rub-front, .rub-back, .rub-bar i { transition: none; }
  .sys-mon.cut .sys-mon-body > * { animation: none; }
}
