/* CCTV and access control. Only the two security service pages load this file. */
.security-page {
  --sg-night: #111c21;
  --sg-slate: #32434a;
  --sg-rule: #cfd8d8;
  --sg-accent: #c6ee96;
}
.security-page :where(section,article,div)[id] { scroll-margin-top: 98px; }
.security-page :is(.sg-event,.sg-equipment,.sg-setup) { padding-block: clamp(42px, 5.6vw, 86px); }
.security-page :is(.sg-event,.sg-equipment,.sg-setup) h2 {
  margin: 0; font-size: clamp(31px, 3.5vw, 52px); line-height: 1.08; text-wrap: balance;
}
.sg-hero { isolation: isolate; position: relative; background: var(--sg-night); }
.sg-hero-grid { display: grid; align-items: center; grid-template-columns: 1fr 1fr; }
.sg-hero-copy { z-index: 1; padding: clamp(42px, 5.4vw, 84px) clamp(22px, 3vw, 48px) clamp(42px, 5.4vw, 84px) 0; }
.security-page .sg-kicker { margin: 0 0 12px; color: #3c5951; font-size: 14px; font-weight: 600; line-height: 1.4; }
.security-page .sg-hero .sg-kicker { color: var(--sg-accent); }
.security-page .sg-hero h1 {
  max-width: 15ch; margin: 0; color: #fff; font-size: clamp(42px, 4.8vw, 74px); line-height: 1.04; text-wrap: balance;
}
html[lang^="zh"] .security-page .sg-hero h1 { max-width: 12em; line-height: 1.13; }
.security-page .sg-lead { max-width: 55ch; margin: 15px 0 0; color: var(--sg-slate); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; }
.security-page .sg-hero .sg-lead { color: #e0e7e7; }
.sg-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 17px; margin-top: 20px; }
.sg-example-links { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.sg-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; font-size: 16px; line-height: 1.35; font-weight: 550; }
.sg-actions .sg-primary { padding: 9px 19px; border-radius: 999px; color: #14291c; background: var(--sg-accent); text-decoration: none; }
.sg-actions .sg-primary:hover { color: #14291c; background: #e3facb; }
.sg-actions .sg-link { color: white; text-decoration: underline; text-underline-offset: 5px; }
.sg-actions .sg-link:hover { color: var(--sg-accent); }
.sg-hero-photo {
  position: absolute; z-index: -1; inset: 0 0 0 48%; overflow: hidden; margin: 0;
}
.sg-hero-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 5%;
  mask-image: linear-gradient(to right, transparent, #000 20%);
}
.sg-hero-photo figcaption {
  position: absolute; right: 12px; bottom: 10px; padding: 3px 8px; border-radius: 4px;
  color: #fff; background: rgb(15 26 27 / 82%); font-size: 12px; line-height: 1.4;
}
.sg-event-grid, .sg-setup-grid {
  display: grid; grid-template-columns: minmax(0,.77fr) minmax(0,1.23fr); align-items: start; gap: clamp(28px, 6.2vw, 88px);
}
.security-page .sg-console { position: relative; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--sg-rule); border-radius: 14px; background: #f5f7f6; }
.sg-console .sg-view, .sg-console .sg-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; white-space: nowrap; clip-path: inset(50%);
}
.sg-tabs {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; padding: 4px; border-bottom: 1px solid var(--sg-rule);
  border-radius: 14px 14px 0 0; background: #e6ecea;
}
.sg-tabs label {
  display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 7px 8px; border-radius: 9px;
  color: #344942; font-size: 15px; font-weight: 550; text-align: center; line-height: 1.25; text-wrap: balance; cursor: pointer;
}
.sg-tabs label:hover { background: #d4dfd8; }
#view-entry:checked ~ .sg-tabs label[for="view-entry"],
#view-video:checked ~ .sg-tabs label[for="view-video"],
#view-alert:checked ~ .sg-tabs label[for="view-alert"],
#pos-filter-void:checked ~ .sg-tabs label[for="pos-filter-void"],
#pos-filter-drawer:checked ~ .sg-tabs label[for="pos-filter-drawer"],
#pos-filter-sale:checked ~ .sg-tabs label[for="pos-filter-sale"] { background: #273e36; color: #fff; }
.security-page a:focus-visible,
#view-entry:focus-visible ~ .sg-tabs label[for="view-entry"],
#view-video:focus-visible ~ .sg-tabs label[for="view-video"],
#view-alert:focus-visible ~ .sg-tabs label[for="view-alert"],
#pos-filter-void:focus-visible ~ .sg-tabs label[for="pos-filter-void"],
#pos-filter-drawer:focus-visible ~ .sg-tabs label[for="pos-filter-drawer"],
#pos-filter-sale:focus-visible ~ .sg-tabs label[for="pos-filter-sale"] { outline: 3px solid #266c42; outline-offset: 2px; }
.sg-actions a:focus-visible { outline-color: white; }
.sg-panel { display: none; padding: clamp(20px, 2.7vw, 38px); }
#view-entry:checked ~ .sg-panels #event-entry,
#view-video:checked ~ .sg-panels #event-video,
#view-alert:checked ~ .sg-panels #event-alert,
#pos-filter-void:checked ~ .sg-panels #pos-result-void,
#pos-filter-drawer:checked ~ .sg-panels #pos-result-drawer,
#pos-filter-sale:checked ~ .sg-panels #pos-result-sale { display: block; }
.security-page .sg-caption { margin: 0 0 6px; color: #40634e; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.security-page .sg-panel h3 { margin: 0; font-size: clamp(23px, 2.25vw, 33px); line-height: 1.16; text-wrap: balance; }
.sg-record { margin: 20px 0 0; }
.sg-record div { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--sg-rule); }
.sg-record dt { color: var(--sg-slate); font-size: 15px; line-height: 1.45; }
.sg-record dd { margin: 0; color: #162c23; font-size: 16px; font-weight: 550; line-height: 1.45; }
.security-page .sg-note { margin: 12px 0 0; color: var(--sg-slate); font-size: 15px; line-height: 1.5; }
.sg-pos { background: #f5f3ed; }
.sg-pos .sg-event-grid { row-gap: 18px; }
.sg-pos .sg-console { background: #fff; }
.sg-pos .sg-tabs { background: #eceae1; }
.sg-pos-setup p { margin: 0; color: var(--sg-slate); font-size: 15px; line-height: 1.55; }
.sg-pos-setup a {
  display: inline-flex; align-items: center; min-height: 44px; color: #24553d; font-weight: 550; text-decoration: underline; text-underline-offset: 4px;
}
.sg-equipment { background: #f0f3f1; }
.sg-details { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(20px,3.8vw,54px); margin-top: 28px; }
.sg-details article { padding-top: 14px; border-top: 2px solid #688179; }
.security-page .sg-details h3 { margin: 0; font-size: clamp(22px,2vw,28px); line-height: 1.25; text-wrap: balance; }
.security-page .sg-details p, .sg-setup-list dd { margin: 8px 0 0; color: var(--sg-slate); font-size: 16px; line-height: 1.55; }
.sg-setup-list { margin: 0; }
.sg-setup-list div { padding: 16px 0 18px; border-top: 1px solid var(--sg-rule); }
.sg-setup-list div:first-child { padding-top: 12px; border-color: #768780; }
.sg-setup-list div:last-child { padding-bottom: 0; }
.sg-setup-list dt { color: var(--v-ink); font-size: clamp(20px,1.7vw,26px); font-weight: 500; line-height: 1.25; }

@media (min-width: 821px) {
  .sg-pos-intro { grid-row: span 2; }
  .sg-pos-intro::after {
    content: ""; display: block; width: 100%; max-width: 450px; aspect-ratio: 2.25; margin-top: 24px; border-radius: 10px;
    background: #dcd8d2 url("img/pos/till.webp") center 48% / cover no-repeat;
  }
  .sg-pos-setup { grid-column: 2; }
}
@media (max-width: 820px) {
  .sg-event-grid, .sg-setup-grid { grid-template-columns: 1fr; gap: 21px; }
}
@media (max-width: 700px) {
  .security-page .sg-hero-grid { display: block; }
  .sg-hero-copy { padding: 22px 0 0; }
  .security-page .sg-hero .sg-kicker { margin-bottom: 7px; }
  .security-page .sg-hero h1 { font-size: clamp(35px, 7.9vw, 48px); }
  .security-page .sg-lead { margin-top: 10px; font-size: 16px; }
  .sg-actions { gap: 2px 11px; margin-top: 13px; }
  .sg-example-links { gap: 0 12px; }
  .sg-actions a { font-size: 15px; }
  .sg-actions .sg-primary { padding-inline: 13px; }
  .sg-hero-photo {
    display: block; position: relative; z-index: auto; inset: auto; aspect-ratio: 1.78; margin-top: 15px; border-radius: 8px;
  }
  .sg-hero-photo img { mask-image: none; }
  .sg-hero-photo figcaption { right: 7px; bottom: 6px; }
  .security-page .sg-hero { padding-bottom: 17px; }
  .security-page :is(.sg-event,.sg-equipment,.sg-setup) { padding-block: 36px; }
  .sg-tabs label { padding-inline: 4px; font-size: 14px; }
  .sg-details { grid-template-columns: 1fr; gap: 18px; margin-top: 19px; }
}
@media (max-width: 380px) {
  .sg-panel { padding: 16px; }
  .sg-record div { grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); gap: 9px; }
}
@media (forced-colors: active) {
  #view-entry:checked ~ .sg-tabs label[for="view-entry"],
  #view-video:checked ~ .sg-tabs label[for="view-video"],
  #view-alert:checked ~ .sg-tabs label[for="view-alert"],
  #pos-filter-void:checked ~ .sg-tabs label[for="pos-filter-void"],
  #pos-filter-drawer:checked ~ .sg-tabs label[for="pos-filter-drawer"],
  #pos-filter-sale:checked ~ .sg-tabs label[for="pos-filter-sale"] { outline: 2px solid SelectedItem; outline-offset: -3px; }
}
