.page-template-page-blocks-template main,
.page-template-page-district-ai-template main {
  width: 100%;
  align-items: stretch;
}

.page-text--district-ai {
  width: 100%;
  padding: 140px 48px 80px;
  background-color: #f0ece0;
  position: relative;
  z-index: 2;
}

.page-text--district-ai .text-content {
  max-width: 1440px;
  margin: 0 auto;
  color: #1a1a1a;
}

.page-text--district-ai .text-content p {
  font-size: inherit;
}

@media (max-width: 768px) {
  .page-text--district-ai {
    padding: 120px 20px 64px;
  }

  .page-text--district-ai .text-content > .wp-block-media-text .wp-block-media-text__media {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
  }
}

.page-text--district-ai .text-content > .wp-block-media-text {
  margin: 0 0 48px;
  align-items: start;
}

.page-text--district-ai .text-content > .wp-block-media-text .wp-block-media-text__content {
  padding: 0;
}

.page-text--district-ai .text-content > .wp-block-media-text .wp-block-media-text__media img {
  width: 180px;
  height: auto;
  display: block;
  margin-left: auto;
}

.bb-dai-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4a4a4a;
  margin: 0 0 12px;
}

.bb-dai-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5b8cff;
  flex-shrink: 0;
}

.page-text--district-ai .text-content > .wp-block-media-text h1 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin: 0 0 16px;
  color: #111;
}

.page-text--district-ai .text-content > .wp-block-media-text h1 + p {
  max-width: 42rem;
  font-size: 16px;
  line-height: 1.5;
  color: #3a3a3a;
  margin: 0 0 16px;
}

.bb-dai-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8c4b8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: #f7f4ea;
  margin: 0;
}

.bb-dai-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dae4a;
  flex-shrink: 0;
}

.page-text--district-ai .text-content > .wp-block-columns {
  padding: 8px 0 40px;
  border-bottom: 1px solid #d8d3c6;
  margin: 0 0 28px;
  gap: 32px;
}

.page-text--district-ai .text-content > .wp-block-columns .wp-block-column > p:first-child {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.page-text--district-ai .text-content > .wp-block-columns h2 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  margin: 4px 0 8px;
}

.page-text--district-ai .text-content > .wp-block-columns .wp-block-column > p:last-child {
  font-size: 14px;
  color: #555;
  margin: 0;
}

.page-text--district-ai .text-content > p:first-of-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4a4a4a;
  margin: 24px 0 12px;
}

.page-text--district-ai .text-content > p:first-of-type::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5b8cff;
  flex-shrink: 0;
}

.page-text--district-ai .text-content > .wp-block-heading {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  margin: 0 0 16px;
}

.page-text--district-ai .text-content > .wp-block-list {
  list-style: none;
  padding: 0;
  margin: 0 0 56px;
  max-width: 52rem;
}

.page-text--district-ai .text-content > .wp-block-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

.page-text--district-ai .text-content > .wp-block-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b8cff;
}

.page-text--district-ai .text-content > .wp-block-heading:last-of-type,
.page-text--district-ai .text-content > .wp-block-heading:last-of-type + p {
  text-align: center;
}

.page-text--district-ai .text-content > .wp-block-heading:last-of-type {
  margin: 0 0 10px;
}

.page-text--district-ai .text-content > .wp-block-heading:last-of-type + p {
  color: #555;
  margin: 0 auto 20px;
  max-width: 32rem;
}

.page-text--district-ai .wp-block-buttons {
  justify-content: center;
  margin: 0 0 24px;
}

.page-text--district-ai .wp-block-button__link {
  background: #1a1a1a;
  color: #f0ece0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  text-decoration: none;
}

.page-text--district-ai .wp-block-button__link:hover {
  color: #fff;
}

.bb-dai .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.bb-dai-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) 1fr 1fr;
  gap: 28px 40px;
  align-items: center;
  margin: 0 0 28px;
  padding: 8px 0 8px;
}

.page-text--district-ai .text-content .bb-dai-summary-num {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 4.5vw, 56px);
  line-height: 1;
  color: #111;
  margin: 0 0 8px;
}

.page-text--district-ai .text-content .bb-dai-summary-label {
  font-size: 14px;
  color: #555;
  margin: 0;
}

.bb-dai-chart {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  min-width: 0;
}

.bb-dai-chart-plot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.page-text--district-ai .text-content .bb-dai-chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  margin: 0;
}

.bb-dai-donut {
  width: 112px;
  height: 112px;
  display: block;
}

.bb-dai-chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: #4a4a4a;
  line-height: 1.7;
}

