/* Interactive SageDisk mock. Everything inside .sd imitates the macOS app, so it uses the system font. */

.demo {
  width: 120%;
  margin-left: -10%;
  margin-right: -10%;
}

@media screen and (max-width: 1240px) {
  .demo {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

.demo__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid #d0d1d5;
  border-radius: 10px;
  margin-bottom: var(--gutter-small);
}

.sd {
  --sd-blue: #1f6fe5;
  --sd-green: #28a745;
  --sd-orange: #f08a00;
  --sd-line: #dcdcdc;
  --sd-dim: #6e6e73;

  position: absolute;
  top: 0;
  left: 0;
  width: 1180px;
  height: 740px;
  transform-origin: 0 0;
  display: grid;
  grid-template-rows: 52px 36px 1fr 52px;
  grid-template-columns: 270px 1fr 340px;
  font: 13px/1.35 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: #1d1d1f;
  background: #ececec;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.sd button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.sd a,
.sd .sd-link {
  opacity: 1;
  color: var(--sd-blue);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: none;
}

.sd .sd-link:hover {
  text-decoration: underline;
}

/* Title bar */
.sd-bar {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--sd-line);
  background: #f3f3f3;
}

.sd-lights { display: flex; gap: 8px; margin-right: 8px; }
.sd-lights i { width: 12px; height: 12px; border-radius: 50%; background: #d6d6d6; display: block; }

.sd-back {
  border: 0;
  background: none;
  font-size: 20px;
  color: #8a8a8e;
  padding: 0 6px;
}

.sd-back:disabled { opacity: 0.35; cursor: default; }

.sd-title { line-height: 1.15; }
.sd-title b { display: block; font-size: 14px; }
.sd-title span { color: var(--sd-dim); font-size: 12px; }

.sd-spacer { flex: 1; }

.sd-badge {
  display: none;
  padding: 4px 12px;
  border-radius: 20px;
  background: #e3f5e6;
  color: var(--sd-green);
  font-weight: 600;
}

.sd-badge.on { display: block; }

.sd-tool {
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 7px;
  padding: 5px 11px;
}

.sd-tool:hover { background: #f7f7f7; }

.sd-search {
  width: 190px;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  padding: 5px 9px;
  font: inherit;
  background: #fff;
}

/* Left list */
.sd-crumb {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--sd-line);
  font-weight: 600;
}

.sd-crumb button { border: 0; background: none; color: #8a8a8e; padding: 0; font-size: 15px; }

.sd-list {
  grid-column: 1;
  overflow: auto;
  background: #fff;
  border-right: 1px solid var(--sd-line);
}

.sd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  cursor: default;
}

.sd-row:hover, .sd-row.hl { background: #eef3fd; }
.sd-row.dir { cursor: pointer; }

.sd-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sd-ico { width: 18px; height: 15px; flex: none; }
.sd-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-size { color: var(--sd-dim); font-variant-numeric: tabular-nums; }
.sd-chev { color: #b0b0b5; width: 8px; }
.sd-empty { color: var(--sd-dim); padding: 30px 14px; text-align: center; }

/* Chart */
.sd-chart {
  grid-column: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sd-chart svg { width: 480px; height: 480px; overflow: visible; }
.sd-chart path { cursor: pointer; stroke: #ececec; stroke-width: 1; transition: opacity 120ms; }
.sd-chart path.dim { opacity: 0.35; }
.sd-chart path.flash { stroke: var(--sd-green); stroke-width: 4; }
.sd-center { cursor: pointer; }

.sd-hint { color: #8e8e93; margin-top: 12px; }

.sd-tip {
  position: absolute;
  pointer-events: none;
  background: rgba(30, 30, 32, 0.92);
  color: #fff;
  padding: 6px 9px;
  border-radius: 6px;
  max-width: 260px;
  display: none;
  z-index: 3;
}

.sd-tip b { display: block; }
.sd-tip span { color: #c7c7cc; font-size: 12px; }

/* Right panel */
.sd-panel {
  grid-column: 3;
  grid-row: 2 / 5;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f7f7f7;
  border-left: 1px solid var(--sd-line);
}

.sd-tabs {
  display: flex;
  margin: 8px 12px;
  padding: 2px;
  border-radius: 8px;
  background: #e4e4e4;
}

.sd-tabs button {
  flex: 1;
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 4px 2px;
  white-space: nowrap;
}

.sd-tabs button.on { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }

.sd-pane { flex: 1; overflow: auto; padding: 6px 16px 16px; min-height: 0; }

.sd-h { font-size: 20px; font-weight: 700; margin: 6px 0 4px; }
.sd-sub { color: var(--sd-dim); margin-bottom: 12px; }
.sd-big { font-weight: 600; color: var(--sd-dim); margin-bottom: 6px; }

.sd-group { margin: 16px 0 6px; }
.sd-group b { font-size: 15px; }
.sd-group b::before { content: "●"; margin-right: 6px; }
.sd-group.safe b::before { color: var(--sd-green); }
.sd-group.caution b::before { color: var(--sd-orange); }
.sd-group.keep b::before { color: #a1a1a6; }
.sd-group div { color: var(--sd-dim); }

.sd-fold { border: 0; background: none; color: var(--sd-dim); padding: 4px 0; }

.sd-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px 0; }
.sd-item input { margin-top: 2px; flex: none; }
.sd-item .sd-lock { width: 13px; flex: none; }
.sd-item-body { flex: 1; min-width: 0; }
.sd-item-top { display: flex; gap: 8px; font-weight: 600; }
.sd-item-top span:first-child { flex: 1; }
.sd-item-top span:last-child { font-weight: 400; color: var(--sd-dim); }
.sd-item-text { color: var(--sd-dim); margin: 2px 0 4px; }
.sd-item-links { display: flex; gap: 14px; }
.sd-item.gone { opacity: 0.45; }

.sd-explain {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e3e3e3;
}

.sd-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.sd-pill.safe { background: #e3f5e6; color: var(--sd-green); }
.sd-pill.caution, .sd-pill.medium { background: #fdf0dd; color: var(--sd-orange); }
.sd-pill.keep { background: #ececec; color: #6e6e73; }
.sd-pill.low { background: #e3f5e6; color: var(--sd-green); }

.sd-foot { padding: 10px 12px 12px; border-top: 1px solid var(--sd-line); }

.sd-main {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  background: #fff;
  font-weight: 600;
}

.sd-main:disabled { color: #a1a1a6; font-weight: 400; cursor: default; }
.sd-main.blue { background: var(--sd-blue); color: #fff; border-color: var(--sd-blue); }

.sd-main.green { background: var(--sd-green); color: #fff; border-color: var(--sd-green); }
.sd-main small { display: block; font-size: 11px; font-weight: 400; opacity: 0.85; }

.sd-seg { display: flex; padding: 2px; border-radius: 7px; background: #e4e4e4; margin-bottom: 10px; }
.sd-seg button { flex: 1; border: 0; background: none; border-radius: 5px; padding: 3px 2px; white-space: nowrap; font-size: 12px; }
.sd-seg button.on { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.sd-presets { background: #ececec; border-radius: 10px; padding: 8px 10px 10px; margin-bottom: 10px; }
.sd-presets .sd-seg { background: #dcdcdc; margin-bottom: 6px; }
.sd-shrinkhead { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--sd-line); }
.sd .sd-green { color: var(--sd-green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-item-links > .sd-size { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-progress .bar { height: 6px; border-radius: 3px; background: #e4e4e4; overflow: hidden; margin-bottom: 6px; }
.sd-progress .bar i { display: block; height: 100%; background: var(--sd-green); transition: width 0.2s; }
.sd-progress span { display: block; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sd-card { background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid #e6e6e6; }

/* Delete bar */
.sd-drop {
  grid-column: 1 / 3;
  margin: 8px 12px;
  border: 1.5px dashed #c7c7cc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--sd-dim);
}

.sd-drop.over { border-color: var(--sd-blue); background: #eef3fd; }
.sd-drop button { border: 1px solid #d0d0d0; border-radius: 6px; background: #fff; padding: 2px 10px; }

/* Sheets */
.sd-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 5;
}

.sd-shade.on { display: flex; }

.sd-sheet {
  margin-top: 60px;
  width: 560px;
  max-height: 600px;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 22px 24px;
}

.sd-sheet.wide { width: 900px; padding: 0; display: flex; height: 600px; overflow: hidden; }
.sd-sheet .sd-h { font-size: 22px; }
.sd-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.sd-btns button { border: 1px solid #d0d0d0; background: #fff; border-radius: 7px; padding: 5px 14px; }
.sd-btns button.blue { background: var(--sd-blue); color: #fff; border-color: var(--sd-blue); }

.sd-catbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 12px 0 8px; }
.sd-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 10px; color: var(--sd-dim); margin-bottom: 14px; }
.sd-cats span::before { content: "●"; color: var(--c); margin-right: 5px; }
.sd-lead { font-size: 16px; margin-bottom: 14px; }
.sd-tipcard { background: #f5f5f5; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.sd-tipcard b { font-size: 15px; display: block; margin-bottom: 3px; }
.sd-tipcard div { color: var(--sd-dim); margin-bottom: 4px; }
.sd-fine { color: #a1a1a6; font-size: 12px; margin-top: 10px; }

/* Add-ons window */
.sd-side { width: 250px; background: #f2f2f2; border-right: 1px solid var(--sd-line); display: flex; flex-direction: column; padding: 14px 10px; }
.sd-side h6 { font: 600 12px/1 -apple-system, sans-serif; color: #8e8e93; margin: 10px 8px 8px; }
.sd-side button.it { display: block; width: 100%; text-align: left; border: 0; background: none; border-radius: 7px; padding: 7px 8px; }
.sd-side button.it.on { background: #e0e0e0; }
.sd-side .sd-make { margin-top: auto; }
.sd-detail { flex: 1; overflow: auto; padding: 22px 26px; position: relative; }
.sd-close { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 18px; color: #8e8e93; }
.sd-perm { display: flex; gap: 10px; margin: 8px 0; }
.sd-perm b { display: block; }
.sd-perm span { color: var(--sd-dim); }
.sd-review { background: #fbf3ea; border: 1px solid #f2dcc2; border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.sd-review.low { background: #eef8f0; border-color: #cfe9d4; }
.sd-review ul { margin: 6px 0; padding-left: 18px; }
.sd-review .warn { color: var(--sd-orange); margin-top: 6px; }
.sd-review.low .warn { color: var(--sd-green); }
.sd-code { background: #f5f5f5; border-radius: 8px; padding: 10px 12px; font: 11.5px/1.45 Menlo, monospace; white-space: pre; overflow: auto; max-height: 260px; user-select: text; }
.sd-wish { width: 100%; box-sizing: border-box; min-height: 64px; border: 1px solid #d0d0d0; border-radius: 8px; padding: 8px 10px; font: inherit; resize: none; background: #fafafa; }
.sd-bubble { background: #eef3fd; border-radius: 12px; padding: 10px 12px; margin: 12px 0; }
.sd-spin { color: var(--sd-dim); margin: 14px 0; }
.sd-spin::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; border: 2px solid #c7c7cc; border-top-color: var(--sd-blue); border-radius: 50%; animation: sd-rot 0.8s linear infinite; vertical-align: -2px; }

@keyframes sd-rot { to { transform: rotate(360deg); } }

/* Scanning overlay */
.sd-scan { position: absolute; inset: 52px 0 0 0; background: #ececec; z-index: 4; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sd-scan.on { display: flex; }
.sd-scan b { font-size: 20px; }
.sd-scan .bar { width: 320px; height: 6px; border-radius: 3px; background: #d6d6d6; overflow: hidden; }
.sd-scan .bar i { display: block; height: 100%; width: 0; background: var(--sd-blue); }

/* Circle / treemap switch */
.sd-chartseg { position: absolute; top: 10px; right: 12px; display: flex; border: 1px solid #d9d9d9; border-radius: 7px; overflow: hidden; background: #fff; z-index: 1; }
.sd-chartseg button { border: 0; background: none; padding: 3px 10px; font-size: 14px; color: #6e6e73; }
.sd-chartseg button.on { background: #e4e4e6; color: #000; }
.sd-chart rect[data-p] { cursor: pointer; transition: opacity 120ms; }
.sd-chart rect.dim { opacity: 0.45; }
.sd-chart rect.flash { stroke: var(--sd-green); stroke-width: 3; }

/* Scan screen: game and free licenses */
.sd-hop { width: 560px; height: 130px; margin-top: 18px; cursor: pointer; }
.sd-free { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 520px; text-align: center; display: flex; flex-direction: column; gap: 4px; color: var(--sd-dim); }
.sd-free b { color: #000; font-size: 14px; }
.sd-free a { color: var(--sd-blue); }
