#panel-watchdog {
   --watchdog-line: var(--border-m);
}

.watchdog-hero {
   display: flex;
   align-items: flex-end;
   justify-content: space-between;
   gap: 28px;
   padding: 28px;
   margin-bottom: 16px;
   border: 1px solid var(--watchdog-line);
   border-radius: var(--radius-xl);
   background:
      radial-gradient(circle at 88% 10%, rgba(240, 165, 30, .15), transparent 34%),
      linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
   box-shadow: var(--shadow);
}

.watchdog-eyebrow {
   display: block;
   margin-bottom: 10px;
   color: var(--gold-t);
   font-size: 11px;
   font-weight: 800;
   letter-spacing: .13em;
   text-transform: uppercase;
}

.watchdog-hero h2 {
   display: flex;
   align-items: center;
   gap: 10px;
   margin: 0 0 8px;
   color: var(--bright);
   font-size: clamp(25px, 4vw, 36px);
}

.watchdog-hero h2 svg { color: var(--gold); }
.watchdog-hero p { max-width: 720px; margin: 0; color: var(--mid); line-height: 1.65; }
.watchdog-hero__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }

.watchdog-status {
   display: grid;
   grid-template-columns: repeat(4, minmax(0, 1fr));
   gap: 1px;
   margin-bottom: 16px;
   overflow: hidden;
   border: 1px solid var(--watchdog-line);
   border-radius: var(--radius-lg);
   background: var(--watchdog-line);
}

.watchdog-status > div {
   min-width: 0;
   padding: 15px 18px;
   background: var(--bg-card);
}

.watchdog-status span { display: block; margin-bottom: 5px; color: var(--dim); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.watchdog-status strong { display: block; overflow: hidden; color: var(--bright); font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }

.watchdog-boundary {
   display: grid;
   grid-template-columns: minmax(190px, .65fr) minmax(0, 1.8fr);
   gap: 18px;
   padding: 15px 18px;
   margin-bottom: 18px;
   border: 1px solid rgba(240, 165, 30, .28);
   border-radius: var(--radius-lg);
   background: var(--gold-pale);
}

.watchdog-boundary strong { color: var(--gold-t); font-size: 13px; line-height: 1.5; }
.watchdog-boundary span { color: var(--mid); font-size: 12.5px; line-height: 1.6; }

.watchdog-workspace,
.watchdog-market__grid {
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 18px;
   align-items: start;
}

.watchdog-card {
   min-width: 0;
   padding: 21px;
   border: 1px solid var(--watchdog-line);
   border-radius: var(--radius-lg);
   background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)), var(--bg-card);
   box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
}

.watchdog-card__head {
   display: flex;
   align-items: flex-start;
   gap: 12px;
   margin-bottom: 17px;
}

.watchdog-card__head > span {
   display: inline-grid;
   width: 30px;
   height: 30px;
   place-items: center;
   flex: 0 0 auto;
   border: 1px solid rgba(240, 165, 30, .3);
   border-radius: 10px;
   background: var(--gold-pale);
   color: var(--gold-t);
   font-size: 11px;
   font-weight: 800;
}

.watchdog-card__head h3 { margin: 0 0 4px; color: var(--bright); font-size: 16px; }
.watchdog-card__head p { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.55; }

.watchdog-form { display: grid; gap: 11px; margin-bottom: 16px; }
.watchdog-form__row { display: flex; align-items: flex-end; gap: 10px; }
.watchdog-form__row--target > label:first-child { flex: 0 0 155px; }
.watchdog-form__value { flex: 1 1 auto; min-width: 0; }
.watchdog-form label { display: grid; min-width: 0; gap: 6px; color: var(--mid); font-size: 11px; font-weight: 700; }
.watchdog-form label > span { letter-spacing: .035em; }
.watchdog-form label small { color: var(--dim); font: inherit; font-weight: 500; }
.watchdog-form .form-input { width: 100%; min-width: 0; }
.watchdog-form__row--quote > label { flex: 1 1 110px; }
.watchdog-form__row--quote .btn { flex: 0 0 auto; }
.watchdog-hint { margin: -3px 0 2px; color: var(--dim); font-size: 11.5px; line-height: 1.55; }

.watchdog-list,
.watchdog-hits { display: grid; gap: 9px; }

.watchdog-watch,
.watchdog-hit,
.watchdog-benchmark {
   padding: 13px;
   border: 1px solid var(--border);
   border-radius: var(--radius);
   background: rgba(255, 255, 255, .025);
}

.watchdog-watch {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
}