.bb-dai-chart-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-dai-chart-legend strong {
  font-weight: 500;
  color: #1a1a1a;
}

.bb-dai-chart-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bb-dai-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.bb-dai-search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: none;
  border-bottom: 1px solid #cfc9ba;
  background: transparent;
  padding: 10px 0;
  font-size: 16px;
  color: #1a1a1a;
  border-radius: 0;
}

.bb-dai-search input:focus {
  outline: none;
  border-bottom-color: #1a1a1a;
}

.bb-dai-table-wrap {
  overflow-x: auto;
}

.bb-dai-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  table-layout: fixed;
}

.bb-dai-table-wrap .bb-dai-table {
  font-size: 16px;
}

.bb-dai-col-district {
  width: 20%;
}

.bb-dai-table thead th {
  text-align: left;
  font-weight: 500;
  color: #6a6a6a;
  padding: 10px 4px;
  border-bottom: 1px solid #d8d3c6;
  white-space: nowrap;
  vertical-align: bottom;
}

.bb-dai-th {
  min-width: 88px;
}

.bb-dai-sort {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: inherit;
  cursor: pointer;
}

.bb-dai-sort::after {
  content: " ↕";
  opacity: 0.35;
  font-size: 19px;
}

.bb-dai-sort[data-dir="asc"]::after {
  content: " ▲";
  opacity: 1;
}

.bb-dai-sort[data-dir="desc"]::after {
  content: " ▼";
  opacity: 1;
}

.bb-dai-th select {
  display: block;
  width: 100%;
  max-width: 112px;
  border: 1px solid #c8c4b8;
  border-radius: 999px;
  background: transparent;
  color: #1a1a1a;
  font-size: 13px;
  padding: 4px 6px;
}

