/* ===========================================================================
   Tessen — security page only
   ---------------------------------------------------------------------------
   This sheet loads after assets/css/tessen.css and every rule in it is scoped
   to .page-security. Nothing here redeclares a shared component class at the
   same specificity, so the responsive rules in the shared sheet keep winning
   on every other page. Colours come from the --sf-* surface set, so each block
   follows whichever tone its section declares.

   New stems on this page: crest (page header), ctl (control rows), cipher
   (encryption schematic), region (residency), attest (report slots). None of
   them collide with a stem already in use.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. Crest — the reduced hero
   The home page hero carries a four-figure panel. A subpage does not: it gets
   the title, one paragraph, and the sections listed so a reader can jump.
   --------------------------------------------------------------------------- */
.page-security .ts-crest {
  padding-top: 124px;
  padding-bottom: var(--ts-space-sm);
}

.page-security .ts-crest__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px var(--ts-gutter);
  align-items: end;
}

.page-security .ts-crest__stated {
  display: grid;
  gap: 24px;
  align-content: start;
}

.page-security .ts-crest__jump {
  display: grid;
  border-top: 1px solid var(--sf-line);
}
.page-security .ts-crest__jump a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding-block: 8px;
  border-bottom: 1px solid var(--sf-line);
  font-size: var(--ts-fs-3);
  text-decoration: none;
  color: var(--sf-muted);
  transition: color var(--ts-dur-micro) var(--ts-ease);
}
.page-security .ts-crest__jump a:hover { color: var(--sf-fg); }
.page-security .ts-crest__jump a span {
  font-family: var(--ts-font-mono);
  font-size: var(--ts-fs-1);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--sf-accent);
}

/* ---------------------------------------------------------------------------
   2. Control rows
   The home page states each layer in a sentence. Here the same row carries
   three ruled cells underneath it — scope, record, response — because the
   third one is the part a buyer is actually checking for. The hover behaviour
   is the one already established in the security section: a thumbnail pins in
   at the right edge and a rule reaches across to meet it.
   --------------------------------------------------------------------------- */
.page-security .ts-ctl {
  display: grid;
  counter-reset: ts-ctl;
}

.page-security .ts-ctlrow {
  position: relative;
  counter-increment: ts-ctl;
  display: grid;
  gap: 14px;
  padding-block: 28px 30px;
  border-bottom: 1px solid var(--sf-line);
}
.page-security .ts-ctlrow:first-child { border-top: 1px solid var(--sf-line); }

.page-security .ts-ctlrow__head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}
.page-security .ts-ctlrow__head::before {
  content: counter(ts-ctl, decimal-leading-zero);
  font-family: var(--ts-font-mono);
  font-size: var(--ts-fs-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--sf-muted);
}

.page-security .ts-ctl__name {
  font-family: var(--ts-font-display);
  font-size: clamp(var(--ts-fs-4), 1.8vw, var(--ts-fs-5));
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: color var(--ts-dur-micro) var(--ts-ease);
}
.page-security .ts-ctlrow:hover .ts-ctl__name { color: var(--sf-accent); }

.page-security .ts-ctl__say {
  font-size: var(--ts-fs-3);
  line-height: 1.65;
  color: var(--sf-muted);
  max-width: 62ch;
  text-wrap: pretty;
}

