/* ZolaxTech Studio. Palette: midnight, deep, slate, chalk, mist, saffron, fern, ember. */
:root, :root[data-theme="dark"] {
  --bg: #0B1722; --surface: #112332; --raised: #1A3246; --line: #213A50; --line-2: #2B4A63;
  --text: #E8EEF3; --mist: #8FA3B5; --accent: #F4C430; --on-accent: #1A1405;
  --fern: #34C27A; --ember: #FF6B5B; --focus: #7CC4FF;
  --s-ai: #9B8CFF; --s-pc: #3FB6C9; --s-gw: #5B9DFF; --s-web: #FF9A4D; --s-com: #F277B5;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F3F6F9; --surface: #FFFFFF; --raised: #E7EEF4; --line: #D5DFE8; --line-2: #BFCDDA;
  --text: #0F2231; --mist: #566B7D; --accent: #C98F00; --on-accent: #FFFFFF;
  --fern: #178A52; --ember: #D9412F; --focus: #1B6FD1;
  --s-ai: #6A57E8; --s-pc: #12808F; --s-gw: #2468D8; --s-web: #D4670F; --s-com: #C23B86;
  --shadow: 0 18px 50px rgba(15,34,49,.18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 'Instrument Sans', system-ui, sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif; font-weight: 650; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(26px, 3.2vw, 36px); }
h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.am, [lang="am"] { font-family: 'Noto Sans Ethiopic', 'Instrument Sans', sans-serif; line-height: 1.75; }
.muted { color: var(--mist); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .wrap { flex-wrap: wrap; }
.gap { gap: 10px; } .gap-s { gap: 6px; } .gap-l { gap: 18px; }
.stack { display: grid; gap: 14px; } .stack-l { display: grid; gap: 22px; }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); display: grid; place-items: center; position: relative; }
.brand-mark::after { content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px var(--surface); }
.brand-mark .ic { color: var(--accent); }
.brand b { font: 650 17px 'Bricolage Grotesque', sans-serif; display: block; line-height: 1.1; }
.brand span { font-size: 12px; color: var(--mist); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: var(--mist); font-weight: 500; position: relative; }
.nav a:hover { color: var(--text); background: var(--raised); }
.nav a.on { color: var(--text); background: var(--raised); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .badge { margin-left: auto; font-size: 12px; background: var(--ember); color: #fff; border-radius: 99px; padding: 0 7px; font-weight: 600; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.me { font-size: 12px; color: var(--mist); padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 3vw, 40px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.page { padding: 26px clamp(16px, 3vw, 40px) 90px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--mist); margin-top: 6px; }
.kbd { font: 500 11px 'Instrument Sans', sans-serif; border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; color: var(--mist); }
.tabbar { display: none; }

/* ------------------------------------------------ rundown: the week as a studio schedule, today lit like a tally light */
.rundown { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; flex: 1; min-width: 0; }
.day { display: grid; gap: 1px; padding: 7px 10px 8px; border-radius: 10px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); position: relative; min-width: 0; transition: border-color .15s, background .15s; }
.day:hover { border-color: var(--line-2); }
.day .dow { font-weight: 650; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.day .role { font-size: 12px; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day .prog { height: 3px; border-radius: 3px; background: var(--raised); margin-top: 5px; overflow: hidden; }
.day .prog i { display: block; height: 100%; background: var(--fern); width: 0; transition: width .35s; }
.day.off { background: transparent; border-style: dashed; }
.day.past { opacity: .7; }
.day.today { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border-color: var(--accent); }
.day.today .dow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 25%, transparent); animation: tally 2.2s ease-in-out infinite; }
@keyframes tally { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ember) 8%, transparent); } }
.rundown.large .day { padding: 12px 14px 13px; gap: 3px; }
.rundown.large .day .dow { font-size: 15px; }
.rundown.large .day .blurb { font-size: 12.5px; color: var(--mist); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rundown:not(.large) .blurb { display: none; }

/* ------------------------------------------------ buttons, fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--raised); color: var(--text); padding: 8px 14px; border-radius: 9px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .1s, border-color .15s, background .15s; }
.btn:hover { border-color: var(--mist); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { background: transparent; border-color: color-mix(in srgb, var(--ember) 55%, var(--line)); color: var(--ember); }
.btn.danger:hover { background: color-mix(in srgb, var(--ember) 14%, transparent); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--mist); cursor: pointer; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.field { display: grid; gap: 6px; }
.field .lab { font-size: 13px; font-weight: 600; color: var(--mist); }
.field .hint { font-size: 12.5px; color: var(--mist); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.seg-ctl { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.seg-ctl button { border: 0; background: transparent; color: var(--mist); padding: 5px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.seg-ctl button.on { background: var(--raised); color: var(--text); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--mist); border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; font-weight: 500; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--mist); font-weight: 500; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--raised); color: var(--mist); white-space: nowrap; }
.pill.late { background: color-mix(in srgb, var(--ember) 18%, transparent); color: var(--ember); }
.pill.ok { background: color-mix(in srgb, var(--fern) 18%, transparent); color: var(--fern); }
.pill.now { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }

/* custom checkbox rows */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.check:hover { background: var(--raised); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; margin-top: 1px; transition: background .15s, border-color .15s, transform .15s; }
.check .box .ic { width: 13px; height: 13px; stroke-width: 3; color: var(--bg); opacity: 0; transform: scale(.4); transition: opacity .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.check input:checked + .box { background: var(--fern); border-color: var(--fern); }
.check input:checked + .box .ic { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check .t { flex: 1; min-width: 0; }
.check input:checked ~ .t .tt { color: var(--mist); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--mist) 50%, transparent); }
.check .meta { font-size: 12.5px; color: var(--mist); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1px; }

/* ------------------------------------------------ surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.panel.flat { background: transparent; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.empty { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 26px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; }

/* ledger: the numbers, set like a log line, not big hero tiles */
.ledger { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.ledger > div { flex: 1 1 130px; padding: 14px 18px; border-right: 1px solid var(--line); }
.ledger > div:last-child { border-right: 0; }
.ledger dt { font-size: 12.5px; color: var(--mist); margin: 0; }
.ledger dd { margin: 2px 0 0; font: 650 24px 'Bricolage Grotesque', sans-serif; }
.ledger dd small { font: 500 13px 'Instrument Sans', sans-serif; color: var(--mist); }
.ledger .late dd { color: var(--ember); }

/* stage bar: seven steps from idea to live */
.stagebar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.stagebar button, .stagebar span { border: 0; height: 8px; border-radius: 4px; background: var(--raised); padding: 0; cursor: default; transition: background .25s; }
.stagebar button { cursor: pointer; }
.stagebar .on { background: var(--accent); }
.stagebar .done { background: var(--fern); }
.stagelabels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; font-size: 11px; letter-spacing: -.01em; color: var(--mist); }
.stagelabels span.on { color: var(--text); font-weight: 600; }
.nextup { display: grid; gap: 16px; }
.nextup .wk { font: 650 13px 'Bricolage Grotesque'; color: var(--mist); }
.nextup h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
.milestones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.milestones div { border-left: 2px solid var(--line-2); padding: 1px 0 1px 10px; }
.milestones .k { font-size: 12px; color: var(--mist); }
.milestones .v { font-weight: 600; font-size: 14px; }
.milestones .late { border-color: var(--ember); } .milestones .late .v { color: var(--ember); }
.milestones .now { border-color: var(--accent); }
.alert { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ember) 50%, var(--line)); background: color-mix(in srgb, var(--ember) 10%, var(--surface)); }
.alert .ic { color: var(--ember); }
.bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s; }
.series-row { display: grid; grid-template-columns: 150px 1fr 54px; gap: 12px; align-items: center; font-size: 13.5px; }
.upcoming { display: grid; }
.upcoming button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; border-radius: 0; }
.upcoming button:last-child { border-bottom: 0; }
.upcoming button:hover { background: var(--raised); }
.upcoming .n { font: 650 15px 'Bricolage Grotesque'; color: var(--mist); }
.upcoming .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

