.posture-view-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: .8rem 1.5rem;
  margin-block-end: 1.2rem;
}

.posture-view-head h2 { margin: 0; }
.posture-view-head p:not(.posture-kicker) { max-width: 54ch; margin: .35rem 0 0; }
.posture-kicker {
  margin: 0 0 .28rem;
  color: var(--clay);
  font-size: .72rem;
  font-weight: 680;
  letter-spacing: .065em;
}

.posture-scope,
.posture-algorithm-types {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.posture-scope { flex: none; padding: .22rem; border: 1px solid var(--console-rule); border-radius: .43rem; background: var(--console-linen); }

.posture-scope button,
.posture-algorithm-types button,
.posture-inventory-filters > button,
.posture-token {
  min-height: 2.12rem;
  padding: .3rem .61rem;
  border: 1px solid transparent;
  border-radius: .22rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 630;
  line-height: 1.3;
}

.posture-scope button:hover,
.posture-algorithm-types button:hover,
.posture-inventory-filters > button:hover,
.posture-token:hover { background: var(--console-active); }
.posture-scope button[aria-pressed="true"],
.posture-algorithm-types button[aria-pressed="true"] {
  background: var(--console-active);
  border-color: var(--console-selected-edge);
  color: var(--brand-ink);
}

.posture-readiness {
  position: relative;
  display: grid;
  grid-template-columns: minmax(9.3rem, .37fr) minmax(0, 1fr);
  gap: 1rem 1.65rem;
  align-items: center;
  overflow: hidden;
  padding: 1.15rem 1.45rem;
  border: 1px solid var(--console-rule);
  border-radius: .64rem;
  background: linear-gradient(112deg, var(--white), var(--console-linen));
  color: var(--ink);
}


.posture-readiness-lead {
  display: grid;
  justify-items: start;
  min-width: 0;
  padding-block: .28rem;
}

.posture-readiness-lead p {
  margin: 0;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 625;
}

.posture-readiness-lead > strong {
  margin-block: .08rem .21rem;
  color: var(--clay);
  font: 560 clamp(2.75rem, 5vw, 4.35rem)/1.05 var(--display);
  letter-spacing: -.065em;
}

.posture-readiness-lead strong small { margin-inline-start: .07em; font-size: .48em; }
.posture-readiness-lead > span { color: var(--muted); font-size: .75rem; line-height: 1.36; }

.posture-scale {
  display: flex;
  gap: 1px;
  align-items: stretch;
  height: .67rem;
  border-radius: .23rem;
  background: color-mix(in srgb, var(--mineral) 66%, transparent);
  overflow: hidden;
}

.posture-scale > span { flex-basis: 0; min-width: 0; background: var(--posture-state); }
.posture-readiness .posture-scale { height: .8rem; background: var(--console-active); }

[data-state="ready"] { --posture-state: #4a7663; }
[data-state="hybrid"] { --posture-state: #527b85; }
[data-state="classical"] { --posture-state: #9e6c36; }
[data-state="weak"] { --posture-state: #a75b50; }
[data-state="plaintext"] { --posture-state: #866584; }
[data-state="unknown"] { --posture-state: #777b7a; }

.posture-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .28rem .55rem;
  margin-block-start: .65rem;
}

.posture-legend-item {
  display: grid;
  grid-template-columns: .4rem minmax(0, 1fr) auto;
  align-items: center;
  text-align: start;
  gap: .33rem;
  min-height: 2rem;
  padding: .26rem .16rem;
  border: 0;
  border-radius: .22rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: .72rem;
  line-height: 1.25;
}

.posture-legend-item:hover { background: var(--console-active); }
.posture-legend-item:focus-visible { outline-color: var(--focus); }
.posture-legend-item:disabled { cursor: default; opacity: .62; }
.posture-legend-item strong { font-weight: 660; font-variant-numeric: tabular-nums; }

.posture-state-dot {
  display: inline-block;
  width: .46rem;
  height: .46rem;
  vertical-align: .08em;
  border-radius: 50%;
  background: var(--posture-state);
}

.posture-issue-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: 1rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--console-rule);
  border-radius: .63rem;
}

.posture-metric {
  display: flex;
  flex-direction: column;
  gap: .24rem;
  min-height: 5.65rem;
  padding: .75rem .85rem;
  border: 0;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  text-align: start;
}
.posture-metric + .posture-metric { border-inline-start: 1px solid var(--console-rule); }
.posture-metric:hover { background: var(--console-linen); }
.posture-metric:focus-visible { outline-offset: -3px; }
.posture-metric span { font-size: .72rem; font-weight: 660; }
.posture-metric strong {
  color: var(--clay);
  font: 620 1.68rem/1.04 var(--display);
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.posture-metric small { color: var(--muted); font-size: .68rem; line-height: 1.34; }

.posture-summary-grid,
.posture-inventory {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: start;
  gap: .88rem;
}
.posture-inventory { grid-template-columns: minmax(0, .82fr) minmax(0, 1.2fr); }
.posture-card { min-width: 0; padding: .95rem 1.05rem; }

.posture-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .4rem .7rem;
  margin-block-end: .48rem;
}
.posture-card-head h3 { margin: 0; font-size: .93rem; font-weight: 660; }
.posture-card-head button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--clay);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: end;
}
.posture-card-head button:hover { text-decoration: underline; }

.posture-priorities,
.posture-milestones,
.posture-policy,
.posture-algorithm-bars { margin: 0; padding: 0; list-style: none; }

.posture-priorities li + li { border-top: 1px solid var(--console-rule); }
.posture-priority {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1fr) 1rem;
  align-items: center;
  gap: .4rem .62rem;
  width: 100%;
  min-height: 3.12rem;
  padding: .48rem .1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: start;
}

.posture-priority:hover { color: var(--clay); }
.posture-priority .posture-scale { height: .37rem; }
.posture-priority-label,
.posture-priority-scale { display: grid; gap: .18rem; }
.posture-priority-label strong { font-size: .77rem; font-weight: 660; }
.posture-priority small,
.posture-subcopy,
.posture-service-legend { color: var(--muted); font-size: .7rem; line-height: 1.32; }
.posture-service-legend { display: flex; flex-wrap: wrap; gap: .28rem .8rem; margin-block-end: .6rem; }
.posture-service-legend span { display: inline-flex; align-items: center; gap: .33rem; }

.posture-coverage-stat { margin: .68rem 0 .46rem; color: var(--muted); font-size: .77rem; }
.posture-coverage-stat strong { margin-inline-end: .24rem; color: var(--clay); font: 620 1.58rem/1 var(--display); }

.posture-gauge {
  display: block;
  height: .4rem;
  overflow: hidden;
  border-radius: .18rem;
  background: var(--console-active);
}
.posture-gauge > span { display: block; height: 100%; border-radius: inherit; background: var(--clay); }

.posture-coverage-summary { margin: .72rem 0 0; }
.posture-coverage-summary > div,
.posture-policy li {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding-block: .37rem;
  border-top: 1px solid var(--console-rule);
  font-size: .75rem;
}
.posture-coverage-summary dt { color: var(--muted); }
.posture-coverage-summary dd { margin: 0; font-weight: 660; }
.posture-policy { margin-block-start: .5rem; }
.posture-policy li { align-items: center; }
.posture-milestones li { margin-block: .85rem; }
.posture-milestones li > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-block-end: .32rem;
  color: var(--muted);
  font-size: .76rem;
}
.posture-milestones strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.posture-inventory-filters {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1.25fr) max-content;
  align-items: end;
  gap: .6rem;
  margin-block-end: 1rem;
}
.posture-inventory-filters label { display: grid; gap: .24rem; min-width: 0; }
.posture-inventory-filters label span { color: var(--muted); font-size: .72rem; font-weight: 630; }
.posture-inventory-filters :is(select, input) {
  width: 100%;
  min-width: 0;
  padding: .4rem .5rem;
  min-height: 2.23rem;
  border: 1px solid var(--line);
  border-radius: .24rem;
  background: var(--white);
  color: var(--ink);
  font-size: .74rem;
}
.posture-inventory-filters > button { border-color: var(--line); }
.posture-algorithm-types button {
  padding-inline: .48rem;
  border-color: var(--line);
  font-size: .69rem;
}
.posture-algorithm-bars { margin-block-start: .66rem; }
.posture-algorithm-bars button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .26rem .6rem;
  width: 100%;
  padding: .42rem .36rem;
  border: 1px solid transparent;
  border-radius: .23rem;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: start;
  font-size: .72rem;
  line-height: 1.35;
}
.posture-algorithm-bars button:hover,
.posture-algorithm-bars button[aria-pressed="true"] {
  border-color: var(--line);
  background: color-mix(in srgb, var(--mineral) 45%, var(--white));
}
.posture-algorithm-bars button strong { font-size: .71rem; font-variant-numeric: tabular-nums; }
.posture-algorithm-bars button > .posture-gauge { grid-column: 1 / -1; }
.posture-table-meta { display: flex; justify-content: space-between; align-items: center; gap: .35rem; min-height: 1.8rem; }
.posture-table-meta p,
.posture-empty { margin: .2rem 0 .45rem; color: var(--muted); font-size: .75rem; }
.posture-token { min-height: auto; border-color: var(--line); padding: .12rem .44rem; font-size: .68rem; }
.posture-table td { font-variant-numeric: tabular-nums; }
.posture-table th small { display: block; color: var(--muted); font-weight: 400; font-size: .66rem; }
.posture-table-state { display: inline-flex; gap: .35rem; align-items: baseline; min-width: 8ch; font-size: .68rem; }
.posture-table-state .posture-state-dot { flex: 0 0 .46rem; }
.posture-visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 850px) {
  .posture-view-head { align-items: flex-start; flex-direction: column; }
  .posture-inventory { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 650px) {
  .posture-summary-grid { grid-template-columns: minmax(0, 1fr); }
  .posture-readiness { grid-template-columns: minmax(0, 1fr); padding: .94rem; gap: .7rem; }
  .posture-readiness-lead { padding-block: 0; }
  .posture-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posture-issue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posture-metric { padding: .65rem .7rem; }
  .posture-metric:nth-child(odd) { border-inline-start: 0; }
  .posture-metric:nth-child(n+3) { border-top: 1px solid var(--console-rule); }
  .posture-inventory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posture-card { padding: .75rem; }
  .posture-priority { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) .74rem; }
}

@media (max-width: 360px) {
  .posture-inventory-filters { grid-template-columns: minmax(0, 1fr); }
  .posture-scope button { padding-inline: .42rem; }
}

.posture-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  margin-block-start: .5rem;
  padding-block-start: .55rem;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: .71rem;
}

.posture-pagination span { margin-inline-end: auto; }

.posture-pagination button {
  border: 1px solid var(--line);
  border-radius: .24rem;
  padding: .26rem .49rem;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: .7rem;
}
.posture-pagination button:enabled:hover { background: var(--mineral); }
.posture-pagination button:disabled { color: var(--muted); opacity: .61; cursor: default; }