/* the three cells share one hairline grid, the way the figure panels do */
.page-security .ts-ctl__facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--sf-line);
  border: 1px solid var(--sf-line);
}
.page-security .ts-ctl__fact {
  background: var(--sf-bg);
  padding: 14px 16px 16px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.page-security .ts-ctl__fact dt {
  font-family: var(--ts-font-mono);
  font-size: var(--ts-fs-1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sf-accent);
}
.page-security .ts-ctl__fact dd {
  font-size: var(--ts-fs-2);
  line-height: 1.6;
  color: var(--sf-muted);
}

.page-security .ts-ctl__pin {
  position: absolute;
  right: 0;
  top: 24px;
  width: 168px;
  height: 112px;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.5s var(--ts-ease);
  pointer-events: none;
  z-index: 2;
}
.page-security .ts-ctl__pin img { width: 100%; height: 100%; object-fit: cover; }
.page-security .ts-ctlrow:hover .ts-ctl__pin,
.page-security .ts-ctlrow:focus-within .ts-ctl__pin { clip-path: inset(0 0 0 0); }

.page-security .ts-ctl__wire {
  position: absolute;
  right: 168px;
  top: 80px;
  height: 1px;
  width: 0;
  background: var(--sf-accent);
  transition: width 0.5s var(--ts-ease) 0.08s;
  pointer-events: none;
}
.page-security .ts-ctlrow:hover .ts-ctl__wire,
.page-security .ts-ctlrow:focus-within .ts-ctl__wire { width: 84px; }

/* ---------------------------------------------------------------------------
   3. Cipher — the encryption schematic
   The diagram is the argument here, so it holds its own width and scrolls
   inside its container on a narrow screen rather than shrinking its labels
   into illegibility. The table beside it repeats the same facts in words.
   --------------------------------------------------------------------------- */
.page-security .ts-cipher {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.page-security .ts-cipher__scroll { overflow-x: auto; }

.page-security .ts-cipherboard {
  margin: 0;
  border: 1px solid var(--sf-line);
  background: var(--sf-panel);
  padding: 24px 22px 22px;
  display: grid;
  gap: 16px;
}
.page-security .ts-cipherboard__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sf-line);
}

.page-security .ts-cipher__canvas { width: 100%; height: auto; display: block; }
.page-security .ts-cipher__canvas text {
  font-family: var(--ts-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  fill: var(--sf-muted);
}
.page-security .ts-cipher__sub { font-size: 10px; fill: var(--sf-muted); opacity: 0.72; }
.page-security .ts-cipher__key { fill: var(--sf-accent); }

.page-security .ts-cipher__band { fill: none; stroke: var(--sf-line); stroke-width: 1; }
.page-security .ts-cipher__record { stroke: var(--sf-fg); stroke-width: 1.5; opacity: 0.6; }
.page-security .ts-cipher__edge { stroke: var(--sf-accent); stroke-width: 1.5; stroke-dasharray: 4 4; }
.page-security .ts-cipher__tick { stroke: var(--sf-line); stroke-width: 1.5; }
.page-security .ts-cipher__spine { stroke: var(--sf-line); stroke-width: 1; }
.page-security .ts-cipher__link { stroke: var(--sf-accent); stroke-width: 1.5; }
.page-security .ts-cipher__node { fill: var(--sf-accent); }
.page-security .ts-cipher__cycle { fill: none; stroke: var(--sf-line); stroke-width: 1; }

/* the shared table reserves 30% for its first column, which suits a capability
   list. This one holds a single word per row, so it gives the width back. */
.page-security #encryption .ts-plan thead th:first-child { width: 17%; }

.page-security .ts-cipher__meter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--sf-line);
  font-family: var(--ts-font-mono);
  font-size: var(--ts-fs-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-muted);
}

/* ---------------------------------------------------------------------------
   4. Region — residency
   --------------------------------------------------------------------------- */