.watchdog-watch__body { min-width: 0; }
.watchdog-kicker { display: block; margin-bottom: 4px; color: var(--gold-t); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.watchdog-watch strong { display: block; overflow-wrap: anywhere; color: var(--bright); font-size: 13.5px; }
.watchdog-watch small { display: block; margin-top: 3px; color: var(--dim); font-size: 11.5px; }

.watchdog-hit { position: relative; padding-left: 16px; border-left: 3px solid var(--amber); }
.watchdog-hit__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.watchdog-hit__status { color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.watchdog-hit__match { overflow: hidden; color: var(--dim); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.watchdog-hit h4 { margin: 0 0 7px; color: var(--bright); font-size: 14px; line-height: 1.45; }
.watchdog-hit__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.watchdog-hit__meta span { padding: 3px 7px; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--mid); font-size: 10.5px; }
.watchdog-hit__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.watchdog-hit__actions small { color: var(--dim); font-size: 10.5px; }
.watchdog-hit__actions a { color: var(--gold-t); font-size: 12px; font-weight: 700; }

.watchdog-method,
.watchdog-market {
   margin-top: 18px;
   border: 1px solid var(--watchdog-line);
   border-radius: var(--radius-lg);
   background: var(--bg-card);
}

.watchdog-method > summary,
.watchdog-market > summary {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 18px;
   padding: 17px 19px;
   cursor: pointer;
   list-style: none;
   color: var(--bright);
   font-size: 13px;
   font-weight: 700;
}

.watchdog-method > summary::-webkit-details-marker,
.watchdog-market > summary::-webkit-details-marker { display: none; }
.watchdog-method > summary::after,
.watchdog-market > summary::after { content: '+'; color: var(--gold); font-size: 20px; font-weight: 500; }
.watchdog-method[open] > summary::after,
.watchdog-market[open] > summary::after { content: '−'; }
.watchdog-method > summary span,
.watchdog-market > summary b { margin-left: auto; color: var(--gold-t); font-size: 11px; font-weight: 700; }

.watchdog-method__grid {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 1px;
   border-top: 1px solid var(--watchdog-line);
   background: var(--watchdog-line);
}

.watchdog-method__grid > div { padding: 16px 18px; background: var(--bg-card); }
.watchdog-method__grid strong { display: block; margin-bottom: 5px; color: var(--bright); font-size: 12px; }
.watchdog-method__grid p { margin: 0; color: var(--dim); font-size: 11.5px; line-height: 1.55; }

.watchdog-market > summary > span { display: grid; gap: 2px; }
.watchdog-market > summary small { color: var(--gold-t); font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.watchdog-market > summary strong { color: var(--bright); font-size: 14px; }
.watchdog-market > summary em { color: var(--dim); font-size: 11.5px; font-style: normal; font-weight: 500; }
.watchdog-market__boundary { margin: 0 19px; padding: 12px 14px; border: 1px solid rgba(240, 165, 30, .22); border-radius: var(--radius); background: var(--gold-pale); color: var(--mid); font-size: 11.5px; line-height: 1.55; }
.watchdog-market__grid { padding: 18px; }
.watchdog-card--nested { box-shadow: none; }

.watchdog-benchmark { display: grid; gap: 8px; }
.watchdog-benchmark__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.watchdog-benchmark__head strong { color: var(--bright); font-size: 13px; }
.watchdog-benchmark__badge { padding: 3px 7px; border-radius: 999px; background: var(--gold-pale); color: var(--gold-t); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.watchdog-benchmark__stats { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--dim); font-size: 11.5px; }
.watchdog-benchmark__stats b { color: var(--bright); }

html.light-mode .watchdog-card,
html.light-mode .watchdog-status > div,
html.light-mode .watchdog-method__grid > div { background-color: var(--bg-card); }

@media (max-width: 860px) {
   .watchdog-hero { align-items: flex-start; flex-direction: column; }
   .watchdog-hero__actions { justify-content: flex-start; }
   .watchdog-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .watchdog-workspace,
   .watchdog-market__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
   .watchdog-hero { padding: 20px; }
   .watchdog-hero__actions { width: 100%; }
   .watchdog-hero__actions .btn { justify-content: center; width: 100%; }
   .watchdog-boundary { grid-template-columns: 1fr; gap: 6px; }
   .watchdog-card { padding: 17px; }
   .watchdog-form__row,
   .watchdog-form__row--quote { align-items: stretch; flex-direction: column; }
   .watchdog-form__row--target > label:first-child,
   .watchdog-form__row--quote > label { flex: 1 1 auto; }
   .watchdog-form .btn { justify-content: center; width: 100%; }
   .watchdog-method > summary,
   .watchdog-market > summary { align-items: flex-start; }
   .watchdog-method > summary span,
   .watchdog-market > summary b { display: none; }
   .watchdog-method__grid { grid-template-columns: 1fr; }
   .watchdog-market__grid { padding: 12px; }
   .watchdog-market__boundary { margin: 0 12px; }
}
