.login-diagram { display: grid; grid-template-columns: minmax(0,.78fr) minmax(20px,.16fr) minmax(0,1.12fr) minmax(0,.52fr) minmax(0,1.56fr); gap: 6px; align-items: start; }
.login-user { display: grid; justify-items: center; align-content: start; text-align: center; padding-top: 13px; line-height: 1.35; }
.login-user img { width: 144px; max-width: 100%; height: auto; }
.login-user span, .login-success > span:last-child { font-size: .875rem; }
.login-diagram > .login-entry { margin-top: 90px; color: var(--ink); }
.login-diagram h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; padding: 6px 9px; font-size: 1.25rem; margin: 0; border-bottom: 2px solid var(--ink); }
.login-diagram h3 span { font-size: .9375rem; }
.login-identity { background: var(--cyan); padding-bottom: 9px; }
.login-credentials { display: flex; justify-content: center; gap: 6px; align-items: center; padding: 9px 5px; min-height: 86px; line-height: 1.4; }
.login-credentials img { width: min(43%, 97px); height: auto; }
.login-credentials p, .login-denied p { margin: 0; }
.login-success { display: grid; gap: 4px; margin-top: 62px; text-align: center; color: var(--teal); line-height: 1.3; }
.login-success .flow-arrow { margin-block: 5px; }
.login-denied { display: grid; justify-items: center; color: var(--wine); text-align: center; line-height: 1.4; }
.login-denied > span { position: relative; width: 0; height: 21px; border-left: 2px dashed; }
.login-denied > span::after { content: ""; position: absolute; bottom: -1px; left: -5px; width: 8px; height: 8px; border: solid; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.login-denied p { margin-top: 4px; padding: 4px 9px; background: var(--pink); border-radius: 6px; }
.login-permissions { background: var(--yellow); padding-bottom: 9px; }
.study-figure .login-permissions table { width: calc(100% - 14px); margin: 0 auto; background: var(--white); table-layout: fixed; }
.login-permissions caption { font-weight: 700; font-size: .875rem; padding: 5px; color: var(--ink); }
.login-permissions caption img { width: 65px; height: auto; vertical-align: middle; }
.study-figure .login-permissions :is(th,td) { padding: 4px; font-size: .9375rem; text-align: center; }
.login-permissions tbody tr:first-child td:last-child { background: var(--mint); color: var(--teal); }
.login-permissions tbody tr:last-child td:last-child { background: var(--pink); color: var(--wine); }
.study-figure .login-summary { margin: 13px 0 0; padding-top: 8px; border-top: 2px solid var(--ink); font-size: .9375rem; }

@media (max-width: 730px) {
  .login-diagram { grid-template-columns: minmax(0, 1fr); }
  .login-user { padding-top: 0; }
  .login-diagram > .login-entry, .login-success .flow-arrow { width: 22px; margin: 10px auto; transform: rotate(90deg); }
  .login-success { margin: 2px auto; }
}

.biometric-scene, .bio-results, .defense-branches, .camera-map, .ids-monitor, .evidence-line, .patch-change, .report-route { max-width: 49rem; margin-inline: auto; }
.biometric-scene { display: grid; grid-template-columns: minmax(2.6rem, .28fr) minmax(0, 1fr); gap: 5px; align-items: center; background: var(--white); padding: 7px; }
.bio-reader { width: 100%; max-width: 105px; height: auto; margin: auto; }
.bio-plot { display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: 6px; min-width: 0; }
.bio-plot-labels { grid-column: span 2; display: flex; justify-content: space-between; align-items: center; gap: 2px; font-size: .875rem; }
.bio-track { grid-area: 2 / 2; position: relative; height: 119px; margin: 2px 7px 0 0; }
.bio-track-names { grid-area: 2 / 1; display: grid; grid-template-rows: 35px 35px; align-items: center; padding-top: 14px; font-size: .9375rem; line-height: 1.2; }
.bio-track::before, .bio-track::after { content: ""; position: absolute; z-index: 1; inset-inline: 0; top: 31px; border-top: 1px solid var(--line); }
.bio-track::after { top: 66px; }
.bio-threshold { position: absolute; height: 97px; top: 0; left: var(--position); border-left: 2px dashed var(--teal); font-size: .9375rem; color: var(--teal); }
.bio-threshold:first-child { background: var(--mint); width: calc(100% - var(--position)); }
.bio-threshold b { position: absolute; top: 0; left: 0; transform: translateX(-50%); padding: 0 1px; background: var(--white); white-space: nowrap; }
.bio-threshold.bio-strict { width: calc(100% - var(--position)); border-left: 2px solid var(--wine); color: var(--wine); background: var(--pink); }
.bio-track i { position: absolute; z-index: 2; width: 9px; height: 9px; border: 1px solid var(--ink); border-radius: 50%; background: var(--yellow); left: var(--position); top: calc(31px + var(--lane) * 35px); transform: translate(-50%, -50%); }
.bio-track i.bio-owner { background: var(--cyan); border-radius: 1px; }
.bio-track i.bio-error { outline: 1px solid var(--wine); outline-offset: 1px; }
.bio-error span { position: absolute; top: 11px; left: 0; transform: translateX(-35%); font-size: .875rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.bio-axis { position: absolute; bottom: 0; inset-inline: 0; display: flex; justify-content: space-between; padding-top: 1px; border-top: 1px solid var(--ink); font-size: .8125rem; }
.bio-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.bio-results > div { padding: 7px 11px; background: var(--mint); border-top: 2px dashed var(--teal); }
.bio-results > div:last-child { background: var(--pink); border-top: 2px solid var(--wine); }
.bio-results h3, .bio-results p { margin: 0; }
.bio-results h3 { margin-bottom: 3px; font-size: 1rem; }
.bio-results p { display: flex; justify-content: space-between; align-items: baseline; gap: 2px 8px; flex-wrap: wrap; font-size: .9375rem; }
.bio-results p > b { white-space: nowrap; }
.bio-results strong { display: block; width: fit-content; margin-top: 4px; padding-inline: 4px; background: var(--yellow); font-size: .9375rem; }
.defense-branches { display: grid; gap: 5px; }
.defense-branch { display: grid; grid-template-columns: 1fr minmax(3.4rem, .85fr) 1.2fr; gap: 7px; align-items: center; text-align: center; padding: 5px; background: var(--mint); }
.defense-branch:nth-child(2) { background: var(--yellow); }
.defense-branch > div { display: grid; justify-items: center; font-size: .875rem; }
.defense-branch img, .camera-map img, .report-route img { width: min(100%, 72px); height: auto; }
.defense-branch > span { position: relative; padding-bottom: 8px; font-size: .8125rem; border-bottom: 2px solid var(--teal); }
.defense-branch > span::after { content: ""; position: absolute; right: 0; bottom: -4px; border: solid var(--teal); border-width: 2px 2px 0 0; width: 6px; height: 6px; transform: rotate(45deg); }
.camera-map { display: grid; grid-template-columns: 1fr minmax(12px, .32fr) 1fr minmax(12px, .32fr) 1.35fr; gap: 5px; align-items: center; padding: 5px; background: var(--mint); text-align: center; }
.camera-map > div { display: grid; justify-items: center; min-width: 0; font-size: .875rem; }
.camera-map > .flow-arrow { width: calc(100% - 3px); }
.camera-viewers { gap: 4px; width: 100%; }
.camera-viewers > div { display: grid; width: 100%; padding: 2px; background: var(--white); border-left: 3px solid var(--teal); }
.camera-viewers > div:last-child { border-left-color: var(--wine); }
.camera-viewers strong { color: var(--teal); }
.camera-viewers > div:last-child strong { color: var(--wine); }
.ids-monitor { --ids-link-y: 46px; line-height: 1.35; }
.ids-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr); }
.ids-node { display: grid; justify-items: center; align-content: center; text-align: center; }
.ids-node img { width: min(100%, 108px); height: auto; }
.ids-traffic { position: relative; text-align: center; color: var(--teal); }
.ids-traffic > b { position: absolute; inset-inline: 0; bottom: calc(100% - var(--ids-link-y) + 9px); }
.ids-traffic > .flow-arrow { position: absolute; inset: var(--ids-link-y) 0 auto; }
.ids-junction { position: absolute; z-index: 1; top: calc(var(--ids-link-y) + 2px); left: 50%; width: 12px; aspect-ratio: 1; border: 2px solid var(--teal); border-radius: 50%; background: var(--yellow); translate: -50% -50%; }
.ids-traffic::after, .ids-branch::before { content: ""; position: absolute; left: 50%; border-left: 3px dashed var(--teal); translate: -50% 0; }
.ids-traffic::after { inset-block: calc(var(--ids-link-y) + 3px) 0; }
.ids-branch { position: relative; display: flex; align-items: center; min-height: 64px; padding: 4px 0 4px calc(50% + 14px); color: var(--teal); }
.ids-branch::before { inset-block: 0 9px; }
.ids-branch::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 16px; height: 16px; background: currentColor; clip-path: var(--flow-tip); transform: translateX(-50%) rotate(90deg); }
.ids-monitor small { display: block; font-size: .9375rem; font-weight: 500; }
.ids-watch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.5fr) minmax(0, .65fr) minmax(0, .6fr); gap: 7px; align-items: center; }
.ids-detector { grid-column: 2; display: grid; justify-items: center; row-gap: 6px; padding: 9px; border: 2px solid var(--ink); border-radius: var(--diagram-group-radius, 10px); background: var(--mint); }
.ids-detector-label { display: flex; gap: 7px; align-items: center; }
.ids-detector-label img { width: 66px; max-width: 29%; height: auto; }
.ids-detector-label b { font-size: 1.625rem; line-height: 1.15; }
.ids-detector p { padding: 5px 10px; background: var(--yellow); border-radius: 4px; text-align: center; }
.ids-alert { display: grid; gap: 7px; color: var(--wine); text-align: center; }
.ids-alert > .flow-arrow { color: inherit; }
.ips-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.3fr) minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "client normal-in gate normal-out server" "client attack-in gate attack-out server"; max-width: 49rem; margin-inline: auto; gap: 12px 6px; align-items: center; line-height: 1.35; }
.ips-client { grid-area: client; }
.ips-server { grid-area: server; }
.ips-normal-in { grid-area: normal-in; }
.ips-attack-in { grid-area: attack-in; }
.ips-normal-out { grid-area: normal-out; }
.ips-attack-out { grid-area: attack-out; }
.ips-gate { grid-area: gate; align-self: stretch; display: grid; justify-items: center; align-content: center; gap: 5px; padding: 9px; border: 2px solid var(--ink); border-radius: var(--diagram-group-radius, 10px); text-align: center; background: var(--mint); }
.ips-gate img { width: min(100%, 92px); height: auto; }
.ips-gate b { font-size: 1.625rem; line-height: 1.15; }
.ips-gate small { display: block; font-size: .9375rem; font-weight: 500; }
.ips-gate > span { color: var(--teal); font-weight: 700; }
.ips-lane { display: grid; grid-template-rows: auto 1rem; align-content: center; gap: 4px; color: var(--teal); text-align: center; }
.ips-lane > .flow-arrow { align-self: center; color: inherit; }
.ips-attack-in, .ips-attack-out { color: var(--wine); }
.ips-stop { display: flex; align-self: center; align-items: center; width: 62%; font-size: 1.5rem; line-height: .85; font-weight: 800; }
.ips-stop::before { content: ""; flex: 1; border-top: 4px solid; border-radius: 2px; }
@media (max-width: 640px) {
  .ids-line { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ids-node img { max-width: 82px; }
  .ids-traffic > b, .ids-line .ids-node b { font-size: .875rem; }
  .ids-watch { grid-template-columns: 1fr; justify-items: center; }
  .ids-detector { grid-column: 1; }
  .ids-alert { grid-template-columns: 2rem auto; align-items: center; }
  .ids-alert > .flow-arrow { grid-row: 1; width: 24px; transform: rotate(90deg); }
  .ips-map { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "client client" "normal-in attack-in" "gate gate" "normal-out attack-out" "server ."; gap: 10px; }
  .ips-lane { grid-template-rows: auto 1.75rem; gap: 8px; justify-items: center; align-self: start; }
  .ips-lane > .flow-arrow { width: 22px; margin-block: 9px; transform: rotate(90deg); }
  .ips-stop { width: auto; flex-direction: column; }
  .ips-stop::before { height: 10px; border-left: 4px solid; border-top: 0; }
}
.evidence-line, .patch-change, .report-route { display: grid; grid-template-columns: 1fr minmax(3rem, .4fr) 1.5fr; gap: 5px; align-items: center; }
.evidence-original, .evidence-copy { background: var(--white); padding: 5px; }
.evidence-original { text-align: center; }
.evidence-original img { display: block; width: min(100%, 80px); height: auto; margin-inline: auto; }
.evidence-line :is(h3,p,ol) { margin: 0; }
.evidence-line :is(h3,b) { font-size: .9375rem; }
.evidence-line :is(p,li) { font-size: .875rem; }
.evidence-copy ol { background: var(--mint); border-left: 2px solid var(--teal); padding: 4px; list-style: none; }
.evidence-copy time { display: inline-block; color: var(--teal); font-weight: 750; }
.evidence-arrow, .patch-action { display: grid; gap: 5px; text-align: center; color: var(--teal); }
.evidence-arrow i { width: 95%; }
.patch-change { grid-template-columns: minmax(0,1fr) auto minmax(0,.65fr) auto minmax(0,1fr); gap: .4rem; margin-block: .85rem; }
.patch-change > div { display: grid; justify-items: center; text-align: center; }
.patch-board { display: flex; gap: .3em; padding: .75em .55em .48em; margin-bottom: .3em; background: var(--white); border: 2px solid var(--ink); border-radius: .5em .35em .55em .35em; box-shadow: inset 0 .36em #dceae4, 0 3px 0 #d9cda9; }
.patch-board i { display: inline-block; width: clamp(12px, 4vw, 34px); aspect-ratio: 1; background: var(--mint); border: 1px solid var(--ink); border-radius: .13em; }
.patch-before i:nth-child(2) { background: var(--wine); clip-path: polygon(0 0, 46% 0, 28% 35%, 80% 40%, 56% 100%, 0 100%); }
.patch-after i:nth-child(2) { background: var(--yellow); }
.patch-detection-lane { display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr); gap: .25rem .65rem; align-items: center; max-width: 49rem; margin: .8rem auto 0; padding: .55rem .75rem; border-top: 2px solid #557870; background: #eef5e9; border-radius: 0 0 .55rem .55rem; }
.patch-detection-lane > b { grid-column: 2 / -1; }
.patch-detection-lane > img { grid-row: span 2; width: 3.1rem; height: auto; }
.patch-action img { width: min(5.25rem,100%); height: auto; }
:is(.patch-change,.patch-detection-lane) [data-diagram-arrow] { color: #185e54; font-size: 1.35em; }
@media (max-width: 580px) {
  .patch-change { grid-template-columns: minmax(0,1fr); justify-items: center; }
  .patch-change > i { rotate: 90deg; }
  .patch-detection-lane { grid-template-columns: auto minmax(0,1fr); }
  .patch-detection-lane > img { grid-row: 1 / span 4; }
  .patch-detection-lane > i { rotate: 90deg; justify-self: start; }
}
.report-route { grid-template-columns: repeat(2, minmax(0, 1fr) 36px) minmax(0, 1fr); gap: 4px; }
.report-route > div { display: grid; justify-items: center; align-self: stretch; text-align: center; padding: 3px; font-size: .875rem; }
.report-route img { width: min(100%, 124px); }
.report-route > div:last-child b { box-shadow: inset 0 -.46em var(--yellow); }
.report-route > .flow-arrow { justify-self: center; color: var(--ink); }
.report-route span { font-size: .8125rem; }
@media (max-width: 640px) {
  .biometric-scene { grid-template-columns: minmax(0, 1fr); }
  .bio-reader { display: none; }
  .bio-results h3 { display: grid; line-height: 1.35; }
  .defense-branch img, .camera-map img, .report-route img { max-width: 53px; }
  .camera-map { gap: 4px; }
  .report-route { grid-template-columns: repeat(2, minmax(0, 1fr) 20px) minmax(0, 1fr); }
  .report-route > .flow-arrow { scale: .55; }
}
.alert-evidence {
  width: min(100%, 940px);
  margin: 1rem auto;
}
.alert-ticket {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  margin: auto;
  padding: .35rem .85rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff0ac;
}
.alert-ticket img, .alert-check img { width: clamp(38px, 6vw, 82px); height: auto; flex: none; }
.alert-evidence p { margin: 0; }
.alert-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 50%;
  height: 38px;
  margin: auto;
  padding-top: 12px;
  background: linear-gradient(var(--ink), var(--ink)) top center / 3px 13px no-repeat;
}
.alert-branches span {
  position: relative;
  border: 3px solid var(--ink);
  border-width: 3px 0 0 3px;
  border-radius: 10px 0 0;
}
.alert-branches span:last-child { border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.alert-branches span::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: -7px;
  width: 8px;
  height: 8px;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.alert-branches span:last-child::after { left: auto; right: -7px; }
.alert-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.alert-check {
  display: flex;
  align-items: start;
  gap: .5rem;
  padding: .65rem;
  border-bottom: 3px solid var(--teal);
  background: var(--stock);
}
.alert-check h4 { margin: 0 0 .3rem; color: var(--teal); }
.alert-evidence .alert-log {
  margin: .3rem 0;
  padding: .18rem .4rem;
  background: var(--mint);
  border-inline-start: 3px solid var(--teal);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 580px) {
  .alert-branches { display: none; }
  .alert-checks { grid-template-columns: 1fr; margin-top: .8rem; }
}