.page-security .ts-region { display: grid; gap: 40px; }
.page-security .ts-region__notes { display: grid; gap: 28px; }
.page-security .ts-region__note {
  padding-top: 26px;
  border-top: 1px solid var(--sf-line);
}
.page-security .ts-region__note p {
  font-size: var(--ts-fs-3);
  line-height: 1.68;
  color: var(--sf-muted);
  max-width: 62ch;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------------------
   5. Attest — report slots
   These carry no report, so the accent is spent on the hover rule rather than
   on anything that could read as a status. Nothing is hidden behind the hover:
   every field is on the card before a pointer arrives.
   --------------------------------------------------------------------------- */
.page-security .ts-attestboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.page-security .ts-attest {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--sf-line);
  background: var(--sf-bg);
  padding: 22px 20px 24px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.page-security .ts-attest__wire {
  position: absolute;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: var(--sf-accent);
  transition: width 0.5s var(--ts-ease);
}
.page-security .ts-attest:hover .ts-attest__wire,
.page-security .ts-attest:focus-within .ts-attest__wire { width: 100%; }

.page-security .ts-attest__ref {
  font-family: var(--ts-font-mono);
  font-size: var(--ts-fs-1);
  letter-spacing: 0.06em;
  color: var(--sf-muted);
  transition: color var(--ts-dur-micro) var(--ts-ease);
}
.page-security .ts-attest:hover .ts-attest__ref { color: var(--sf-accent); }

.page-security .ts-attest__name {
  font-family: var(--ts-font-display);
  font-size: var(--ts-fs-4);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.page-security .ts-attest__scope {
  font-size: var(--ts-fs-2);
  line-height: 1.55;
  color: var(--sf-muted);
}

.page-security .ts-attest__meta {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--sf-line);
}
.page-security .ts-attest__meta > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}
.page-security .ts-attest__meta dt {
  font-family: var(--ts-font-mono);
  font-size: var(--ts-fs-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-muted);
}
.page-security .ts-attest__meta dd {
  font-size: var(--ts-fs-2);
  line-height: 1.5;
  color: var(--sf-muted);
}
/* the empty-slot line is the honest one, so it reads at full contrast */
.page-security .ts-attest__meta dd.is-slot { color: var(--sf-fg); }

/* the shared call block sits in the last cell of this grid, where it stretches
   to the height of a slot card. A title and an arrow leave that box hollow, so
   it carries one line of its own. Colour is inherited, because the block
   inverts to the accent on hover. */
.page-security .ts-railcall__say {
  font-size: var(--ts-fs-2);
  line-height: 1.55;
  color: inherit;
  opacity: 0.7;
}

/* ---------------------------------------------------------------------------
   6. Footer note
   The shared footer carries this paragraph with an inline style on the home
   page. Here it is a class instead, scoped so the home page is untouched.
   --------------------------------------------------------------------------- */
.page-security .ts-foot__blurb { margin-top: 16px; max-width: 34ch; }

/* ===========================================================================
   Responsive — same breakpoints the shared sheet uses, restated rather than
   overridden from outside, so nothing here reaches into a shared media query.
   =========================================================================== */
@media (min-width: 700px) {
  /* the number column and the body align on one edge from tablet up */
  .page-security .ts-ctl__say,
  .page-security .ts-ctl__facts { margin-left: 62px; }
  .page-security .ts-ctl__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .page-security .ts-attestboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .page-security .ts-crest { padding-top: 190px; }
  .page-security .ts-crest__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 64px 56px;
  }

  /* the pin sits in the right margin, so the cells stop short of it */
  .page-security .ts-ctl__facts { margin-right: 200px; }

  /* the schematic needs enough width to keep its labels above 11px, but the
     table needs more than half or every cell breaks into three lines */
  .page-security .ts-cipher { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
  .page-security .ts-region { gap: 48px; }
  .page-security .ts-region__notes { gap: 32px; }

  .page-security .ts-attestboard { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 999px) {
  /* nothing holds the pin on a narrow screen; the cells already say it */
  .page-security .ts-ctl__pin,
  .page-security .ts-ctl__wire { display: none; }
}

@media (max-width: 699px) {
  .page-security .ts-crest { padding-top: 112px; }
  /* the schematic keeps its width and scrolls in its own box; the page does
     not. Below this size its labels would render under seven pixels. */
  .page-security .ts-cipher__canvas { min-width: 480px; }
  .page-security .ts-cipherboard { padding: 18px 16px 16px; }
  .page-security .ts-ctlrow { padding-block: 24px 26px; }
}

/* ===========================================================================
   Reduced motion — the shared sheet resolves its own components; these are
   this page's, so they resolve here.
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .page-security .ts-ctl__pin { clip-path: inset(0 0 0 0); }
}
