/* IC Cyber — OT incident ticker (data is written into index.html by NewsAgent) */

.nt {
  width: min(1000px, 100%);
  margin: 0 auto 3rem;
  text-align: left;
  border: 1px solid var(--steel-slate-dark, #465266);
  background: rgba(11, 24, 38, 0.72);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.nt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  padding: 1rem 1.25rem 0.85rem;
  border-bottom: 1px solid rgba(125, 138, 153, 0.25);
}

.nt-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--caution-yellow, #F2D22E);
}

.nt-live {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--caution-yellow, #F2D22E);
  box-shadow: 0 0 0 0 rgba(242, 210, 46, 0.6);
  animation: nt-ping 2s ease-out infinite;
}

@keyframes nt-ping {
  0%   { box-shadow: 0 0 0 0 rgba(242, 210, 46, 0.55); }
  80%  { box-shadow: 0 0 0 0.6rem rgba(242, 210, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 210, 46, 0); }
}

.nt-rss {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.75rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--steel-slate-dark, #465266);
  border-radius: 4px;
  color: var(--caution-yellow, #F2D22E);
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  vertical-align: 0.1em;
}
.nt-rss:hover, .nt-rss:focus-visible { border-color: var(--caution-yellow, #F2D22E); outline: none; }
.nt-rss svg { width: 0.7rem; height: 0.7rem; fill: currentColor; }

.nt-updated {
  font-size: 0.78rem;
  color: var(--steel-slate, #7D8A99);
}

.nt-viewport {
  max-height: 23rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--steel-slate-dark, #465266) transparent;
}

.nt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.nt-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--navy-deep, #0B1826);
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-slate, #7D8A99);
  text-align: left;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid rgba(125, 138, 153, 0.25);
}

.nt-table td {
  padding: 0.7rem 1.25rem;
  vertical-align: top;
  border-top: 1px solid rgba(125, 138, 153, 0.14);
  line-height: 1.5;
}

.nt-table tbody tr:first-child td { border-top: none; }

.nt-table tbody tr { cursor: pointer; transition: background 0.15s ease; }
.nt-table tbody tr:hover,
.nt-table tbody tr:focus-within { background: rgba(242, 210, 46, 0.06); }

.nt-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #B4BDC8;
  width: 1%;
}

.nt-loc {
  color: var(--steel-slate, #7D8A99);
  width: 22%;
}

.nt-open {
  all: unset;
  display: block;
  cursor: pointer;
  color: var(--signal-white, #FFFFFF);
  font: inherit;
  line-height: 1.5;
}

.nt-open:focus-visible {
  outline: 2px solid var(--caution-yellow, #F2D22E);
  outline-offset: 3px;
  border-radius: 2px;
}

.nt-new {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  background: var(--caution-yellow, #F2D22E);
  color: var(--industrial-navy, #102135);
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  vertical-align: 0.1em;
}

/* NEW / CYBER flags, stacked in front of the headline */
.nt-flags {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.nt-flags .nt-new {
  margin-right: 0;
  text-align: center;
}

.nt-cyber {
  display: inline-block;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  background: #D7263D;
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
}

.nt-empty {
  padding: 1.5rem 1.25rem;
  color: var(--steel-slate, #7D8A99);
}

.nt-foot {
  padding: 0.6rem 1.25rem;
  font-size: 0.75rem;
  color: var(--steel-slate, #7D8A99);
  border-top: 1px solid rgba(125, 138, 153, 0.25);
}

/* ---- detail panel (off-canvas, HTML5 <dialog>) ---- */

.nt-panel {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(540px, 100vw);
  height: 100%;
  max-height: 100%;
  max-width: 100vw;
  border: none;
  border-left: 3px solid var(--caution-yellow, #F2D22E);
  background: var(--navy-deep, #0B1826);
  color: #B4BDC8;
  padding: 0;
  text-align: left;
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.nt-panel[open] { animation: nt-slide 0.28s ease-out; }

@keyframes nt-slide {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.nt-panel::backdrop {
  background: rgba(5, 10, 18, 0.6);
  backdrop-filter: blur(2px);
}

.nt-panel-inner { padding: 1.5rem 1.75rem 2.5rem; }

.nt-close {
  float: right;
  margin: -0.4rem -0.6rem 0 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--steel-slate-dark, #465266);
  border-radius: 6px;
  background: transparent;
  color: var(--signal-white, #FFFFFF);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.nt-close:hover,
.nt-close:focus-visible { border-color: var(--caution-yellow, #F2D22E); outline: none; }

.nt-cat {
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--caution-yellow, #F2D22E);
  margin-bottom: 0.75rem;
}

.nt-panel h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--signal-white, #FFFFFF);
  margin-bottom: 1.25rem;
}

.nt-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(125, 138, 153, 0.25);
  border-radius: 6px;
  font-size: 0.88rem;
}

.nt-meta dt {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-slate, #7D8A99);
  padding-top: 0.2rem;
}

.nt-meta dd { color: var(--signal-white, #FFFFFF); }

.nt-long {
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.nt-long p + p { margin-top: 0.8rem; }

.nt-source {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border-radius: 5px;
  background: var(--caution-yellow, #F2D22E);
  color: var(--industrial-navy, #102135);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.nt-source:hover,
.nt-source:focus-visible { filter: brightness(1.08); outline: none; }

.nt-also { margin-top: 1.5rem; font-size: 0.85rem; }
.nt-also h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-slate, #7D8A99);
  margin-bottom: 0.4rem;
}
.nt-also ul { list-style: none; }
.nt-also li + li { margin-top: 0.25rem; }
.nt-also a { color: var(--caution-yellow, #F2D22E); text-decoration: none; }
.nt-also a:hover { text-decoration: underline; }

/* ---- small screens: stack date/location above the description ---- */
@media (max-width: 640px) {
  .nt-table thead { display: none; }
  .nt-table, .nt-table tbody, .nt-table tr, .nt-table td { display: block; width: auto; }
  .nt-table tr { padding: 0.75rem 1rem; border-top: 1px solid rgba(125, 138, 153, 0.14); }
  .nt-table tbody tr:first-child { border-top: none; }
  .nt-table td { padding: 0; border: none; }
  .nt-date, .nt-loc { display: inline !important; font-size: 0.78rem; }
  .nt-loc::before { content: " · "; }
  .nt-desc { margin-top: 0.25rem; }
  .nt-panel-inner { padding: 1.25rem 1.25rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nt-live, .nt-panel[open] { animation: none; }
}

/* ---- world map: incidents by country ---- */
.nt-map { padding: 0.9rem 1.25rem 0.8rem; border-bottom: 1px solid rgba(125, 138, 153, 0.25); }

.nt-map-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.3rem 1rem; margin-bottom: 0.6rem;
}
.nt-map-title {
  font-family: "Orbitron", sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel-slate, #7D8A99);
}
.nt-map-sum { font-size: 0.78rem; color: var(--steel-slate, #7D8A99); }

.nt-map-canvas {
  position: relative; width: 100%; overflow: hidden;
  border-radius: 6px; background: rgba(5, 12, 22, 0.35);
}
.nt-map-dots {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: pan-y;            /* page still scrolls with one finger at full view */
  user-select: none; -webkit-user-select: none;
}
.nt-map-canvas.is-zoomed .nt-map-dots { touch-action: none; cursor: grab; }
.nt-map-canvas.is-panning .nt-map-dots { cursor: grabbing; }
.nt-land path { vector-effect: non-scaling-stroke; }
.nt-dot circle, .nt-leg-item circle { vector-effect: non-scaling-stroke; }

.nt-map-ctrl {
  position: absolute; right: 0.6rem; top: 0.6rem; z-index: 1;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.nt-map-ctrl button {
  width: 2rem; height: 2rem; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--steel-slate-dark, #465266);
  background: rgba(11, 24, 38, 0.85); color: var(--signal-white, #FFFFFF);
  font-size: 1.1rem; line-height: 1; font-family: "Inter", sans-serif;
}
.nt-map-ctrl button:hover, .nt-map-ctrl button:focus-visible {
  border-color: var(--caution-yellow, #F2D22E); color: var(--caution-yellow, #F2D22E); outline: none;
}
.nt-map-note {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
  padding: 0.5rem 0.9rem; border-radius: 5px; pointer-events: none;
  background: rgba(11, 24, 38, 0.9); border: 1px solid var(--steel-slate-dark, #465266);
  color: var(--signal-white, #FFFFFF); font-size: 0.85rem;
}

.nt-dot { cursor: pointer; outline: none; }
.nt-dot circle {
  fill: rgba(242, 210, 46, 0.42);
  stroke: var(--caution-yellow, #F2D22E);
  stroke-width: 1.2;
  transition: fill 0.15s ease;
  filter: drop-shadow(0 0 4px rgba(242, 210, 46, 0.45));
}
.nt-dot:hover circle, .nt-dot:focus-visible circle, .nt-dot.is-active circle {
  fill: rgba(242, 210, 46, 0.8);
}
.nt-dot:focus-visible circle { stroke: #fff; stroke-width: 2; }
.nt-dot.is-cyber circle, .nt-leg-item.is-cyber circle {
  fill: rgba(215, 38, 61, 0.5);
  stroke: #FF3B52;
  filter: drop-shadow(0 0 4px rgba(215, 38, 61, 0.6));
}
.nt-dot.is-cyber:hover circle, .nt-dot.is-cyber:focus-visible circle, .nt-dot.is-cyber.is-active circle {
  fill: rgba(215, 38, 61, 0.85);
}
.nt-dot.is-cyber text { fill: #fff; }
.nt-dot text {
  fill: var(--industrial-navy, #102135);
  font-family: "Inter", sans-serif; font-size: 10px; font-weight: 800;
  text-anchor: middle; pointer-events: none;
}

.nt-map-tip {
  position: absolute; z-index: 2;
  width: min(300px, 80%);
  padding: 0.7rem 0.85rem 0.6rem;
  background: var(--navy-deep, #0B1826);
  border: 1px solid var(--caution-yellow, #F2D22E);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.82rem; line-height: 1.4; color: #B4BDC8;
  transform: translate(-50%, calc(-100% - 14px));
}
.nt-map-tip.below { transform: translate(-50%, 14px); }
.nt-map-tip strong {
  display: block; margin-bottom: 0.4rem;
  font-family: "Orbitron", sans-serif; font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--caution-yellow, #F2D22E);
}
.nt-map-tip ul { list-style: none; max-height: 16rem; overflow-y: auto; }
.nt-map-tip li + li { margin-top: 0.3rem; }
.nt-map-tip button {
  all: unset; cursor: pointer; display: block; color: var(--signal-white, #FFFFFF);
}
.nt-map-tip button:hover, .nt-map-tip button:focus-visible { color: var(--caution-yellow, #F2D22E); outline: none; }
.nt-map-tip small { color: var(--steel-slate, #7D8A99); }

.nt-map-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem;
  margin-top: 0.5rem; font-size: 0.75rem; color: var(--steel-slate, #7D8A99);
}
.nt-leg-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.nt-leg-sep { margin-left: 0.9rem; padding-left: 0.9rem; border-left: 1px solid var(--steel-slate-dark, #465266); }
.nt-leg-item circle { fill: rgba(242, 210, 46, 0.42); stroke: var(--caution-yellow, #F2D22E); stroke-width: 1.2; }
.nt-map-hint { margin-left: auto; }

@media (max-width: 640px) {
  .nt-map { padding: 0.75rem 0.75rem 0.6rem; }
  .nt-map-hint { display: none; }
  .nt-map-tip { width: min(260px, 90%); }
}
