.sd-dialog {
  --sd-wine: #5b2031;
  --sd-line: #dedbd4;
  --sd-muted: #665f59;
  width: min(calc(100% - 40px), 700px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--sd-line);
  border-radius: 20px;
  color: #302b29;
  background-color: #fffefb;
  box-shadow: 0 18px 80px rgb(35 24 24 / 20%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.sd-dialog::backdrop { background: rgb(32 24 25 / 44%); }
html:has(.sd-dialog[open]) { overflow: hidden; }
.sd-dialog *, .sd-dialog { box-sizing: border-box; }
.sd-dialog button, .sd-dialog summary { font: inherit; }
.sd-dialog :focus-visible { outline: 2px solid var(--sd-wine); outline-offset: 3px; }
.sd-frame {
  display: flex;
  flex-direction: column;
  max-height: min(84vh, 760px);
  max-height: min(84dvh, 760px);
  overflow: hidden;
  border-radius: inherit;
}
.sd-header { padding: 27px 30px 19px; }
.sd-heading-row, .sd-heading { display: flex; align-items: center; gap: 12px; }
.sd-heading-row { justify-content: space-between; }
.sd-heading { flex-wrap: wrap; }
.sd-title {
  margin: 0;
  color: #2e2928;
  font-size: clamp(24px, 3.6vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 650;
}
.sd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #edeae5;
  color: #504b47;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 650;
}
.sd-badge-demo { background: #f7eacb; color: #71521d; }
.sd-badge-real { background: #e5efe8; color: #326b54; }
.sd-close {
  display: grid;
  flex: 0 0 40px;
  height: 40px;
  place-items: center;
  background: transparent;
  color: #504b47;
  border: 1px solid var(--sd-line);
  border-radius: 50%;
  cursor: pointer;
}
.sd-close:hover { background: #f5f2ee; }
.sd-cross { position: relative; display: block; width: 16px; height: 16px; }
.sd-cross::before, .sd-cross::after {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  border-top: 1.6px solid;
  transform: rotate(45deg);
}
.sd-cross::after { transform: rotate(-45deg); }
.sd-dates { margin: 10px 0 0; color: var(--sd-muted); font-size: 13px; line-height: 1.55; }
.sd-dates strong { color: #493e3b; font-weight: 600; }
.sd-tabs {
  display: flex;
  gap: 24px;
  padding: 0 30px;
  border-bottom: 1px solid var(--sd-line);
}
.sd-tab {
  min-height: 42px;
  margin-bottom: -1px;
  padding: 0 1px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--sd-muted);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.sd-tab[aria-selected="true"] { border-bottom-color: var(--sd-wine); color: var(--sd-wine); }
.sd-tab:focus-visible { outline-offset: -3px; }
.sd-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sd-panel { padding: 24px 30px; }
.sd-panel[hidden] { display: none !important; }
.sd-panel:focus-visible { outline-offset: -5px; }
.sd-definition { margin: 0 0 14px; color: var(--sd-muted); font-size: 13px; line-height: 1.5; }
.sd-definitions { padding-top: 12px; border-top: 1px solid var(--sd-line); }
.sd-definitions summary {
  padding: 8px 0;
  color: var(--sd-wine);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sd-definitions-list { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.sd-definitions-list dt { margin-top: 10px; font-weight: 600; }
.sd-definitions-list dd { margin: 2px 0 0; color: var(--sd-muted); }
.sd-campaigns { display: grid; gap: 10px; }
.sd-campaign {
  overflow: hidden;
  border: 1px solid var(--sd-line);
  border-radius: 12px;
}
.sd-campaign summary {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.sd-campaign summary::-webkit-details-marker { display: none; }
.sd-campaign summary:hover { background: #f8f7f4; }
.sd-campaign summary:focus-visible { outline-offset: -4px; }
.sd-campaign-text { display: grid; gap: 3px; }
.sd-campaign-name { font-size: 14px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.sd-campaign-spend { color: var(--sd-muted); font-size: 12px; }
.sd-chevron {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-right: 3px;
  border: solid var(--sd-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.sd-campaign[open] .sd-chevron { transform: translateY(2px) rotate(225deg); }
.sd-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.sd-table th, .sd-table td { padding: 12px 10px; line-height: 1.4; overflow-wrap: anywhere; }
.sd-table :is(th, td):first-child { padding-left: 16px; }
.sd-table :is(th, td):last-child { padding-right: 16px; }
.sd-table :is(th, td):not(:first-child) { text-align: right; }
.sd-table thead { background: #f5f3ef; color: var(--sd-muted); }
.sd-table thead th { font-size: 12px; font-weight: 600; }
.sd-table th:first-child { width: 42%; }
.sd-table tbody tr + tr { border-top: 1px solid #ebe7e1; }
.sd-table tbody th { font-weight: 500; }
.sd-table tbody td:nth-child(2) { font-weight: 650; }
.sd-dialog .sd-table .sd-missing { color: var(--sd-muted); font-size: 12px; font-weight: 400; }
.sd-empty { margin: 0; padding: 20px 0; color: var(--sd-muted); font-size: 14px; }
.sd-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 16px 30px;
  border-top: 1px solid var(--sd-line);
  background: #f8f7f4;
  color: var(--sd-muted);
  font-size: 12px;
  line-height: 1.45;
}
.sd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 550px) {
  .sd-dialog { width: calc(100% - 24px); border-radius: 15px; }
  .sd-frame { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
  .sd-header { padding: 17px 17px 12px; }
  .sd-heading { gap: 6px 9px; }
  .sd-tabs { padding: 0 17px; }
  .sd-panel { padding: 16px 12px; }
  .sd-campaign summary { padding: 13px 12px; }
  .sd-table th, .sd-table td { padding: 10px 4px; }
  .sd-table :is(th, td):first-child { padding-left: 8px; }
  .sd-table :is(th, td):last-child { padding-right: 8px; }
  .sd-source { padding: 12px 17px; }
}
