/* Security dossier · extends Ember and the B1 shell. */

.security-hero {
  min-height: 78svh;
  padding-top: clamp(156px, 20vh, 220px);
}

.security-hero .lede {
  max-width: 66ch;
}

.security-hero .page-title {
  text-wrap: balance;
}

.review-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--hair-dark);
  color: var(--cream-faint);
  font: 500 12px/1.5 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.review-line a {
  color: var(--verm);
  text-underline-offset: 4px;
}

.boundary-section {
  padding-top: clamp(80px, 11vh, 130px);
}

.boundary-figure {
  margin-top: clamp(44px, 7vw, 76px);
  border: 2px solid var(--hair-dark);
  background: var(--ink-3);
}

.boundary-cutaway {
  display: block;
  width: 100%;
  height: auto;
}

.environment-boundary,
.egress-boundary {
  fill: none;
  stroke: var(--ghost);
  stroke-width: 1;
}

.egress-boundary {
  stroke-dasharray: 5 7;
}

.host-boundary {
  fill: var(--ink-3);
  stroke: var(--verm);
  stroke-width: 2;
}

.principal-boundary {
  fill: var(--ink);
  stroke: var(--cream-faint);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.principal-boundary-label {
  fill: var(--cream-dim);
  font: 500 10px var(--mono);
  letter-spacing: .09em;
}

.cutaway-kicker,
.path-label {
  fill: var(--cream-faint);
  font: 500 12px var(--mono);
  letter-spacing: .1em;
}

.cutaway-kicker-strong {
  fill: var(--verm);
}

.cutaway-node rect,
.cutaway-note rect {
  fill: var(--ink-2);
  stroke: var(--hair-dark);
  stroke-width: 1;
}

.ingest-source rect {
  fill: var(--ink-3);
}

.cutaway-node-title {
  fill: var(--cream);
  font: 620 18px var(--sans);
  letter-spacing: .02em;
}

.cutaway-node-copy,
.cutaway-note-detail {
  fill: var(--cream-dim);
  font: 500 13px var(--mono);
  letter-spacing: .04em;
}

.cutaway-note-detail {
  fill: var(--cream-dim);
  font-size: 11px;
}

.cutaway-note-inactive {
  opacity: .58;
}

.redaction-gate rect {
  fill: var(--ink-2);
  stroke: var(--verm);
}

.redaction-gate-title {
  fill: var(--verm);
  font: 650 10px var(--mono);
  letter-spacing: .08em;
}

.cutaway-path,
.cutaway-arrow {
  fill: none;
  stroke: var(--verm);
  stroke-width: 2;
}

.ingest-path {
  stroke-width: 1.5;
}

.ingest-path-label {
  fill: var(--cream-dim);
}

.optional-path {
  fill: none;
  stroke: var(--ember-soft);
  stroke-width: 1.5;
  stroke-dasharray: 6 7;
}

.optional-arrow {
  stroke: var(--ember-soft);
  stroke-width: 1.5;
}

.egress-path[data-egress-order="0"] { --egress-delay: 180ms; }
.egress-path[data-egress-order="1"] { --egress-delay: 320ms; }
.egress-path[data-egress-order="2"] { --egress-delay: 460ms; }
.egress-path[data-egress-order="3"] { --egress-delay: 600ms; }

.separate-path,
.separate-arrow {
  stroke: var(--hair-dark);
}

.boundary-cutaway a {
  outline: none;
}

.boundary-cutaway a:hover rect,
.boundary-cutaway a:focus-visible rect,
.boundary-cutaway [data-active="true"] rect {
  stroke: var(--verm);
  stroke-width: 2;
}

.boundary-cutaway a:hover .cutaway-path,
.boundary-cutaway a:focus-visible .cutaway-path,
.boundary-cutaway a:hover .cutaway-arrow,
.boundary-cutaway a:focus-visible .cutaway-arrow,
.boundary-cutaway a:hover .optional-path,
.boundary-cutaway a:focus-visible .optional-path,
.boundary-cutaway [data-active="true"] .cutaway-path,
.boundary-cutaway [data-active="true"] .cutaway-arrow,
.boundary-cutaway [data-active="true"] .optional-path {
  stroke: var(--cream);
}

.boundary-figure figcaption {
  padding: 16px 20px;
  border-top: 0;
  border-bottom: 1px solid var(--hair-dark);
  color: var(--cream-faint);
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.boundary-section > .eyebrow,
.boundary-section > .eyebrow .idx {
  color: var(--cream);
}

/* Shared scenario record · location annotation outside frozen FIG 1.1. */
.scenario-location {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(32px, 5vw, 52px);
  padding-block: var(--world-strata);
  border-block: var(--world-axis) solid var(--cream-faint);
}

.scenario-location-intro > span,
.scenario-records dt span {
  color: var(--cream);
  font: 650 var(--mono-label)/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scenario-location h3 {
  max-width: 22ch;
  margin-top: 12px;
  color: var(--cream);
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.15;
  text-wrap: balance;
}

.scenario-location p {
  max-width: 60ch;
  margin-top: 14px;
  color: var(--cream);
  font-size: 14px;
  line-height: 1.65;
}

.scenario-location a {
  color: var(--cream);
  text-underline-offset: 4px;
}

.scenario-records > div {
  padding-block: 18px;
}

.scenario-records > div:first-child {
  padding-top: 0;
}

.scenario-records > div + div {
  border-top: var(--world-axis) solid var(--cream-faint);
}

.scenario-records dt {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
}

.scenario-records code {
  color: var(--cream);
  font: 500 12px/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.scenario-records dd {
  max-width: 68ch;
  margin-top: 10px;
  color: var(--cream);
  font-size: 16px;
  line-height: 1.55;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 34px;
  border: 2px solid var(--hair-dark);
  background: var(--ink);
}

.boundary-table,
.responsibility-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
}

.boundary-table caption {
  padding: 18px 20px;
  color: var(--cream-faint);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
}

.boundary-table th,
.boundary-table td,
.responsibility-table th,
.responsibility-table td {
  padding: 18px 20px;
  border-top: 1px solid var(--hair-dark);
  vertical-align: top;
}

.boundary-table thead th,
.responsibility-table thead th {
  color: var(--verm);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.boundary-table tbody th,
.responsibility-table tbody th {
  color: var(--cream);
  font: 500 12px/1.5 var(--mono);
}

.boundary-table td,
.responsibility-table td {
  color: var(--cream-dim);
  font-size: 14px;
  line-height: 1.55;
}

.boundary-table tr[data-active="true"] {
  background: var(--ink-2);
}

.auth-grid {
  display: grid;
  grid-template-columns: .86fr 1.14fr 1fr;
  margin-top: clamp(42px, 6vw, 68px);
  border-top: 2px solid var(--verm-paper);
  border-bottom: 2px solid var(--hair-paper);
}

.auth-grid article {
  padding: clamp(24px, 3vw, 34px) clamp(20px, 3vw, 34px);
}

.auth-grid article + article {
  border-left: 1px solid var(--hair-paper);
}

.auth-grid h3 {
  margin: 18px 0 12px;
  color: var(--paper-ink);
  font-size: 19px;
}

.auth-grid p {
  color: var(--paper-dim);
  font-size: 15px;
}

.status-chip {
  display: inline-block;
  padding: 5px 8px;
  border: 2px solid var(--hair-paper);
  color: var(--paper-dim);
  font: 500 12px/1.3 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.status-current {
  border-color: var(--verm-paper);
  color: var(--verm-paper);
}

.status-limit {
  border-style: dashed;
}

.auth-limit {
  display: grid;
  grid-template-columns: minmax(190px, .32fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--paper-ink);
  border: 2px solid var(--hair-paper);
  color: var(--cream);
}

.auth-limit .status-chip {
  width: fit-content;
  border-color: var(--cream-faint);
  color: var(--cream-dim);
}

.auth-limit h3 {
  margin: 0 0 12px;
  color: var(--cream);
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.15;
}

.auth-limit p {
  color: var(--cream-dim);
  font-size: 15px;
}

.operations-ledger {
  max-width: 1040px;
  margin-top: clamp(46px, 7vw, 74px);
  border-top: 1px solid var(--hair-dark);
}

.operations-ledger > div {
  display: grid;
  grid-template-columns: minmax(180px, .3fr) 1fr;
  gap: clamp(22px, 4vw, 60px);
  padding: 23px 0;
  border-bottom: 1px solid var(--hair-dark);
}

.operations-ledger dt {
  color: var(--verm);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.operations-ledger dd {
  color: var(--cream-dim);
  font-size: 16px;
}

.status-text {
  color: var(--cream);
}

.responsibility-section .table-wrap {
  border-color: var(--hair-dark);
}

.responsibility-table th,
.responsibility-table td {
  border-color: var(--hair-dark);
}

.responsibility-table thead th {
  color: var(--verm);
}

.responsibility-table tbody th {
  color: var(--cream);
}

.responsibility-table td {
  color: var(--cream-dim);
}

.disclosure-section .notice a {
  color: var(--verm);
}

@media (max-width: 840px) {
  .scenario-location {
    grid-template-columns: 1fr;
  }

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

  .auth-grid article + article {
    border-top: 1px solid var(--hair-paper);
    border-left: 0;
  }

  .auth-limit {
    grid-template-columns: 1fr;
  }

  .operations-ledger > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .boundary-figure.seen .egress-path {
    animation: boundary-egress-draw 1.1s var(--ease) var(--egress-delay, 180ms) both;
  }

  .boundary-figure.seen .optional-arrow {
    animation: boundary-arrow-settle .35s var(--ease) .95s both;
  }

  @keyframes boundary-egress-draw {
    0% {
      opacity: .24;
      stroke-dasharray: 0 900;
      stroke-dashoffset: 900;
    }
    72% {
      opacity: 1;
    }
    100% {
      opacity: 1;
      stroke-dasharray: 6 7;
      stroke-dashoffset: 0;
    }
  }

  @keyframes boundary-arrow-settle {
    from { opacity: .24; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .egress-path {
    opacity: 1;
    stroke-dasharray: 6 7;
    stroke-dashoffset: 0;
    animation: none;
  }

  .optional-arrow {
    opacity: 1;
    animation: none;
  }
}

@media (max-width: 640px) {
  .boundary-cutaway {
    display: none;
  }

  .boundary-figure figcaption::before {
    content: "Diagram hidden at this width; the full boundary table follows. ";
    color: var(--cream);
  }
}
