:root {
  color-scheme: light;
  --ink: #192026;
  --muted: #65717d;
  --line: #d8dde3;
  --soft: #f4f7f8;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warn: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f5;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

nav,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bulk-actions {
  align-items: end;
}

.bulk-actions label {
  min-width: 160px;
  gap: 4px;
  font-size: 12px;
}

.bulk-actions select {
  min-height: 38px;
  padding: 7px 10px;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

nav a,
.button,
button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 650;
}

button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

.button.primary-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button.primary-link:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.soft-link {
  background: #eef6f4;
  border-color: #bedbd5;
  color: var(--accent-dark);
}

.button.soft-link:hover {
  background: #deeee9;
  border-color: #9bcac1;
}

button.danger {
  background: #b42318;
  border-color: #b42318;
}

button.danger:hover {
  background: #8f1c14;
}

main {
  width: min(1720px, calc(100% - 32px));
  margin: 28px auto 60px;
}

section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 18px;
}

.login-panel {
  max-width: 420px;
  margin: 80px auto;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 0;
}

.metrics a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--ink);
}

.metrics strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metrics span,
.muted {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
}

.cf-page {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

.cf-add-section {
  max-width: 430px;
}

.cf-add-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.google-top {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.google-add-form,
.workflow-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.workflow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
}

.workflow-list li {
  padding-left: 4px;
}

.workflow-list strong {
  display: block;
  color: #23313b;
}

.workflow-list span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) minmax(160px, 220px);
  gap: 14px;
  align-items: end;
}

.api-token-form {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) minmax(160px, 220px) 1fr auto;
}

.token-name-cell {
  min-width: 220px;
}

.token-name-cell strong,
.token-name-cell small {
  display: block;
}

.token-name-cell strong {
  margin-bottom: 4px;
}

.token-name-cell small {
  color: var(--muted);
  max-width: 380px;
  overflow-wrap: anywhere;
}

.provider-name-cell strong,
.provider-name-cell small,
.provider-cell strong,
.provider-cell small,
.oauth-client-cell code,
.oauth-client-cell small {
  display: block;
}

.provider-name-cell small,
.provider-cell small,
.oauth-client-cell small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.oauth-provider-form {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px 12px;
  align-self: stretch;
}

.checkline {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #233342;
  font-size: 13px;
  font-weight: 650;
}

