/* The AI Radar (radar.html, app/radar-item.html). Same world as AI News: its tokens, type and components (news.css),
   plus the Radar's own parts: the job picker, the lane thread, tool rows with one-colour marks, and the item page. */

.radar-col { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.rd-head .nx-actions { display: flex; align-items: center; gap: 2px; }
.rd-india { height: 38px; padding: 0 14px; margin-right: 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 14px; font-weight: 500; }
.rd-india:hover { border-color: var(--ink); }
.rd-india[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.rd-h2 { margin: 22px 0 0; font: 600 28px/1.1 var(--sans); letter-spacing: -.01em; }
.rd-title { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; font: 600 34px/1.1 var(--sans); letter-spacing: -.015em; }
.rd-title .ico { width: 26px; height: 26px; color: var(--accent-ink); }
.rd-sub { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.rd-h3 { margin: 30px 0 6px; font: 600 24px/1.12 var(--sans); }

/* what are you building? six jobs: two columns on a phone, one row on a wide screen */
.jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.job { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); font-size: 13.5px; font-weight: 500; text-align: left; transition: background .15s, border-color .15s, color .15s; }
.job .ico { width: 17px; height: 17px; color: var(--accent-ink); }
.job:hover { border-color: var(--ink); }
.job[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); font-weight: 600; }
.job[aria-pressed="true"] .ico { color: var(--peach); }
.job:active { transform: translateY(1px); }

/* the lanes for that job, on a thread: decide them in this order */
.stack { display: grid; margin-top: 8px; }
.step { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; }
.thread { position: relative; display: flex; justify-content: center; padding-top: 22px; }
.thread .ico { position: relative; z-index: 1; box-sizing: border-box; width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--sheet); box-shadow: 0 0 0 1px var(--line-strong); color: var(--accent-ink); }
.thread::after { content: ""; position: absolute; top: 56px; bottom: -22px; width: 1px; background: var(--line-strong); }
.step.last .thread::after { display: none; }
.sb { min-width: 0; }
.sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 0 4px; }
.sh h3 { margin: 0; font: 600 20px/1.12 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh a { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); text-decoration: none; white-space: nowrap; }
.sh a .ico { width: 15px; height: 15px; }

/* the back links in a lane, this week and Saved line their arrow up with the content, like the tool page */
.radar-col > section > .back { margin-left: -10px; }

