/* AI Data Center Tracker (build plan 2026-10-20, Section 5).
   Uses the site's existing design tokens: amber accent family
   (#f59e0b / #92400e / #fef3c7), slate text (#475569). */

.dc-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  color: #1e293b;
}

.dc-wrap h1 {
  margin: 0 0 0.75rem;
  font-size: 1.8rem;
  line-height: 1.2;
}

.dc-intro {
  max-width: 760px;
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

.dc-feedback-links {
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

.dc-feedback-links a {
  color: #92400e;
  font-weight: 600;
}

/* Stats band */
.dc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0.75rem;
}

.dc-stat {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dc-stat__value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #92400e;
  line-height: 1.1;
}

.dc-stat__label {
  font-size: 0.82rem;
  color: #475569;
}

.dc-asof {
  color: #64748b;
  font-size: 0.82rem;
  margin: 0 0 1.5rem;
}

/* Filters */
.dc-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin: 0 0 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.dc-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 180px;
  flex: 1 1 180px;
}

.dc-filter label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.dc-filter input,
.dc-filter select {
  padding: 0.5rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  color: #1e293b;
}

.dc-count {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.87rem;
  color: #475569;
}

.dc-empty {
  color: #475569;
  font-size: 0.95rem;
  padding: 2rem 0;
}

.dc-empty p {
  margin: 0 0 0.75rem;
}

.dc-reset-btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid #d97706;
  background: #f59e0b;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}

/* Active-filter chips (rendered by the client script inside the
   sticky filter bar). */
.dc-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.dc-active-filters[hidden] {
  display: none;
}

.dc-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  border-radius: 999px;
  padding: 0.15rem 0.3rem 0.15rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.dc-filter-chip button {
  border: none;
  background: none;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
  cursor: pointer;
}

.dc-clear-all {
  border: none;
  background: none;
  color: #1e40af;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
}

/* Searchable comboboxes: the client script pairs each native select
   with a typeahead input. The select stays in place as the value
   holder and the no-JS control; it is hidden only when JS is driving. */
.dc-filter select.dc-native-hidden {
  display: none;
}

.dc-combo {
  position: relative;
  min-width: 180px;
}

.dc-combo__input {
  width: 100%;
  box-sizing: border-box;
}

.dc-combo__list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  margin: 0.25rem 0 0;
  padding: 0.25rem;
  list-style: none;
  z-index: 40;
}

.dc-combo__option {
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #1e293b;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-combo__option.is-active {
  background: #fef3c7;
}

.dc-combo__option[aria-selected="true"] {
  font-weight: 700;
}