/* ------------------------------------------------ pipeline */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 8px; min-height: 140px; align-content: start; transition: border-color .15s, background .15s; }
.col.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.col-h { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 4px; }
.col-h b { font: 650 14px 'Bricolage Grotesque'; } .col-h span { color: var(--mist); font-size: 13px; }
.vcard { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 10px 12px; cursor: grab; display: grid; gap: 6px; border-left: 3px solid var(--sc, var(--mist)); transition: transform .12s, border-color .15s; }
.vcard:hover { border-color: var(--line-2); border-left-color: var(--sc); transform: translateY(-1px); }
.vcard.dragging { opacity: .4; }
.vcard .t { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vcard .m { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--mist); }
.more { border: 1px dashed var(--line-2); background: transparent; color: var(--mist); border-radius: 10px; padding: 7px; cursor: pointer; }
.vlist { display: grid; }
.vrow { display: grid; grid-template-columns: 24px 40px minmax(0, 1fr) 150px 112px 112px auto; gap: 12px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; }
.vrow:hover { background: var(--surface); }
.vrow .grip { color: var(--mist); cursor: grab; display: grid; place-items: center; }
.vrow .n { font: 650 15px 'Bricolage Grotesque'; color: var(--mist); }
.vrow .tt { min-width: 0; text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow.dragging { opacity: .35; }
.vrow.drop-before::before, .vrow.drop-after::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); }
.vrow.drop-before::before { top: -1px; } .vrow.drop-after::after { bottom: -1px; }
.vrow .mv { display: flex; opacity: 0; } .vrow:hover .mv, .vrow:focus-within .mv { opacity: 1; }
.vrow.done .tt { color: var(--mist); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.cal .dh { padding: 8px 10px; font-size: 12.5px; color: var(--mist); font-weight: 600; border-bottom: 1px solid var(--line); background: var(--bg); }
.cal .cell { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 3px; align-content: start; }
.cal .cell:nth-child(7n) { border-right: 0; }
.cal .cell.out { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); color: var(--mist); }
.cal .cell .d { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.cal .cell.today .d { background: var(--accent); color: var(--on-accent); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; padding: 2px 6px; font-size: 12px; font-weight: 550; cursor: pointer; background: color-mix(in srgb, var(--sc) 20%, transparent); color: var(--text); border-left: 3px solid var(--sc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.publish { background: var(--sc); color: var(--bg); }

/* ------------------------------------------------ drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4, 10, 16, .6); display: flex; justify-content: flex-end; animation: fade .18s; }
.scrim.center { justify-content: center; align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(860px, 100%); height: 100%; background: var(--bg); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; animation: slide .26s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-h { padding: 18px 24px 0; display: grid; gap: 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-h h2 { font-size: 22px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--mist); padding: 10px 14px; cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.drawer-b { padding: 22px 24px 60px; overflow-y: auto; flex: 1; }
.savestate { font-size: 12.5px; color: var(--mist); min-width: 70px; text-align: right; }
.savestate.err { color: var(--ember); }
.part { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 14px 16px; display: grid; gap: 10px; }
.part-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.part-h b { font: 650 16px 'Bricolage Grotesque'; }
.part .hint { font-size: 13px; color: var(--mist); }
.script-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.script-cols .lab { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--mist); font-weight: 600; margin-bottom: 4px; }
.script-cols textarea { min-height: 130px; }
.phase { display: grid; gap: 2px; }
.phase h3 { margin: 8px 0 4px; }
.progress-line { display: grid; gap: 6px; }

/* ------------------------------------------------ teleprompter */
.tp { position: fixed; inset: 0; z-index: 90; background: #000; color: #fff; display: flex; flex-direction: column; }
.tp-bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: #0b0b0b; border-bottom: 1px solid #222; color: #cfd8df; font-size: 13px; }
.tp-bar label { display: flex; gap: 8px; align-items: center; }
.tp-bar input[type=range] { width: 120px; accent-color: var(--accent); padding: 0; }
.tp-bar .btn { background: #1b1b1b; border-color: #333; color: #fff; }
.tp-view { flex: 1; overflow-y: scroll; scrollbar-width: none; position: relative; }
.tp-view::-webkit-scrollbar { display: none; }
.tp-text { max-width: 980px; margin: 0 auto; padding: 40vh 40px 60vh; font-weight: 600; line-height: 1.55; }
.tp-text.mirror { transform: scaleX(-1); }
.tp-text .tp-h { font: 600 .4em 'Instrument Sans'; color: var(--accent); margin: 1.6em 0 .4em; }
.tp-text p { margin: 0 0 .9em; white-space: pre-wrap; }
.tp-line { position: absolute; left: 0; right: 0; top: 40%; height: 0; border-top: 2px solid color-mix(in srgb, var(--ember) 80%, transparent); pointer-events: none; }
.tp-line::before { content: ''; position: absolute; left: 8px; top: -8px; border: 7px solid transparent; border-left-color: var(--ember); }

/* ------------------------------------------------ palette, dialogs, toasts */
.palette { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; align-self: flex-start; margin-top: 12vh; animation: pop .16s; }
@keyframes pop { from { transform: translateY(-6px) scale(.98); opacity: 0; } }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; background: transparent !important; box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 9px; cursor: pointer; }
.palette li button[aria-selected=true] { background: var(--raised); }
.palette .grp { font-size: 12px; color: var(--mist); padding: 8px 12px 2px; }
.dialog { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; width: min(440px, 100%); display: grid; gap: 14px; box-shadow: var(--shadow); animation: pop .16s; max-height: 92vh; overflow-y: auto; }
.dialog.wide { width: min(560px, 100%); }
#toasts { position: fixed; z-index: 120; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow); animation: toast-in .22s cubic-bezier(.2, .8, .2, 1); }
.toast.success { background: var(--fern); color: #04170d; } .toast.error { background: var(--ember); color: #1d0502; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .22s; }
.toast-act { border: 0; background: transparent; font-weight: 700; text-decoration: underline; cursor: pointer; color: inherit; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 130; pointer-events: none; }

/* ------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.auth-art h1 { font-size: clamp(32px, 4.4vw, 54px); max-width: 12ch; line-height: 1.05; }
.auth-art .am { font-size: clamp(16px, 1.6vw, 20px); color: var(--mist); margin-top: 14px; }
.week-demo { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 520px; }
.week-demo .day { cursor: default; }
.auth-form { display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(400px, 100%); display: grid; gap: 16px; }
.auth-card .notice { padding: 11px 14px; border-radius: 10px; font-size: 14px; background: var(--raised); }
.auth-card .notice.err { background: color-mix(in srgb, var(--ember) 15%, var(--surface)); color: var(--ember); }
.auth-card .notice.ok { background: color-mix(in srgb, var(--fern) 15%, var(--surface)); }
.boot { min-height: 100vh; display: grid; place-items: center; text-align: center; gap: 10px; align-content: center; color: var(--mist); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--raised); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ misc screens */
.timer { display: grid; gap: 10px; justify-items: start; }
.timer .time { font: 650 44px 'Bricolage Grotesque'; letter-spacing: -.02em; }
.daytabs { display: flex; gap: 6px; flex-wrap: wrap; }
.todo { display: flex; align-items: flex-start; gap: 4px; }
.todo .check { flex: 1; min-width: 0; }
.todo .icon-btn { opacity: 0; } .todo:hover .icon-btn, .todo:focus-within .icon-btn { opacity: 1; }
.idea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.idea.used { opacity: .55; }
.idea .why { grid-column: 1; font-size: 13.5px; color: var(--mist); }
.idea .acts { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; align-items: center; }
.playbook-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.rule { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--mist); font: 500 11px 'Instrument Sans', sans-serif; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .barv { fill: var(--accent); transition: opacity .15s; } .chart .barv:hover { opacity: .8; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12.5px; color: var(--mist); font-weight: 600; }

/* ------------------------------------------------ small screens */
@media (max-width: 1000px) {
  .cols, .cols.even { grid-template-columns: minmax(0, 1fr); }
  .vrow { grid-template-columns: 24px 36px minmax(0, 1fr) auto; }
  .vrow .c-series, .vrow .c-rec, .vrow .c-pub { display: none; }
  .vrow .mv { opacity: 1; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; text-decoration: none; color: var(--mist); padding: 4px 0; border-radius: 8px; font-weight: 500; }
  .tabbar a.on { color: var(--accent); }
  .tabbar .ic { width: 22px; height: 22px; }
  .rundown { overflow-x: auto; grid-template-columns: repeat(7, minmax(78px, 1fr)); }
  .rundown .role { display: none; }
  .rundown.large .role { display: block; }
  .rundown.large { grid-template-columns: repeat(7, minmax(124px, 1fr)); }
  .stagelabels span:not(.on) { visibility: hidden; }
  .stagelabels span.on { white-space: nowrap; }
  .script-cols { grid-template-columns: 1fr; }
  .milestones { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .series-row { grid-template-columns: 110px 1fr 46px; }
  .page { padding-top: 18px; }
  .topbar .kbd { display: none; }
  .drawer-b { padding: 18px 16px 60px; } .drawer-h { padding: 14px 16px 0; }
  #toasts { bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================== tech layer: atmosphere, glass, light and motion */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
:root, :root[data-theme="dark"] { --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; --glow: color-mix(in srgb, var(--accent) 38%, transparent); --a1: .24; --a2: .2; --a3: .1; --cy: #4FD6E8; }
:root[data-theme="light"] { --glow: color-mix(in srgb, var(--accent) 30%, transparent); --a1: .13; --a2: .1; --a3: .07; --cy: #12A3BA; }

/* atmosphere: slow aurora plus a faint engineering grid that fades toward the edges */
body { position: relative; }
body::before { content: ''; position: fixed; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 88% -8%, color-mix(in srgb, var(--cy) calc(var(--a1) * 100%), transparent), transparent 62%),
    radial-gradient(760px 520px at -6% 18%, color-mix(in srgb, var(--s-ai) calc(var(--a2) * 100%), transparent), transparent 62%),
    radial-gradient(680px 420px at 62% 112%, color-mix(in srgb, var(--accent) calc(var(--a3) * 100%), transparent), transparent 62%);
  animation: aurora 26s ease-in-out infinite alternate; }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%); }
@keyframes aurora { to { transform: translate3d(-3%, 2%, 0) scale(1.08); } }

/* glass surfaces with a cursor spotlight */
.panel, .ledger, .col, .part, .dialog, .palette { background: color-mix(in srgb, var(--surface) 76%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.panel, .ledger, .part { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--line-2) 65%, transparent); transition: border-color .25s, transform .25s; }
.panel::before, .vcard::before, .day::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--cy) 16%, transparent), transparent 70%); }
.panel:hover::before, .vcard:hover::before, .day:hover::before { opacity: 1; }
.panel:hover { border-color: color-mix(in srgb, var(--cy) 35%, var(--line-2)); }
.vcard, .day { position: relative; overflow: hidden; }
.panel > *, .vcard > *, .day > * { position: relative; }
.panel.flat { background: transparent; backdrop-filter: none; }

/* the video you are working on gets a slowly circling light on its border */
.nextup { border: 1px solid transparent !important;
  background: linear-gradient(color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 92%, transparent)) padding-box,
              conic-gradient(from var(--ang), var(--accent), var(--cy), var(--s-ai), var(--accent)) border-box !important;
  animation: spin-ang 7s linear infinite; }
@keyframes spin-ang { to { --ang: 360deg; } }

/* sidebar */
.side { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--bg) 92%, transparent)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.brand-mark { box-shadow: 0 0 0 1px var(--line-2), 0 0 22px -4px var(--glow); }
.brand-mark::after { animation: rec 1.8s ease-in-out infinite; }
@keyframes rec { 50% { box-shadow: 0 0 0 3px var(--surface), 0 0 14px 4px color-mix(in srgb, var(--ember) 70%, transparent); } }
.nav a { transition: color .2s, background .2s, transform .2s; }
.nav a:hover { transform: translateX(3px); }
.nav a .ic { transition: transform .25s, color .2s; }
.nav a:hover .ic, .nav a.on .ic { color: var(--accent); transform: scale(1.12); }
.nav a.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, var(--raised)), var(--raised) 70%); }
.nav a.on::before { box-shadow: 0 0 14px 1px var(--accent); }

