/* ============================================================
   AI Governance section — "定界 · The Accountable Line"
   Reuses the global palette/variables defined in styles.css.
   ============================================================ */

.governance-section {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0;
}

.governance-section h3 {
  letter-spacing: 0;
}

/* ---- Thesis / 定界 mark ---- */
.gov-thesis {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: 4px 0 26px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(201, 100, 66, 0.12), rgba(50, 107, 133, 0.08));
  box-shadow: var(--shadow);
}

.gov-thesis-mark {
  display: grid;
  place-items: center;
  height: 108px;
  border-radius: 8px;
  background: var(--text);
  color: #fffaf2;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 6px;
  text-indent: 6px;
}

.gov-thesis-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.gov-thesis-copy strong {
  color: var(--text);
}

/* ---- Five tenets ---- */
.gov-tenet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.gov-tenet {
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.gov-tenet-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(201, 100, 66, 0.12);
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

.gov-tenet h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.18;
}

.gov-tenet p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ---- Decision Quadrant ---- */
.gov-quadrant-shell {
  margin-bottom: 44px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.gov-quadrant-head {
  max-width: 760px;
  margin-bottom: 22px;
}

.gov-quadrant-head h3 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.04;
}

.gov-quadrant-head p:not(.kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.gov-quadrant-live {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.gov-quadrant-board {
  position: relative;
  padding: 30px 8px 8px 30px;
}

.gov-axis {
  position: absolute;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gov-axis-x {
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
}

.gov-axis-y {
  top: 50%;
  left: -2px;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left center;
}

.gov-quad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.gov-quad-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.7);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.gov-quad-cell:hover {
  transform: translateY(-3px);
}

.gov-quad-cell strong {
  font-size: 20px;
  line-height: 1.05;
}

.gov-quad-pos {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gov-quad-cell.cyan.active {
  border-color: rgba(201, 100, 66, 0.62);
  background: rgba(201, 100, 66, 0.12);
  box-shadow: 0 14px 34px rgba(47, 35, 25, 0.16);
}
.gov-quad-cell.blue.active {
  border-color: rgba(50, 107, 133, 0.6);
  background: rgba(50, 107, 133, 0.12);
  box-shadow: 0 14px 34px rgba(47, 35, 25, 0.16);
}
.gov-quad-cell.lime.active {
  border-color: rgba(73, 111, 85, 0.6);
  background: rgba(73, 111, 85, 0.12);
  box-shadow: 0 14px 34px rgba(47, 35, 25, 0.16);
}

.gov-quadrant-detail {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.92);
}

.gov-detail-tag {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.gov-detail-tag.cyan { background: rgba(201, 100, 66, 0.14); color: var(--cyan); }
.gov-detail-tag.blue { background: rgba(50, 107, 133, 0.14); color: var(--blue); }
.gov-detail-tag.lime { background: rgba(73, 111, 85, 0.14); color: var(--lime); }

.gov-quadrant-detail h4 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.04;
}

.gov-quadrant-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- "Place your decision" tool ---- */
.gov-decide {
  margin-top: 16px;
  padding: 20px;
  border: 1px dashed rgba(201, 100, 66, 0.45);
  border-radius: 10px;
  background: rgba(255, 252, 246, 0.6);
}

.gov-decide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gov-decide-input {
  flex: 1 1 260px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.gov-decide-input:focus {
  outline: none;
  border-color: rgba(201, 100, 66, 0.6);
  box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.12);
}

.gov-decide-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 16px;
}

.gov-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gov-choice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gov-choice-btns {
  display: inline-flex;
  gap: 8px;
}

.gov-choice-btns button {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.gov-choice-btns button:hover {
  transform: translateY(-2px);
}

.gov-choice-btns button.active {
  border-color: var(--text);
  background: var(--text);
  color: #fffaf2;
}

.gov-decide-result {
  min-height: 28px;
}

.gov-decide-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.gov-decide-tag {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.gov-decide-tag.cyan { background: rgba(201, 100, 66, 0.14); color: var(--cyan); }
.gov-decide-tag.blue { background: rgba(50, 107, 133, 0.14); color: var(--blue); }
.gov-decide-tag.lime { background: rgba(73, 111, 85, 0.14); color: var(--lime); }

.gov-decide-verdict {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

/* ---- Pieces grid ---- */
.gov-pieces-head {
  max-width: 820px;
  margin-bottom: 14px;
}

.gov-pieces-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.gov-filter-row {
  margin-bottom: 18px;
}

.gov-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gov-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.gov-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 100, 66, 0.5);
  box-shadow: 0 20px 44px rgba(47, 35, 25, 0.18);
}

.gov-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #d8cec1;
}

.gov-card-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gov-card-no {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(25, 23, 21, 0.78);
  color: #fffaf2;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.gov-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 16px 18px;
}

.gov-card-movement {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gov-card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.16;
}

.gov-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

/* ---- Modal ---- */
.gov-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  background: rgba(25, 21, 17, 0.55);
  backdrop-filter: blur(6px);
}

.gov-modal.open {
  display: flex;
}

.gov-modal-panel {
  position: relative;
  width: min(960px, 100%);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  box-shadow: 0 40px 90px rgba(30, 20, 12, 0.4);
}

.gov-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.92);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.gov-modal-close:hover {
  transform: rotate(90deg);
  background: #fffaf2;
}

.gov-modal-body {
  padding: 30px;
}

.gov-modal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-right: 48px;
}

.gov-modal-no {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--text);
  color: #fffaf2;
  font-size: 13px;
  font-weight: 850;
}

.gov-modal-movement {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.gov-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 26px;
}

.gov-modal-visual {
  position: sticky;
  top: 0;
  align-self: start;
}

.gov-modal-visual img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.gov-modal-copy h3 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.06;
}

.gov-modal-tagline {
  margin: 0 0 20px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
}

.gov-modal-section {
  margin-bottom: 20px;
}

.gov-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gov-modal-section p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.62;
}

.gov-modal-section p:last-child {
  margin-bottom: 0;
}

.gov-modal-oneline {
  margin-bottom: 20px;
  padding: 18px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 8px 8px 0;
  background: rgba(201, 100, 66, 0.08);
}

.gov-modal-oneline.framework {
  border-left-color: var(--blue);
  background: rgba(50, 107, 133, 0.08);
}

.gov-modal-oneline p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--text);
}

.gov-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gov-modal-tags span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

/* ---- Responsive ---- */
@media (max-width: 1020px) {
  .gov-tenet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gov-quadrant-live {
    grid-template-columns: 1fr;
  }
  .gov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gov-modal-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .gov-modal-visual {
    position: static;
    max-width: 360px;
  }
}

@media (max-width: 700px) {
  .governance-section {
    width: min(350px, calc(100% - 36px));
    margin-left: 18px;
    margin-right: 0;
    padding: 42px 0;
  }
  .gov-thesis {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .gov-thesis-mark {
    height: 84px;
    font-size: 38px;
  }
  .gov-tenet-grid {
    grid-template-columns: 1fr;
  }
  .gov-tenet {
    min-height: 0;
  }
  .gov-quadrant-shell {
    padding: 18px;
  }
  .gov-quadrant-head h3 {
    font-size: 26px;
  }
  .gov-quad-grid {
    grid-template-rows: repeat(2, minmax(100px, 1fr));
  }
  .gov-grid {
    grid-template-columns: 1fr;
  }
  .gov-modal {
    padding: 16px 10px;
  }
  .gov-modal-body {
    padding: 22px 18px;
  }
  .gov-modal-copy h3 {
    font-size: 25px;
  }
}
