/* Monday — Jarvis redesign (v12): deep space, robot-eye core, framed edge panels. */

:root {
  --eye-size: min(84vw, 340px, 43vh);
  --reactor-size: var(--eye-size);
  --amber: #ffa01e;
  --panel-bg: rgba(3, 14, 26, 0.62);
  --panel-line: rgba(0, 229, 255, 0.32);
}

#app { background: #01040a; }
.hud-wash { background: radial-gradient(ellipse 60% 40% at 50% 48%, rgba(0, 120, 170, 0.12), transparent 70%); }
.vignette {
  background:
    radial-gradient(ellipse 85% 70% at 50% 48%, transparent 45%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 14%, transparent 86%, rgba(0, 0, 0, 0.6) 100%);
}
html:has(#app.state-thinking) .hud-wash { background: radial-gradient(ellipse 60% 40% at 50% 48%, rgba(255, 140, 30, 0.12), transparent 70%); transition: background 1s; }

/* ---------- Layout ---------- */
.hud.jv {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  grid-template-areas: "top" "etop" "center" "ebot" "ret";
  gap: 8px;
  padding: calc(var(--safe-top) + 6px) 12px calc(var(--safe-bottom) + 4px);
}
.hud.jv .hud-top { grid-area: top; }
.hud.jv .edge-top { grid-area: etop; }
.hud.jv .col-center { grid-area: center; }
.hud.jv .edge-bottom { grid-area: ebot; }
.hud.jv .reticle { grid-area: ret; }

.edge { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; min-width: 0; }

/* framed panel with notched corners (pin 1) */
.jp {
  position: relative;
  min-width: 0;
  padding: 16px 10px 8px;
  background:
    linear-gradient(var(--panel-line), var(--panel-line)) left top / 14px 1px no-repeat,
    linear-gradient(var(--panel-line), var(--panel-line)) left top / 1px 14px no-repeat,
    linear-gradient(var(--panel-line), var(--panel-line)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--panel-line), var(--panel-line)) right bottom / 1px 14px no-repeat,
    var(--panel-bg);
  border: 1px solid rgba(0, 229, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  overflow: hidden;
}
.jp::after {
  content: ''; position: absolute; right: 0; top: 0; width: 17px; height: 1px;
  background: var(--cyan); transform-origin: right top; transform: rotate(45deg) translate(2px, -1px); opacity: 0.6;
}
.jp-label {
  position: absolute; left: 10px; top: 4px;
  font: 600 8.5px/1 "Orbitron", "Rajdhani", sans-serif; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(0, 229, 255, 0.7);
}
.jp-label::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 6px; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); vertical-align: 0; }

/* time panel */
.jp-clock { display: flex; align-items: baseline; gap: 4px; }
.jp-clock strong {
  font: 600 30px/1 "Orbitron", "Rajdhani", sans-serif; letter-spacing: 0.04em;
  color: var(--cyan-hot); text-shadow: 0 0 14px rgba(0, 229, 255, 0.65);
}
.jp-clock span { font: 600 12px/1 "Orbitron", sans-serif; color: var(--cyan); opacity: 0.75; }
.jp-time .clock-date { margin: 4px 0 4px; font-size: 10px; letter-spacing: 0.16em; text-align: left; }
.jp-time .world-clocks { gap: 10px; }
.jp-time .world-clock .wc-name { font-size: 7.5px; }
.jp-time .world-clock .wc-time { font-size: 11px; }

/* weather panel */
.jp-weather { cursor: pointer; pointer-events: auto; }
.jp-weather .weather-now { gap: 6px; }
.jp-weather .temp-value { font-size: 30px; }
.jp-weather .weather-icon { width: 30px; height: 30px; }
.jp-weather .weather-place { font-size: 11px; }
.jp-weather .weather-cond { font-size: 10px; }
.jp-weather .weather-sun { font-size: 9px; }
.jp-weather .forecast { margin-top: 4px; gap: 2px; }
.jp-weather .forecast-day .dow { font-size: 8px; }
.jp-weather .forecast-day .icon { width: 16px; height: 16px; }
.jp-weather .forecast-day .temps { font-size: 9px; }
.jp-weather .forecast-day:nth-child(n+5) { display: none; }