/* buttons */
.btn { position: relative; overflow: hidden; }
.btn.primary { background: linear-gradient(135deg, #FFD95A, var(--accent) 50%, #E89F00); border-color: transparent; box-shadow: 0 8px 24px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35); }
:root[data-theme="light"] .btn.primary { background: linear-gradient(135deg, #E6A800, var(--accent)); color: #fff; }
.btn.primary:hover { box-shadow: 0 10px 30px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .4); filter: none; transform: translateY(-1px); }
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); transform: translateX(-120%); }
.btn.primary:hover::after { transform: translateX(120%); transition: transform .7s; }
.btn:not(.primary):hover { border-color: var(--cy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cy) 14%, transparent); }
.chip { transition: all .2s; } .chip:hover { border-color: var(--cy); }
.chip.on { background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--text) 80%, var(--cy))); }

/* numbers and timecodes use a monospaced face, like an editor's counter */
.timer .time, .upcoming .n, .vrow .n, .nextup .wk, .milestones .v, .vrow .c-rec, .kbd, .tp-bar span, .week-demo .dow, .tc { font-family: var(--mono); letter-spacing: -.02em; }
.timer .time { font-size: 48px; font-weight: 600; background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 55%, var(--cy))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ledger dd { font-variant-numeric: tabular-nums; }

