/*
 * Owner-directed summary at the top of a Notice Decoder result.
 * Load after decoder.css so this focused component can replace the legacy
 * inline severity pill without changing the surrounding result panel.
 */
.result-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: stretch;
  gap: 18px;
  margin: 0 0 16px;
}

#notice-band.notice-band {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 190px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 11px;
  margin: 0;
  padding: 19px 21px;
  border: 0;
  border-radius: 5px;
  color: var(--paper);
  letter-spacing: normal;
  text-align: left;
}

#notice-band.notice-band[data-band="RED"] {
  color: #ffffff;
  background: #D7191C;
  box-shadow: 0 0 15px rgba(215, 25, 28, .24);
  animation: notice-red-attention 1s ease-in-out infinite;
}

#notice-band.notice-band[data-band="YELLOW"] {
  color: #111111;
  background: #FFD400;
}

#notice-band.notice-band[data-band="GREEN"] {
  color: var(--paper);
  background: var(--green);
}

#notice-band .band-label {
  display: block;
  color: inherit;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 850;
  letter-spacing: .055em;
  line-height: .98;
}

#notice-band .severity-bullets {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#notice-band .severity-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

#notice-band .severity-bullets li::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-top: .42em;
  border-radius: 50%;
  background: currentColor;
}

#notice-band .severity-bullets a {
  color: inherit;
  text-decoration: underline;
}

.time-gauge {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 5px 8px 3px;
  text-align: center;
}

.time-gauge .time-dial {
  display: block;
  width: min(100%, 200px);
  height: auto;
  overflow: visible;
}

.time-gauge .dial-green,
.time-gauge .dial-amber,
.time-gauge .dial-red {
  fill: none;
  stroke-width: 13;
  stroke-linecap: butt;
}

.time-gauge .dial-green {
  stroke: var(--green);
}

.time-gauge .dial-amber {
  stroke: #FFD400;
}

.time-gauge .dial-red {
  stroke: #D7191C;
}

.time-gauge #dial-needle {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
}

.time-gauge[data-zone="grey"] #dial-needle {
  stroke: var(--muted);
}

.time-gauge[data-zone="grey"] .dial-green,
.time-gauge[data-zone="grey"] .dial-amber,
.time-gauge[data-zone="grey"] .dial-red {
  stroke: var(--muted);
  opacity: .35;
}

.result-panel > .call-banner:not([hidden]) {
  margin: 0 0 16px;
}

.time-gauge .dial-hub {
  fill: var(--ink);
}

.time-gauge #gauge-reading {
  display: block;
  margin: -3px 0 0;
  color: var(--ink);
  font-size: clamp(21px, 2.5vw, 29px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.12;
}

.time-gauge[data-zone="green"] #gauge-reading { color: var(--green); }
.time-gauge[data-zone="amber"] #gauge-reading { color: #FFD400; }
.time-gauge[data-zone="red"] #gauge-reading { color: #D7191C; }

.time-gauge #gauge-used {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.time-gauge .gauge-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.35;
}

#notice-handler.handler-row {
  display: grid;
  grid-template-columns: minmax(115px, .34fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px 15px;
  margin: 0 0 19px;
  padding: 11px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

#notice-handler.handler-row h3 {
  margin: 0;
  color: var(--purple);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

#notice-handler #handler-source {
  grid-column: 1 / -1;
}

#notice-handler.handler-row p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

@keyframes notice-red-attention {
  0%, 100% { opacity: 1; }
  50% { opacity: .8; }
}

@media (max-width: 600px) {
  .result-dashboard {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  #notice-band.notice-band {
    min-height: 0;
    padding: 17px 18px;
  }

  #notice-band .band-label {
    font-size: 32px;
  }

  .time-gauge {
    padding: 2px 8px 4px;
  }

  .time-gauge .time-dial {
    width: min(100%, 190px);
  }

  #notice-handler.handler-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #notice-band.notice-band[data-band="RED"] {
    animation: none !important;
    opacity: 1;
  }
}

@media print {
  .result-dashboard *,
  .result-panel > .call-banner {
    animation: none !important;
  }

  .result-dashboard {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 10px;
    margin: 0 0 8px;
    break-inside: avoid;
  }

  #notice-band.notice-band,
  #notice-band.notice-band[data-band] {
    display: flex;
    min-height: 0;
    gap: 5px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid currentColor;
    border-radius: 2px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  #notice-band.notice-band[data-band="RED"] {
    color: #ffffff;
    background: #D7191C;
    border: 4px solid #000;
  }

  #notice-band.notice-band[data-band="YELLOW"] {
    color: #111111;
    background: #FFD400;
    border: 2px dashed #000;
  }

  #notice-band.notice-band[data-band="GREEN"] {
    color: var(--paper);
    background: var(--green);
    border: 1px solid #000;
  }

  #notice-band.notice-band[data-band="RED"] *,
  #notice-band.notice-band[data-band="RED"]::before {
    color: #ffffff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  #notice-band.notice-band[data-band="YELLOW"] *,
  #notice-band.notice-band[data-band="YELLOW"]::before {
    color: #111111;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  #notice-band .band-label {
    font-size: 20px;
    line-height: 1;
  }

  #notice-band .severity-bullets {
    gap: 2px;
  }

  #notice-band .severity-bullets li {
    gap: 5px;
    font-size: 8pt;
    line-height: 1.2;
  }

  .time-gauge {
    padding: 0 4px;
  }

  .time-gauge .dial-amber {
    stroke: #FFD400;
  }

  .time-gauge .dial-red {
    stroke: #D7191C;
  }

  .time-gauge[data-zone="amber"] #gauge-reading {
    color: #FFD400;
  }

  .time-gauge[data-zone="red"] #gauge-reading {
    color: #D7191C;
  }

  .time-gauge .time-dial {
    width: min(100%, 160px);
    max-height: 83px;
  }

  .time-gauge #gauge-reading {
    margin-top: -5px;
    font-size: 16px;
  }

  .time-gauge #gauge-used,
  .time-gauge .gauge-caption {
    margin-top: 2px;
    font-size: 8pt;
    line-height: 1.2;
  }

  #notice-handler.handler-row {
    grid-template-columns: minmax(100px, .34fr) minmax(0, 1fr);
    gap: 4px 10px;
    margin: 0 0 8px;
    padding: 6px 0;
    break-inside: avoid;
  }

  #notice-handler.handler-row h3,
  #notice-handler.handler-row p {
    font-size: 8.5pt;
    line-height: 1.25;
  }

  #notice-handler #handler-source {
    margin-top: 0;
    font-size: 8pt;
    line-height: 1.25;
  }

  #notice-band.notice-band[data-band="RED"] {
    animation: none !important;
    opacity: 1;
  }
}