/* ---------- Core ---------- */
.hud.jv .col-center { justify-content: center; gap: 2px; }
.hud.jv .core-stack { width: var(--eye-size); height: var(--eye-size); }
.eye-wrap { display: grid; place-items: center; }
.eye-canvas { display: block; }
.hud.jv .reactive-halo { display: none; }
.corner-txt {
  position: absolute; z-index: 2;
  font: 500 7.5px/1.35 "Orbitron", "Rajdhani", sans-serif; letter-spacing: 0.18em;
  color: rgba(0, 229, 255, 0.38); pointer-events: none; white-space: nowrap;
}
.corner-txt.tl { left: -4px; top: 2px; }
.corner-txt.tr { right: -4px; top: 2px; text-align: right; }
.corner-txt.bl { left: -4px; bottom: 30px; }
.corner-txt.br { right: -4px; bottom: 30px; text-align: right; }
html:has(#app.state-thinking) .corner-txt { color: rgba(255, 160, 30, 0.45); }

/* pill badges for mode / voices (pin 2 glowing pills) */
.hud.jv .mode-btn, .hud.jv .voices-btn {
  bottom: -4px; padding: 6px 13px; font-size: 9px;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.18), inset 0 0 8px rgba(0, 229, 255, 0.12);
  background: rgba(2, 16, 26, 0.75);
}
.hud.jv .mode-btn { right: 0; }
.hud.jv .voices-btn { left: 0; }

.hud.jv .status-block { margin-top: 2px; min-height: 2.6em; }
.hud.jv .status {
  font-family: "Orbitron", "Rajdhani", sans-serif; font-size: 11px; letter-spacing: 0.32em;
}
.job-badge {
  display: inline-block; margin: 0 auto 4px; padding: 4px 12px;
  border: 1px solid rgba(255, 160, 30, 0.6); border-radius: 999px;
  color: #ffc46b; background: rgba(60, 25, 0, 0.55);
  font: 600 9px/1 "Orbitron", "Rajdhani", sans-serif; letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: 0 0 14px rgba(255, 150, 30, 0.35);
  animation: job-pulse 1.4s ease-in-out infinite;
}
.job-badge[hidden] { display: none; }
@keyframes job-pulse { 50% { box-shadow: 0 0 22px rgba(255, 150, 30, 0.6); } }
#app.state-thinking .status { color: #ffc46b; text-shadow: 0 0 10px rgba(255, 150, 30, 0.6); }

/* ---------- Bottom panels ---------- */
.edge-bottom { grid-template-columns: 1fr 1.25fr; }
.sys-list { list-style: none; display: grid; gap: 3px; }
.sys-list li { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.sys-list li span { color: rgba(0, 229, 255, 0.55); }
.sys-list li b { font-weight: 600; color: var(--cyan-hot); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys-list b[data-on="1"]::before { content: '● '; color: #5dffb0; font-size: 8px; }
.hud.jv .hud-graphs { margin-top: 5px; gap: 2px; }
.hud.jv .graph-canvas { height: 18px; }
.hud.jv .graph-label { font-size: 7.5px; }
.jp-news .news-list { gap: 4px; }
.jp-news .news-list li { font-size: 10.5px; -webkit-line-clamp: 2; }
.jp-news .news-list li:nth-child(n+4) { display: none; }

.reticle { display: flex; justify-content: center; height: 22px; pointer-events: none; }
.reticle svg { height: 100%; fill: none; stroke: rgba(0, 229, 255, 0.45); stroke-width: 1.4; filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.5)); }
html:has(#app.state-thinking) .reticle svg { stroke: rgba(255, 160, 30, 0.55); }

.brand { padding-bottom: 2px; }

/* short phones */
@media (max-height: 720px) and (orientation: portrait) {
  :root { --eye-size: min(78vw, 300px, 38vh); }
  .hud.jv .date-strip { display: none; }
  .jp-weather .forecast { display: none; }
  .hud.jv .hud-graphs { display: none; }
  .reticle { display: none; }
  .hud.jv { grid-template-areas: "top" "etop" "center" "ebot" "ebot"; }
}

/* landscape: panels to the sides */
@media (orientation: landscape) and (min-aspect-ratio: 1.15) {
  :root { --eye-size: min(62vh, 300px); }
  .hud.jv {
    grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.2fr) minmax(200px, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "top top top" "etop center ebot" "ret ret ret";
  }
  .edge { grid-template-columns: 1fr; align-content: center; }
}

/* reduced motion: no pulsing chrome (the eye itself slows right down) */
@media (prefers-reduced-motion: reduce) {
  .job-badge { animation: none; }
}

html[data-icon] .edge, html[data-icon] .reticle, html[data-icon] .corner-txt { display: none !important; }
.gate-logo { display: block; width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 16px; box-shadow: 0 0 24px rgba(0, 229, 255, 0.25); }