/* day strip: today glows, the rest light up as you pass over them */
.day { transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.day:hover { transform: translateY(-2px); }
.day.today { box-shadow: 0 0 0 1px var(--accent), 0 10px 30px -12px var(--glow); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 20%, var(--surface)), color-mix(in srgb, var(--surface) 90%, transparent)); }
.day .prog i { background: linear-gradient(90deg, var(--fern), var(--cy)); }

/* stage bar */
.stagebar .done { background: linear-gradient(90deg, var(--fern), color-mix(in srgb, var(--fern) 60%, var(--cy))); }
.stagebar .on { background: linear-gradient(90deg, var(--accent), #fff6, var(--accent)); background-size: 220% 100%; animation: shimmer 2.4s linear infinite; box-shadow: 0 0 12px -1px var(--glow); }
@keyframes shimmer { to { background-position: -220% 0; } }
.stagebar button:hover { background: var(--mist); }

/* board cards and rows */
.vcard { transition: transform .2s, border-color .2s, box-shadow .25s; }
.vcard:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--sc) 45%, transparent), 0 14px 30px -14px color-mix(in srgb, var(--sc) 70%, transparent); transform: translateY(-3px); }
.col.over { box-shadow: inset 0 0 0 1px var(--accent), 0 0 40px -10px var(--glow); }
.ev { transition: transform .15s, filter .15s; } .ev:hover { transform: translateY(-1px); filter: brightness(1.15); }
.dot { box-shadow: 0 0 8px 0 currentColor; }
.bar i { background-image: linear-gradient(90deg, rgba(255,255,255,.0), rgba(255,255,255,.28), rgba(255,255,255,0)); background-size: 60px 100%; background-repeat: no-repeat; animation: sweep 3.2s linear infinite; }
@keyframes sweep { from { background-position: -60px 0; } to { background-position: 400px 0; } }
.check .box { transition: background .2s, border-color .2s, box-shadow .2s; }
.check input:checked + .box { box-shadow: 0 0 14px -2px var(--fern); }
.pill.now { box-shadow: 0 0 12px -3px var(--accent); }
.pill.late { animation: warn 2.4s ease-in-out infinite; }
@keyframes warn { 50% { box-shadow: 0 0 12px -2px var(--ember); } }
.alert { animation: rise .5s both; }
.topbar { box-shadow: 0 1px 0 var(--line), 0 12px 30px -24px #000; }

/* one orchestrated moment each time you open a screen: sections rise in, bars grow */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } }
.page.enter .stack-l > *, .page.enter .cols > div > *, .page.enter .page-head, .page.enter .playbook-nav, .page.enter .toolbar { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.page.enter .stack-l > :nth-child(2), .page.enter .cols > div > :nth-child(1) { animation-delay: .06s; }
.page.enter .stack-l > :nth-child(3), .page.enter .cols > div > :nth-child(2) { animation-delay: .12s; }
.page.enter .stack-l > :nth-child(4), .page.enter .cols > div > :nth-child(3) { animation-delay: .18s; }
.page.enter .stack-l > :nth-child(5) { animation-delay: .24s; }
.page.enter .stack-l > :nth-child(n+6) { animation-delay: .3s; }
.page.enter .bar i, .page.enter .day .prog i { transform-origin: left; animation: grow .9s .25s cubic-bezier(.2, .8, .2, 1) both, sweep 3.2s 1.2s linear infinite; }
.page.enter .stagebar > * { animation: pop-in .4s both; }
.page.enter .stagebar > :nth-child(2) { animation-delay: .05s; } .page.enter .stagebar > :nth-child(3) { animation-delay: .1s; } .page.enter .stagebar > :nth-child(4) { animation-delay: .15s; }
.page.enter .stagebar > :nth-child(5) { animation-delay: .2s; } .page.enter .stagebar > :nth-child(6) { animation-delay: .25s; } .page.enter .stagebar > :nth-child(7) { animation-delay: .3s; }
.page.enter .rundown .day { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.page.enter .rundown .day:nth-child(2) { animation-delay: .04s; } .page.enter .rundown .day:nth-child(3) { animation-delay: .08s; } .page.enter .rundown .day:nth-child(4) { animation-delay: .12s; }
.page.enter .rundown .day:nth-child(5) { animation-delay: .16s; } .page.enter .rundown .day:nth-child(6) { animation-delay: .2s; } .page.enter .rundown .day:nth-child(7) { animation-delay: .24s; }
.page.enter .vcard { animation: pop-in .4s both; }

/* sign-in: a miniature editing timeline with a moving playhead */
.auth-art { background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--bg) 70%, transparent)); }
.auth-art h1 { background: linear-gradient(120deg, var(--text) 30%, var(--cy)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art .am { animation: rise .8s .3s both; }
.auth-art h1 { animation: rise .8s .1s both; }
.tl { max-width: 560px; border: 1px solid var(--line-2); border-radius: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 12px 14px 14px; position: relative; overflow: hidden; box-shadow: 0 30px 60px -30px #000; }
.tl-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--mist); margin-bottom: 8px; }
.tl-top .rec { display: inline-flex; gap: 7px; align-items: center; color: var(--ember); font-weight: 600; font-family: var(--mono); }
.tl-top .rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); animation: rec 1.2s ease-in-out infinite; }
.tl-ruler, .tl-track { display: grid; grid-template-columns: 62px repeat(7, 1fr); align-items: center; gap: 0; }
.tl-ruler span { font: 500 11px var(--mono); color: var(--mist); padding: 2px 0 6px; border-left: 1px solid var(--line); padding-left: 5px; }
.tl-ruler span:first-child { border: 0; }
.tl-track { height: 30px; margin-top: 6px; }
.tl-track b { font: 600 11px var(--mono); color: var(--mist); }
.clip { grid-row: 1; height: 24px; border-radius: 7px; padding: 0 8px; display: flex; align-items: center; font-size: 11.5px; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); animation: clip 8s linear infinite; animation-delay: calc(var(--p) * 8s - 0.4s); white-space: nowrap; overflow: hidden; }
@keyframes clip { 0% { filter: brightness(1.7); box-shadow: 0 0 22px 2px var(--c); } 14%, 100% { filter: none; } }
.wave { grid-column: 4 / span 1; grid-row: 1; display: flex; align-items: center; gap: 2px; height: 24px; }
.wave i { flex: 1; background: var(--s-pc); border-radius: 2px; height: 100%; transform: scaleY(.2); animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--k) * -0.09s); opacity: .85; }
@keyframes wave { 50% { transform: scaleY(1); } }
.playhead { position: absolute; top: 34px; bottom: 10px; left: var(--pl, 76px); width: 2px; background: var(--accent); box-shadow: 0 0 14px 2px var(--glow); animation: play 8s linear infinite; }
.playhead::before { content: ''; position: absolute; top: -6px; left: -5px; border: 6px solid transparent; border-top-color: var(--accent); }
@keyframes play { from { left: var(--pl, 76px); } to { left: calc(100% - 14px); } }