/* one tool: its mark, its name, one short line */
.rows { display: grid; }
.ri { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ri.first { border-top: 0; }
.ri:hover .nm b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.ri .bd { display: grid; gap: 4px; min-width: 0; }
.ri .nm { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ri .nm b { font-size: 16.5px; font-weight: 600; line-height: 1.3; }
.ri .ln { font-size: 14.5px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.mk { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; box-sizing: border-box; border-radius: 11px; background: var(--sand-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.mk .ico { width: 18px; height: 18px; }
.mk .ico.brand { color: var(--ink); }
.mk.sm { width: 28px; height: 28px; border-radius: 8px; }
.mk.sm .ico { width: 14px; height: 14px; }
.mk.lg { width: 56px; height: 56px; border-radius: 15px; }
.mk.lg .ico { width: 26px; height: 26px; }
.mv { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.mv.new { background: var(--peach-soft); color: var(--accent-ink); }
.mv.changed { background: var(--sand-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.in-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12px; font-weight: 600; }

/* this week: a card at the end of the stack on a phone, in the side column on a wide screen */
.week-inline { margin-top: 24px; }
.rd-week { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--sand-2); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.rd-week .wh { display: flex; align-items: center; gap: 10px; }
.rd-week .wh .ico { width: 20px; height: 20px; color: var(--accent-ink); }
.rd-week .wh b { font-weight: 600; font-size: 15.5px; }
.rd-week .wc { grid-column: 1; padding-left: 30px; font-size: 14px; color: var(--muted); }
.rd-week > .ico { grid-row: 1 / 3; grid-column: 2; width: 18px; height: 18px; }
.rd-week.in-side { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 20px; background: var(--sheet); }
.rd-week.in-side .wh b { font: 600 22px/1.12 var(--sans); }
.rd-week.in-side .wc { padding-left: 0; }
.rd-week .wl { display: grid; margin-top: 6px; }
.rd-week .wl > a { display: flex; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.rd-week .wl > a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.rd-week .wl b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-week .wh a { color: inherit; text-decoration: none; }
.rd-week .wb { margin-top: 10px; justify-content: center; }
@media (min-width: 1180px) { .week-inline { display: none; } }

/* signed out: the strip, then the way in */
#radar-gate { margin-top: 16px; }
@media (min-width: 1000px) {
  #radar-gate:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
  #radar-gate .rd-strip { max-width: none; }
  #radar-gate .news-gate { margin-top: 0 !important; }
}
.rd-strip { display: block; width: 100%; height: auto; max-width: 520px; border-radius: var(--r-lg); background: var(--sheet); }
#radar-gate .news-gate { margin-top: 14px; }
[data-theme="dark"] .rd-strip { filter: brightness(.88); }

/* one tool's page */
.rd-item-col .st-bar { margin-bottom: 4px; }
.rd-item .ih { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.rd-item h1 { margin: 16px 0 0; font: 600 36px/1.1 var(--sans); letter-spacing: -.015em; }
.rd-item .im { margin: 8px 0 0; font-size: 14.5px; font-weight: 500; color: var(--faint); }
.rd-item .useful { margin: 20px 0 0; font: 400 20px/1.4 var(--sans); color: var(--ink); text-wrap: pretty; }
.rd-item .notfor { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.rd-item .checked { margin: 14px 0 0; font-size: 13px; font-weight: 500; color: var(--faint); }
.rd-sec { margin-top: 30px; scroll-margin-top: 70px; }
.rd-sec h2 { margin: 0 0 10px; font: 600 24px/1.12 var(--sans); }
.rd-sec p { margin: 0; font-size: 16.5px; line-height: 1.6; max-width: 65ch; }
.wcl { list-style: none; margin: 0; padding: 0; display: grid; }
.wcl li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; }
.wcl li b { font-size: 13.5px; font-weight: 600; color: var(--accent-ink); }
.wcl li span { display: grid; gap: 4px; }
.wcl li a, .wcl li small { font-size: 13px; font-weight: 600; }
.wcl li a { justify-self: start; display: inline-flex; align-items: center; min-height: 32px; margin: -4px 0; color: var(--accent-ink); text-underline-offset: .18em; }
.wcl li small { font-weight: 500; color: var(--faint); }
.deeper .dh { display: flex; align-items: center; gap: 10px; }
.deeper .dh .ico { width: 18px; height: 18px; color: var(--accent-ink); }
.deeper .dh h2, .ch, .side .card h2.ch { flex: 1; margin: 0; font: 600 22px/1.12 var(--sans); }
.deeper .dh span { font-size: 13px; font-weight: 600; color: var(--faint); }
.deeper > a:not(.btn) { display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 8px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.deeper > a:not(.btn) > span { display: grid; flex: 1; }
.deeper small { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.deeper b { font-size: 15px; font-weight: 600; }
.deeper > a .ico { color: var(--muted); }
.deeper .btn { margin-top: 12px; width: 100%; }
.nl { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 8px; font-size: 15px; font-weight: 600; }
.hist ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.hist li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 6px 0; font-size: 14.5px; line-height: 1.45; }
.hist li b { font-size: 13.5px; font-weight: 600; color: var(--faint); }
.hist li.now b { color: var(--accent-ink); }
.hist li span { color: var(--muted); }
.inline-side { display: grid; gap: 14px; margin-top: 30px; }
.rd-side { gap: 16px; }
.rd-side .checked { margin-top: 0; }
@media (min-width: 1180px) { .inline-side { display: none; } }
.news-app.radar-app[data-locked] { --side-w: 0px; }
.news-app.radar-app[data-locked] #side { display: none; }

@media (min-width: 761px) {
  .jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rd-item h1 { font-size: 44px; }
}
@media (min-width: 1180px) {
  .radar-app .radar-col { max-width: 820px; }
  .jobs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .job { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 84px; padding: 14px 16px; }
  .job .ico { width: 20px; height: 20px; }
}
@media (max-width: 760px) {
  .rd-h2 { font-size: 24px; margin-top: 18px; }
  .rd-india { height: 36px; padding: 0 12px; margin-right: 2px; }
  .rd-title { font-size: 30px; }
  .ri { grid-template-columns: 36px minmax(0, 1fr); }
  .ri .mk { width: 36px; height: 36px; }
  .rd-item h1 { font-size: 34px; }
  .rd-item .useful { font-size: 18px; }
  .radar-app .main { padding-bottom: 110px; }
}
@media (prefers-reduced-motion: reduce) { .job:active { transform: none; } }

/* toasts use the phone's width, not half of it (the shared toast sits at left: 50%, which halves its room) */
.radar-app ~ .toast { width: max-content; max-width: calc(100vw - 32px); }

/* only the host sees this, before the Radar is released */
.rd-host-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--ink); font-size: 14px; line-height: 1.45; }
.rd-host-note .ico { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; color: var(--muted); }
.rd-host-note a { display: inline-flex; align-items: center; min-height: 32px; margin: -6px 0; font-weight: 600; color: var(--accent-ink); }