.dc-combo__group {
  padding: 0.5rem 0.5rem 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

/* Campus cards: five across on desktop, stepping down with width. */
.dc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

@media (max-width: 1200px) {
  .dc-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 980px) {
  .dc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .dc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dc-grid {
    grid-template-columns: 1fr;
  }
}

.dc-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.dc-card__tile {
  margin: 0;
  background: #0f172a;
}

.dc-card__tile img {
  display: block;
  width: 100%;
  height: auto;
}

.dc-card__tile figcaption {
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  color: #cbd5e1;
  background: #0f172a;
}

.dc-card__tile--empty {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8rem;
}

.dc-owners-more {
  font-size: 0.84rem;
}

.dc-owners-more summary {
  cursor: pointer;
  color: #1e40af;
  font-weight: 600;
  width: fit-content;
}

.dc-card__owners--extra {
  margin-top: 0.25rem;
}

.dc-card__figtag {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
}

.dc-card__body {
  padding: 0.85rem 0.9rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.dc-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dc-card__name-link {
  color: inherit;
  text-decoration: none;
}

.dc-card__name-link:hover {
  text-decoration: underline;
}

.dc-row__name-link {
  color: #1e40af;
  text-decoration: none;
}

.dc-row__name-link:hover {
  text-decoration: underline;
}

/* Copy-link affordance: revealed when the card head is hovered or
   focused; always faintly visible where hover does not exist. */
.dc-copy-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  opacity: 0;
}

.dc-card__head:hover .dc-copy-link,
.dc-card__head:focus-within .dc-copy-link {
  opacity: 1;
}

@media (hover: none) {
  .dc-copy-link {
    opacity: 0.8;
  }
}

.dc-card {
  scroll-margin-top: calc(var(--dc-filter-h, 0px) + 1rem);
}

.dc-table tbody tr {
  scroll-margin-top: calc(var(--dc-filter-h, 0px) + 3rem);
}

.dc-card__name {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.3;
}

.dc-chip {
  flex: none;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #334155;
  background: #e2e8f0;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.dc-chip--operational {
  color: #166534;
  background: #dcfce7;
  border-color: #22c55e;
}

.dc-chip--delivering-power {
  color: #115e59;
  background: #ccfbf1;
  border-color: #14b8a6;
}

.dc-chip--under-construction {
  color: #1e40af;
  background: #dbeafe;
  border-color: #3b82f6;
}

.dc-chip--fit-out {
  color: #5b21b6;
  background: #ede9fe;
  border-color: #8b5cf6;
}

.dc-chip--ground-broken {
  color: #082f49;
  background: #7dd3fc;
  border-color: #0284c7;
}

.dc-chip--permitting {
  color: #92400e;
  background: #fef3c7;
  border-color: #f59e0b;
}

.dc-chip--announced {
  color: #334155;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.dc-chip--on-hold {
  color: #651e08;
  background: #fdba74;
  border-color: #c2410c;
}

.dc-chip--cancelled {
  color: #991b1b;
  background: #fee2e2;
  border-color: #ef4444;
}

.dc-chip--unknown {
  color: #334155;
  background: #e2e8f0;
  border-color: #94a3b8;
}

.dc-card__location {
  margin: 0;
  color: #475569;
  font-size: 0.87rem;
}

.dc-card__owners {
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
}

.dc-card__figures {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.dc-figure {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.3rem;
}

.dc-figure__label {
  color: #64748b;
}

.dc-figure__value {
  font-weight: 600;
  text-align: right;
}

.dc-card__meta {
  margin: auto 0 0;
  padding-top: 0.6rem;
  font-size: 0.77rem;
  color: #94a3b8;
}

.dc-card__meta a {
  color: #92400e;
}

/* Methodology and corrections */
.dc-methodology,
.dc-corrections-block {
  margin-top: 2.5rem;
  max-width: 820px;
}

.dc-methodology h2,
.dc-corrections-block h2 {
  font-size: 1.22rem;
  margin: 0 0 0.75rem;
}

.dc-methodology p {
  color: #475569;
  line-height: 1.65;
}

.dc-methodology ul {
  color: #475569;
  line-height: 1.65;
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.dc-methodology li {
  margin-bottom: 0.35rem;
}

.dc-corrections {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dc-corrections li {
  padding: 0.5rem 0;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.55;
}

.dc-corrections__date {
  font-weight: 700;
  color: #92400e;
  margin-right: 0.5rem;
}

.dc-footer-line {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  font-style: italic;
}

/* Feedback page (form posts to the canonical /feedback handler) */
.dc-feedback-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.dc-feedback-context {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #334155;
}

.dc-feedback-note {
  margin-top: 1.5rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dc-feedback-wrap .feedback-back-link {
  color: #92400e;
  font-size: 0.9rem;
}

.dc-feedback-wrap .feedback-heading {
  font-size: 1.6rem;
  margin: 1rem 0;
}

.dc-feedback-wrap .form-group {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dc-feedback-wrap .form-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
}

.dc-feedback-wrap .form-helper,
.dc-feedback-wrap .captcha-helper {
  font-size: 0.85rem;
  color: #64748b;
}

.dc-feedback-wrap .feedback-input,
.dc-feedback-wrap .feedback-select,
.dc-feedback-wrap .feedback-textarea {
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
}

.dc-feedback-wrap .honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dc-feedback-wrap .feedback-submit-btn {
  background: #f59e0b;
  border: 1px solid #d97706;
  color: #1e293b;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.dc-feedback-wrap .feedback-submit-btn:hover {
  background: #d97706;
  color: #fff;
}

.dc-feedback-wrap .feedback-cancel-link {
  margin-left: 1rem;
  color: #475569;
  font-size: 0.9rem;
}

/* View toggle (Cards / Table) */
.dc-view-toggle__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.dc-view-toggle__buttons {
  display: flex;
  gap: 0;
}

.dc-view-btn {
  padding: 0.5rem 0.9rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.dc-view-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.dc-view-btn:last-child {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.dc-view-btn.is-active {
  background: #f59e0b;
  border-color: #d97706;
  color: #1e293b;
}

/* Table view */
.dc-table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.dc-table-block[hidden] {
  display: none;
}

.dc-updates {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0 0 1.25rem;
  font-size: 0.87rem;
  color: #334155;
}

.dc-updates__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.dc-updates ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dc-updates__date {
  color: #64748b;
  font-weight: 600;
}

.dc-updates a {
  color: #1e40af;
  font-weight: 600;
  white-space: nowrap;
}

.dc-listing-title {
  font-size: 1.22rem;
  margin: 0 0 1rem;
  color: #0f172a;
}

.dc-table-range {
  font-size: 0.87rem;
  color: #475569;
  margin: 0 0 0.5rem;
}

.dc-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.6rem;
}

.dc-table-wrap + .dc-pager {
  margin: 0.6rem 0 0;
}

.dc-pager__btn {
  padding: 0.35rem 0.6rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}

.dc-pager__btn[aria-current="page"],
.dc-pager__btn[aria-pressed="true"] {
  background: #f59e0b;
  border-color: #d97706;
  color: #1e293b;
}

.dc-pager__btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.dc-pager__ellipsis {
  padding: 0 0.15rem;
  color: #64748b;
}

.dc-more {
  color: #64748b;
  white-space: nowrap;
}

/* The grid's own display: grid rule would otherwise defeat the hidden
   attribute the view toggle sets (author display rules beat the UA
   [hidden] rule). */
.dc-grid[hidden] {
  display: none;
}

.dc-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: #fff;
}

.dc-table th,
.dc-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
}

/* Column floors keep every column readable; the wrapper scrolls
   sideways when the container is narrower than the table. The status
   floor fits UNDER CONSTRUCTION on one line at pill size. */
.dc-table th:nth-child(1),
.dc-table td:nth-child(1) {
  min-width: 170px;
}
.dc-table th:nth-child(2),
.dc-table td:nth-child(2) {
  min-width: 230px;
}
.dc-table th:nth-child(3),
.dc-table td:nth-child(3) {
  min-width: 130px;
}
.dc-table th:nth-child(4),
.dc-table td:nth-child(4) {
  min-width: 105px;
}
.dc-table th:nth-child(5),
.dc-table td:nth-child(5) {
  min-width: 168px;
}
.dc-table td:nth-child(9) {
  white-space: nowrap;
}

/* Header labels wrap to two lines instead of forcing one-line widths.
   The header sticks below the sticky filter bar; the script keeps
   --dc-filter-h set to the bar's measured height. */
.dc-table thead th {
  position: sticky;
  top: var(--dc-filter-h, 0px);
  background: #f8fafc;
  border-bottom: 2px solid #cbd5e1;
  line-height: 1.3;
  z-index: 10;
}

.dc-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.dc-table .dc-num {
  text-align: right;
  white-space: nowrap;
}

.dc-table thead th.dc-num-head {
  text-align: right;
}

.dc-sort-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dc-sort-btn:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.dc-table th.is-sorted-asc .dc-sort-btn::after {
  content: " \25B2";
  font-size: 0.6rem;
  color: #92400e;
}

.dc-table th.is-sorted-desc .dc-sort-btn::after {
  content: " \25BC";
  font-size: 0.6rem;
  color: #92400e;
}

@media (max-width: 640px) {
  .dc-wrap h1 {
    font-size: 1.5rem;
  }
}