/* boot screen */
.boot .spinner { width: 54px; height: 54px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-right-color: var(--cy); box-shadow: 0 0 30px -6px var(--glow); }

/* toasts, dialogs */
.toast { backdrop-filter: blur(8px); }
.scrim { backdrop-filter: blur(3px); }

@media (max-width: 820px) { .tl-ruler, .tl-track { grid-template-columns: 50px repeat(7, 1fr); } .tl { --pl: 64px; } }
@media (prefers-reduced-motion: reduce) { body::before, .nextup, .playhead, .clip, .wave i, .bar i, .stagebar .on { animation: none !important; } .nextup { --ang: 140deg; } }

/* ---------------------------------------------------------------- motion layer 2: ripple, tilt, sparks, journey road */
.btn, .icon-btn { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); pointer-events: none; animation: ripple .6s ease-out forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
[data-tilt] { transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s; will-change: transform; }
[data-tilt].tilting { transition: transform .08s linear, border-color .25s; }
.spark { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--accent); pointer-events: none; z-index: 90; animation: spark .55s ease-out forwards; }
.spark:nth-of-type(odd) { background: var(--cy); }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.check:active .box { transform: scale(.85); }

.journey-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.ring-box { position: relative; width: 64px; height: 64px; flex: none; }
.ring { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--c); animation: ringfill 1.4s .2s cubic-bezier(.2, .8, .2, 1) forwards; filter: drop-shadow(0 0 6px var(--glow)); }
@keyframes ringfill { to { stroke-dashoffset: var(--off); } }
.ring-n { position: absolute; inset: 0; display: grid; place-items: center; font: 700 .95rem var(--mono); }
.journey-wrap { position: relative; }
.journey-svg { width: 100%; height: auto; display: block; overflow: visible; }
.j-base { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.j-prog { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--glow)); stroke-dashoffset: var(--len, 9999); opacity: 0; }
.j-prog.go { opacity: 1; animation: roadgrow 1.8s .15s cubic-bezier(.3, .7, .2, 1) forwards; }
@keyframes roadgrow { to { stroke-dashoffset: var(--to); } }
.j-node { cursor: pointer; outline: none; }
.j-dot { fill: var(--surface); stroke: var(--sc, var(--mist)); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: dotin .45s cubic-bezier(.3, 1.6, .5, 1) backwards; transition: transform .2s; }
.j-node.pub .j-dot { fill: var(--sc); }
.j-node:hover .j-dot, .j-node:focus-visible .j-dot { transform: scale(1.35); }
.j-node:focus-visible .j-dot { stroke: var(--text); }
@keyframes dotin { from { transform: scale(0); opacity: 0; } }
.j-tick { fill: none; stroke: var(--bg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.j-num { font: 600 8px var(--mono); fill: var(--muted); text-anchor: middle; pointer-events: none; }
.j-pulse { fill: none; stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: jpulse 1.8s ease-out infinite; }
@keyframes jpulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.j-tip { position: absolute; transform: translate(-50%, -100%); background: var(--raised); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; display: grid; gap: 2px; max-width: 220px; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); font-size: .85rem; z-index: 5; animation: tipin .15s ease-out; }
.j-tip[hidden] { display: none; }
.j-tip small { color: var(--muted); }
@keyframes tipin { from { opacity: 0; transform: translate(-50%, -92%); } }

.shortcuts { display: grid; gap: 4px; margin-top: 10px; }
.shortcuts > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.shortcuts .kbd + .kbd { margin-left: 4px; }

.toast { position: relative; overflow: hidden; }
.toast::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: toastbar 3.6s linear forwards; }
.toast.error::after { background: var(--ember, #e5533d); animation-duration: 7s; }
@keyframes toastbar { to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .ring-fg { animation: none; stroke-dashoffset: var(--off); }
  .j-prog.go { animation: none; stroke-dashoffset: var(--to); }
  .j-dot, .j-pulse, .toast::after { animation: none; }
  [data-tilt] { transform: none !important; }
}