.checkline input {
  width: auto;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-edit {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(180px, 240px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 620px;
}

.inline-edit label {
  gap: 4px;
  font-size: 12px;
}

.inline-edit input,
.inline-edit select {
  min-height: 34px;
  padding: 7px 9px;
}

.compact {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.compact-select {
  min-height: 32px;
  width: auto;
  max-width: 220px;
  padding: 6px 9px;
  font-size: 13px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.title-with-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.title-with-tabs h2 {
  margin: 0;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 22px;
}

.edit-panel {
  max-width: 620px;
}

label {
  display: grid;
  gap: 6px;
  color: #31404c;
  font-weight: 650;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check-label input {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9d1d8;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
  font-weight: 500;
}

.search-select {
  position: relative;
  width: 100%;
}

.search-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.search-select-control {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #c9d1d8;
  border-radius: 6px;
  padding: 10px 36px 10px 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-select-control::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #7a8b99;
  border-bottom: 2px solid #7a8b99;
  transform: translateY(-65%) rotate(45deg);
}

.search-select.open .search-select-control {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 127, 110, .12);
}

.search-select-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: 320px;
  overflow: hidden;
  border: 1px solid #cbd7df;
  border-radius: 6px;
  box-shadow: 0 14px 28px rgba(27, 43, 56, .14);
  background: #ffffff;
}

.search-select.open .search-select-panel {
  display: block;
}

.search-select.open-up .search-select-panel {
  top: auto;
  bottom: calc(100% + 4px);
}

.search-select-search {
  position: relative;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.search-select-search input {
  min-height: 38px;
  padding-right: 34px;
}

.search-select-icon {
  position: absolute;
  right: 19px;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid #8a9bad;
  border-radius: 999px;
  transform: translateY(-58%);
}

.search-select-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #8a9bad;
  transform: rotate(45deg);
}

.search-select-options {
  max-height: 252px;
  overflow: auto;
  padding: 6px;
}

.search-select-option {
  width: 100%;
  min-height: 34px;
  display: block;
  border: 0;
  border-radius: 5px;
  padding: 7px 10px;
  background: transparent;
  color: #415263;
  font: inherit;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-select-option:hover,
.search-select-option:focus,
.search-select-option[aria-selected="true"] {
  outline: none;
  background: #c9f4f1;
  color: #0b5f59;
}

.search-select-option:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.search-select-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.search-select.compact {
  min-width: 210px;
}

.search-select.compact .search-select-control {
  min-height: 32px;
  padding: 6px 30px 6px 9px;
  font-size: 13px;
}

.search-select.compact .search-select-control::after {
  right: 11px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.line-textarea-label {
  gap: 7px;
}

.line-textarea-label > span {
  color: #31404c;
  font-weight: 650;
}

.line-textarea {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 116px;
  overflow: hidden;
  border: 1px solid #c9d1d8;
  border-radius: 6px;
  background: #ffffff;
  resize: vertical;
}

.line-textarea textarea {
  height: 100%;
  min-height: 116px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  padding: 10px 11px;
  resize: none;
  outline: none;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
}

.line-textarea:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 127, 110, .12);
}

.line-numbers {
  margin: 0;
  padding: 10px 8px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #f5f8fa;
  color: #7b8994;
  text-align: right;
  user-select: none;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.advanced-fields {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafb;
}

.advanced-fields summary {
  cursor: pointer;
  color: #31404c;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: #344451;
  font-size: 13px;
}

.sortable-th {
  padding: 0;
}

.sortable-th a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 10px;
  color: #344451;
}

.sortable-th a::after {
  content: "sort";
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.sortable-th.sorted.asc a::after {
  content: "^";
  color: var(--accent-dark);
}

.sortable-th.sorted.desc a::after {
  content: "v";
  color: var(--accent-dark);
}

.sortable-th a:hover {
  background: #eaf0f3;
}

.accounts-table {
  table-layout: auto;
  min-width: 760px;
}

.cf-accounts-table {
  min-width: 1120px;
}

.google-accounts-table {
  table-layout: auto;
  min-width: 980px;
}

.accounts-table th,
.accounts-table td,
.google-accounts-table th,
.google-accounts-table td {
  overflow-wrap: normal;
}

.google-actions {
  min-width: 500px;
  align-items: flex-start;
  gap: 6px;
}

.properties-cell {
  min-width: 92px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.properties-cell small {
  display: block;
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.more-actions {
  position: relative;
}

.more-actions summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bedbd5;
  border-radius: 6px;
  padding: 6px 10px;
  background: #eef6f4;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  list-style: none;
}

.more-actions summary::-webkit-details-marker {
  display: none;
}

.more-actions summary::after {
  content: "v";
  margin-left: 6px;
  color: var(--muted);
  font-size: 10px;
}

.more-actions[open] summary::after {
  content: "^";
}

.more-actions div {
  min-width: 180px;
  display: grid;
  gap: 6px;
  position: absolute;
  right: 0;
  z-index: 5;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
}

.more-actions .button,
.more-actions button {
  width: 100%;
}

.service-accounts-cell {
  min-width: 260px;
}

.service-list {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.service-list span {
  overflow-wrap: anywhere;
}

.nowrap {
  white-space: nowrap;
}

.metric-cell {
  width: 1%;
  text-align: center;
  white-space: nowrap;
  font-weight: 750;
}

.nowrap-actions {
  flex-wrap: nowrap;
}

.id-cell {
  width: 1%;
  white-space: nowrap;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 700;
}

.error {
  margin: 0;
  color: var(--warn);
  font-weight: 700;
}

.bulk-bar {
  margin-bottom: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.pagination:last-child {
  margin: 12px 0 0;
}

.per-page-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.per-page-form label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.per-page-form select {
  min-height: 32px;
  width: auto;
  padding: 6px 28px 6px 9px;
  font-size: 13px;
}

.pager-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button.disabled {
  background: var(--soft);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.domains-controls {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.domains-add {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.jobs-table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

.jobs-table th:nth-child(1),
.jobs-table td:nth-child(1) {
  width: 34px;
}

.jobs-table th:nth-child(2),
.jobs-table td:nth-child(2) {
  width: 48px;
}

.jobs-table th:nth-child(3),
.jobs-table td:nth-child(3) {
  width: 150px;
}

.jobs-table th:nth-child(4),
.jobs-table td:nth-child(4) {
  width: 245px;
}

.jobs-table th:nth-child(5),
.jobs-table td:nth-child(5) {
  width: 82px;
}

.jobs-table th:nth-child(6),
.jobs-table td:nth-child(6) {
  width: 118px;
}

.jobs-table th:nth-child(7),
.jobs-table td:nth-child(7) {
  width: 122px;
}

.jobs-table th:nth-child(9),
.jobs-table td:nth-child(9) {
  width: 145px;
}

.domains-table {
  min-width: 1320px;
}

.domains-table th:last-child,
.domains-table td:last-child {
  min-width: 250px;
}

.domain-bing-cell {
  width: 150px;
  max-width: 180px;
  overflow-wrap: anywhere;
}

.domain-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.source-badge {
  align-self: flex-start;
  border: 1px solid #99d6d1;
  border-radius: 6px;
  padding: 2px 6px;
  color: #075f59;
  background: #e8fffb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.source-note {
  display: block;
  max-width: 260px;
  color: #5f6f89;
  overflow-wrap: anywhere;
}

.details-cell {
  min-width: 0;
}

.job-progress {
  min-width: 0;
}

.job-progress-track {
  width: 100%;
  max-width: 118px;
  height: 9px;
  overflow: hidden;
  border: 1px solid #b9cbe8;
  border-radius: 999px;
  background: #eef5ff;
}

.job-progress-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .25s ease;
}

.job-progress small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.job-progress .job-progress-skipped {
  color: #9b5b00;
  font-weight: 700;
}

.details-cell summary {
  cursor: pointer;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.job-type-cell,
.job-target-cell {
  overflow-wrap: anywhere;
}

.job-timeline-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 6px;
  row-gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.job-timeline-grid span {
  color: #60707f;
  font-weight: 750;
  text-transform: uppercase;
}

.job-timeline-grid time {
  color: #17212b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.role-edit-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.role-edit-form select {
  min-width: 104px;
  padding: 7px 28px 7px 9px;
}

.password-edit-form input {
  min-height: 32px;
  width: 180px;
  min-width: 0;
  padding: 6px 9px;
  font-size: 13px;
}

.job-details-expanded {
  margin: 10px 0 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafb;
  color: #263642;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.live-indicator {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bedbd5;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eef6f4;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
}

.live-indicator[data-mode="idle"] {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
}

.live-indicator[data-mode="error"] {
  border-color: #efb4ae;
  background: #fff1f0;
  color: #a11f16;
}

.job-live-updated {
  background: #f1fbf8;
  transition: background .8s ease;
}

.last-job-cell {
  min-width: 260px;
  max-width: 360px;
}

.last-job-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--soft);
  color: #344451;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status-verified,
.status-done {
  border-color: #acd1bd;
  background: #edf8f1;
  color: #146c43;
}

.status-queued,
.status-running,
.status-cancel-requested {
  border-color: #b9cbe8;
  background: #eef5ff;
  color: #245796;
}

.status-error,
.status-canceled {
  border-color: #efb4ae;
  background: #fff1f0;
  color: #a11f16;
}

.status-planned,
.status-partial {
  border-color: #d6c38f;
  background: #fff8e6;
  color: #735c0f;
}

.filters textarea {
  min-height: 44px;
}

.filters .line-textarea textarea {
  min-height: 116px;
}

.notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #b7d5cc;
  border-radius: 8px;
  background: #f0f8f5;
  color: #0b5f59;
  font-weight: 700;
  white-space: pre-wrap;
}

.missing-domains {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e0c67d;
  border-radius: 8px;
  background: #fff8e6;
  color: #5f4b08;
}

.missing-domains strong,
.missing-domains small {
  display: block;
}

.missing-domains small {
  margin-top: 2px;
  color: #7a650f;
  font-weight: 700;
}

.missing-domains ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 160px;
  margin: 10px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.missing-domains code {
  background: #fffdf4;
  border-color: #e6d397;
}

.txt-toggle {
  min-height: 30px;
  max-width: 220px;
  border: 1px solid #c3d4cb;
  border-radius: 6px;
  padding: 5px 9px;
  background: #f1f8f5;
  color: #0b5f59;
  font-size: 13px;
  font-weight: 750;
}

.txt-toggle.empty {
  border-color: var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: default;
}

.txt-full[hidden] {
  display: none;
}

code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
}

.manual-list {
  margin: 0;
  padding-left: 22px;
}

.manual-list li {
  margin: 8px 0;
}

.disavow-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.disavow-workspace > div {
  min-width: 0;
}

.disavow-workspace h2 {
  margin-top: 0;
}

.warning-text {
  border-left: 4px solid #b7791f;
  padding: 10px 12px;
  background: #fffaf0;
  color: #744210;
}

.bing-page-head,
.bing-account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.bing-page-head h2,
.bing-account-head h2 {
  margin: 2px 0 6px;
}

.bing-page-head p,
.bing-account-head p {
  margin: 0;
}

.bing-accounts-table {
  table-layout: fixed;
  min-width: 980px;
}

.bing-accounts-table th:nth-child(1),
.bing-accounts-table td:nth-child(1) {
  width: 48px;
}

.bing-accounts-table th:nth-child(2),
.bing-accounts-table td:nth-child(2) {
  width: 25%;
}

.bing-accounts-table th:nth-child(3),
.bing-accounts-table td:nth-child(3),
.bing-accounts-table th:nth-child(4),
.bing-accounts-table td:nth-child(4) {
  width: 115px;
}

.bing-accounts-table th:nth-child(5),
.bing-accounts-table td:nth-child(5) {
  width: 230px;
}

.bing-accounts-table th:last-child,
.bing-accounts-table td:last-child {
  width: 230px;
}

.bing-account-cell strong,
.bing-account-cell small {
  display: block;
}

.bing-google-links-cell strong,
.bing-google-links-cell small,
.bing-google-links-cell .bing-google-link {
  display: block;
}

.bing-google-links-cell small,
.bing-google-links-cell .bing-google-link {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.bing-google-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bing-google-link form {
  flex: 0 0 auto;
}

.bing-google-link button {
  padding: 4px 7px;
  font-size: 11px;
}

.bing-google-links-list {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.bing-google-links-list .bing-google-link {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.bing-account-cell small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.bing-operations {
  padding: 0;
  overflow: visible;
}

.bing-operations > h2 {
  padding: 20px 20px 4px;
}

.bing-operation {
  border-top: 1px solid var(--line);
}

.bing-operation > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.bing-operation > summary::-webkit-details-marker {
  display: none;
}

.bing-operation > summary::after {
  content: "+";
  color: var(--accent-dark);
  font-size: 20px;
  font-weight: 700;
}

.bing-operation[open] > summary::after {
  content: "-";
}

.bing-operation > summary span {
  font-weight: 750;
}

.bing-operation > summary small {
  flex: 1;
  color: var(--muted);
}

.bing-operation > form {
  border-top: 1px solid var(--line);
  padding: 18px 20px 20px;
  background: #f8fafb;
}

.bing-direct-form {
  grid-template-columns: minmax(320px, 1.4fr) minmax(260px, .8fr);
  align-items: start;
}

.bing-operation-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.bing-operation-side p {
  margin: 0;
}

.bing-link-form,
.bing-account-form {
  grid-template-columns: repeat(2, minmax(240px, 1fr)) auto;
  align-items: end;
}

.bing-account-form textarea {
  min-height: 82px;
}

.bing-metrics {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.bing-domain-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
  margin-bottom: 16px;
}

.bing-account-filters {
  grid-template-columns: minmax(280px, 560px) auto;
  margin-bottom: 16px;
}

.bing-domains-table {
  table-layout: fixed;
  min-width: 1180px;
}

.bing-domains-table th:nth-child(1),
.bing-domains-table td:nth-child(1) {
  width: 180px;
}

.bing-domains-table th:nth-child(2),
.bing-domains-table td:nth-child(2) {
  width: 210px;
}

.bing-domains-table th:nth-child(3),
.bing-domains-table td:nth-child(3),
.bing-domains-table th:nth-child(7),
.bing-domains-table td:nth-child(7) {
  width: 115px;
}

.bing-domains-table th:nth-child(8),
.bing-domains-table td:nth-child(8) {
  width: 145px;
}

.bing-domains-table code,
.bing-details-cell {
  overflow-wrap: anywhere;
  white-space: normal;
}

.engine-status {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 5px 8px;
}

.engine-status small {
  color: var(--muted);
  font-weight: 700;
}

.disavow-coverage {
  border: 0;
  border-radius: 0;
  padding: 16px 0;
  background: transparent;
}
.disavow-coverage-filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.disavow-coverage-filters label { min-width: 0; }
.disavow-coverage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 20px 0;
}
.disavow-coverage-launch { margin: 0 0 24px; }
.disavow-coverage-launch button { width: auto; max-width: 100%; white-space: normal; }
.disavow-coverage-table { table-layout: fixed; width: 100%; }
.disavow-coverage-table th, .disavow-coverage-table td {
  overflow-wrap: anywhere;
  white-space: normal;
}
.disavow-coverage-table small { display: block; margin-top: 6px; }
.disavow-account-group th { background: #e1eeee; padding-top: 14px; padding-bottom: 14px; }
@media (max-width: 700px) {
  .disavow-coverage-filters { grid-template-columns: 1fr; }
  .disavow-coverage-table thead { display: none; }
  .disavow-coverage-table, .disavow-coverage-table tbody, .disavow-coverage-table tr,
  .disavow-coverage-table td, .disavow-coverage-table th { display: block; width: 100%; box-sizing: border-box; }
  .disavow-coverage-table td { border: 0; padding: 6px 10px; }
  .disavow-coverage-table td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .disavow-coverage-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
}

@media (max-width: 900px) {
  header,
  .split {
    display: block;
  }

  .google-top {
    grid-template-columns: 1fr;
  }

  nav {
    margin-top: 16px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .domains-controls {
    grid-template-columns: 1fr;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .two-columns,
  .inline-edit,
  .disavow-workspace,
  .bing-direct-form,
  .bing-link-form,
  .bing-account-form,
  .bing-domain-filters {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .bing-page-head,
  .bing-account-head,
  .bing-operation > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  main {
    width: min(100% - 20px, 1720px);
  }
}

/* Keep the optional www checkbox and its label together on narrow screens. */
label.www-option { display: flex; align-items: center; gap: .5rem; }
label.www-option input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; }
