
.diskw-modal-fact p {
  margin: 1px 0 0;
  color: var(--muted-text);
  font-size: 14px;
  line-height: 1.45;
}

.diskw-modal-review {
  justify-self: start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--control-bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.diskw-modal-review:hover {
  background: color-mix(in srgb, var(--text), transparent 86%);
}

.diskw-modal-largest {
  margin-top: 8px;
}

.diskw-modal-largest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.diskw-modal-largest-row > div {
  min-width: 0;
}

.diskw-modal-largest-row strong,
.diskw-modal-largest-row > div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diskw-modal-largest-row strong {
  font-size: 14px;
  font-weight: 700;
}

.diskw-modal-largest-row > div > span {
  margin-top: 1px;
  color: var(--muted-text);
  direction: rtl;
  font-size: 12.5px;
  text-align: left;
}

.diskw-modal-largest-row b {
  font-size: 14px;
  font-weight: 700;
}

.diskw-modal-do-not-touch {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.diskw-modal-do-not-touch strong {
  font-size: 14px;
  font-weight: 700;
}

.diskw-modal-do-not-touch p {
  margin: 2px 0 0;
  color: var(--muted-text);
  font-size: 13px;
  line-height: 1.45;
}

.diskw-modal-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.diskw-modal-ask {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.diskw-modal-ask:disabled {
  cursor: default;
  opacity: 0.5;
}

.diskw-modal-ai-output {
  margin-top: 10px;
}

.diskw-modal-ai-note {
  margin: 0;
  color: var(--muted-text);
  font-size: 13px;
  line-height: 1.45;
}

.diskw-modal-ai-error {
  color: var(--color-danger);
  font-size: 14px;
  line-height: 1.45;
}

.diskw-modal-ai-busy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  color: var(--muted-text);
  font-size: 14px;
}

.diskw-modal-ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-bottom: 8px;
  color: var(--muted-text);
  font-size: 13px;
}

.diskw-modal-ai-meta strong {
  color: var(--text);
}

.diskw-modal-ai-text {
  font-size: 14px;
  line-height: 1.55;
}

/* Rendered AI markdown (renderAiMarkdown builds these as DOM nodes). */
.diskw-md-h {
  font-weight: 720;
  line-height: 1.3;
  margin: 14px 0 5px;
  color: var(--text);
}
.diskw-md-h:first-child { margin-top: 0; }
.diskw-md-h1 { font-size: 17px; }
.diskw-md-h2 { font-size: 15.5px; }
.diskw-md-h3 { font-size: 14.5px; }
.diskw-md-h4 { font-size: 14px; color: var(--muted-text); }
.diskw-md-p { margin: 6px 0; }
.diskw-md-p:first-child { margin-top: 0; }
.diskw-md-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}
.diskw-md-list { margin: 6px 0; display: flex; flex-direction: column; gap: 3px; }
.diskw-md-li { display: flex; gap: 7px; align-items: baseline; }
.diskw-md-li.is-sub { padding-left: 16px; }
.diskw-md-bullet { color: var(--accent); font-weight: 680; flex: 0 0 auto; min-width: 12px; }
.diskw-md-litext { min-width: 0; flex: 1 1 auto; }
.diskw-md-code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--text), transparent 92%);
}
/* Tables scroll inside their own box so a wide plan never widens the dialog. */
.diskw-md-tablewrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--radius-control); }
.diskw-md-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.diskw-md-table th,
.diskw-md-table td {
  text-align: left;
  padding: 6px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: top;
}
.diskw-md-table th {
  color: var(--text);
  font-weight: 700;
}
.diskw-md-table tbody tr:last-child td { border-bottom: 0; }

.diskw-modal-empty {
  margin: 8px 0 0;
  color: var(--muted-text);
  font-size: 14px;
}

/* The 14.5" Edge often uses short/wide tiles; container rules preserve the
   hierarchy without turning the dashboard into a desktop settings page. */

@container (max-width: 560px) {
  .disk-panel .disk-widget-mount {
    padding: 10px;
  }

  .diskw-explore {
    grid-template-columns: 1fr;
  }

  .diskw-clean-stages {
    grid-template-columns: 1fr;
  }
}

@container (max-width: 400px) {
  .diskw-title {
    font-size: 14px;
  }

  .diskw-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .diskw-legend-item b {
    display: none;
  }

  .diskw-path-size {
    display: none;
  }
}

@container (max-height: 320px) {
  .diskw-subtitle,
  .diskw-act-copy span {
    display: none;
  }

  .diskw-treemap {
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .diskw-clean-track > span {
    animation: none;
  }
}

@media (max-width: 760px) {
  .diskw-advisor-modal {
    padding: 8px;
  }

  .diskw-modal-head {
    padding: 14px 12px 12px 16px;
  }

  .diskw-advisor-body {
    padding: 14px 16px 18px;
  }

  .diskw-modal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .diskw-modal-ai-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
}