@media (min-width: 901px) {
  .bb-dai-stick {
    background: #f0ece0;
    padding-top: 8px;
    padding-bottom: 6px;
  }

  .bb-dai-table-wrap {
    overflow: visible;
  }

  .bb-dai-search {
    margin-bottom: 0;
    padding-bottom: 8px;
  }

  .bb-dai-stick th,
  .bb-dai-stick select {
    background: #f0ece0;
  }

  .bb-dai-table .bb-dai-row td {
    border-bottom: none;
  }

  .bb-dai-table .bb-dai-detail td {
    border-bottom: 1px solid #e4dfd2;
  }

  .bb-dai-table .bb-dai-detail td {
    padding-top: 0;
    padding-bottom: 0;
    transition: padding 0.3s ease;
  }

  .bb-dai-table .bb-dai-data-block {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.25s ease,
      transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .bb-dai-table .bb-dai-item:hover .bb-dai-detail td:has(.bb-dai-data-block),
  .bb-dai-table .bb-dai-item:focus-within .bb-dai-detail td:has(.bb-dai-data-block),
  .bb-dai-table .bb-dai-item.is-open .bb-dai-detail td:has(.bb-dai-data-block) {
    padding-top: 8px;
    padding-bottom: 16px;
  }

  .bb-dai-table .bb-dai-item:hover .bb-dai-data-block,
  .bb-dai-table .bb-dai-item:focus-within .bb-dai-data-block,
  .bb-dai-table .bb-dai-item.is-open .bb-dai-data-block {
    max-height: 120px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.bb-dai-table td {
  padding: 10px 4px;
  vertical-align: middle;
  border-bottom: 1px solid #e4dfd2;
  background: transparent;
}

.bb-dai-table .bb-dai-row td {
  vertical-align: middle;
}

.bb-dai-table td.bb-dai-district {
  min-width: 180px;
  vertical-align: top;
}

.bb-dai-district strong {
  display: block;
  font-weight: 600;
  color: #111;
}

.bb-dai-district span,
.bb-dai-place {
  display: block;
  font-size: 15px;
  color: #6a6a6a;
  font-weight: 400;
}

.bb-dai-students {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bb-dai-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 13px;
  border: 1px solid transparent;
  line-height: 1.4;
  text-decoration: none;
}

.bb-dai-pill-icon {
  font-size: 13px;
  line-height: 1;
}

a.bb-dai-pill:hover {
  text-decoration: underline;
}

.bb-dai-pill--yes {
  color: #1f6b32;
  border-color: #8fd49a;
  background: #e8f7ea;
}

.bb-dai-pill--policy-yes {
  color: #8a5a12;
  border-color: #e0c48a;
  background: #faf3e3;
}

.bb-dai-pill--no {
  color: #555;
  border-color: #cfc9ba;
  background: #f4f1e8;
}

.bb-dai-pill--limited {
  color: #8a5a12;
  border-color: #e0c48a;
  background: #faf3e3;
}

.bb-dai-pill--required {
  color: #5a3d9e;
  border-color: #c4b3e8;
  background: #f3edfb;
}

.bb-dai-pill--encouraged {
  color: #1f6b32;
  border-color: #8fd49a;
  background: #e8f7ea;
}

.bb-dai-pill--restrictive {
  color: #5a3d9e;
  border-color: #c4b3e8;
  background: #f3edfb;
}

.bb-dai-pill--cautious {
  color: #f0ece0;
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.bb-dai-pill--supportive {
  color: #1f6b32;
  border-color: #8fd49a;
  background: #e8f7ea;
}

.bb-dai-pill--unclear {
  color: #6b4ea3;
  border-color: #c9b8e6;
  background: #f6f1fb;
}

.bb-dai-pill--strong {
  color: #1f6b32;
  border-color: #8fd49a;
  background: #e8f7ea;
}

.bb-dai-pill--moderate {
  color: #555;
  border-color: #cfc9ba;
  background: #f4f1e8;
}

.bb-dai-pill--weak {
  color: #888;
  border-color: #ddd8cc;
  background: transparent;
}

.bb-dai-detail td {
  background: transparent;
  padding: 8px 4px 16px;
  border-bottom: none;
  text-align: left;
  vertical-align: top;
}

.page-text--district-ai .text-content .bb-dai-more-label {
  font-size: 14px;
  color: #888;
  font-weight: 400;
  margin: 0 0 4px;
}

.bb-dai-dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
  margin: 0;
  width: 100%;
  text-align: right;
}

.bb-dai-dl dt {
  font-size: 14px;
  color: #888;
  font-weight: 400;
}

.bb-dai-dl dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.bb-dai-dl a {
  color: inherit;
  text-decoration: none;
}

.bb-dai-cards {
  display: none;
}

.bb-dai-foot {
  font-size: 13px;
  color: #8a8a8a;
  margin: 12px 0 48px;
}

@media (max-width: 700px) {
  .bb-dai-summary {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 24px;
  }
}

@media (max-width: 900px) {
  .page-text--district-ai .text-content > .wp-block-group:first-child {
    padding-right: 0;
  }

  .page-text--district-ai .text-content > .wp-block-group:first-child::after {
    display: none;
  }

  .page-text--district-ai .text-content > .wp-block-columns {
    flex-wrap: wrap;
  }

  .page-text--district-ai .text-content > .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
  }

  .bb-dai-table-wrap {
    display: none;
  }

  .bb-dai-stick .bb-dai-table {
    display: block;
    table-layout: auto;
    width: 100%;
  }

  .bb-dai-stick .bb-dai-table colgroup {
    display: none;
  }

  .bb-dai-stick .bb-dai-table thead,
  .bb-dai-stick .bb-dai-table tr {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }

  .bb-dai-stick .bb-dai-table th {
    display: flex;
    flex-direction: column;
    flex: 1 1 calc(50% - 12px);
    min-width: 140px;
    padding: 0 0 4px;
    border-bottom: none;
    white-space: normal;
  }

  .bb-dai-stick .bb-dai-table th:first-child {
    display: none;
  }

  .bb-dai-stick .bb-dai-th select {
    max-width: none;
    width: 100%;
  }

  .bb-dai-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .bb-dai-card {
    border: 1px solid #d8d3c6;
    border-radius: 16px;
    padding: 16px;
    background: #f7f4ea;
    font-size: 16px;
  }

  .bb-dai-district-title h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
  }

  .bb-dai-data-block {
    margin-top: 12px;
    padding: 12px 8px 4px;
    border-top: 1px solid #e4dfd2;
  }

  .bb-dai-data-block .bb-dai-dl {
    margin-top: 0;
    gap: 16px 12px;
  }
}

.bb-dai-editor-note {
  font-size: 12px;
  color: #6a6a6a;
  margin: 0 0 12px;
}

.bb-dai-row-edit {
  display: grid;
  grid-template-columns: 56px minmax(160px, 1.6fr) 90px 110px 130px 110px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e4dfd2;
}

.bb-dai-row-edit .bb-dai-district span {
  display: inline;
  margin-right: 6px;
}

.bb-dai-row-edit .components-base-control,
.bb-dai-row-edit .components-text-control__input,
.bb-dai-row-edit .components-select-control__input {
  margin-bottom: 0;
}

.bb-dai-row-edit .components-base-control {
  margin: 0;
}
