/*
TT-OS Static Frame Layout Lock v001

Purpose:
Locks page sections, cards and dropped information blocks so incoming text,
logs, fragments or records do not distort the surrounding public website frame.

Rule:
The frame is static. Information may scroll inside bounded cells, but must not
stretch the page architecture or disturb adjacent components.
*/

:root {
  --ttos-static-card-height: 280px;
  --ttos-static-card-min-width: 240px;
  --ttos-static-card-gap: 1.5rem;
  --ttos-static-border: #a3e635;
  --ttos-static-surface: #234533;
  --ttos-static-muted: rgba(255, 255, 255, 0.85);
}

/* Universal bounded grid for page families that accept variable content. */
.static-grid,
.ttos-static-grid,
.ttos-layout-lock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--ttos-static-card-min-width), 1fr));
  gap: var(--ttos-static-card-gap);
  align-items: start;
  margin-top: 1.5rem;
}

/* Static card. Long content scrolls inside the cell instead of changing layout. */
.locked-card,
.ttos-locked-card,
.ttos-static-card,
.ttos-layout-lock-card {
  background-color: var(--color-surface-dark, var(--ttos-static-surface));
  border-left: 4px solid var(--color-accent-lime, var(--ttos-static-border));
  padding: 1.5rem;
  height: var(--ttos-static-card-height);
  max-height: var(--ttos-static-card-height);
  min-height: var(--ttos-static-card-height);
  overflow-y: auto;
  overflow-x: hidden;
  align-self: start;
  contain: content;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Static data cells for logs, fragments, snippets and injected records. */
.ttos-drop-cell,
.ttos-log-cell,
.ttos-fragment-cell,
.ttos-record-cell {
  max-height: var(--ttos-static-card-height);
  overflow-y: auto;
  overflow-x: hidden;
  contain: content;
  overflow-wrap: anywhere;
}

/* Prevent oversized media or pasted embeds from breaking the frame. */
.locked-card img,
.ttos-locked-card img,
.ttos-static-card img,
.ttos-layout-lock-card img,
.ttos-drop-cell img,
.ttos-log-cell img,
.ttos-fragment-cell img,
.ttos-record-cell img {
  max-width: 100%;
  height: auto;
}

/* Prevent long links, hashes and pasted IDs from widening cards. */
.locked-card a,
.ttos-locked-card a,
.ttos-static-card a,
.ttos-layout-lock-card a,
.ttos-drop-cell a,
.ttos-log-cell a,
.ttos-fragment-cell a,
.ttos-record-cell a {
  overflow-wrap: anywhere;
}

/* Keep headings readable inside locked cards. */
.locked-card h3,
.ttos-locked-card h3,
.ttos-static-card h3,
.ttos-layout-lock-card h3 {
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.locked-card p,
.ttos-locked-card p,
.ttos-static-card p,
.ttos-layout-lock-card p {
  color: var(--color-text-muted, var(--ttos-static-muted));
  font-size: 0.95rem;
}

/* Dark green scrollbar styling for bounded content. */
.locked-card::-webkit-scrollbar,
.ttos-locked-card::-webkit-scrollbar,
.ttos-static-card::-webkit-scrollbar,
.ttos-layout-lock-card::-webkit-scrollbar,
.ttos-drop-cell::-webkit-scrollbar,
.ttos-log-cell::-webkit-scrollbar,
.ttos-fragment-cell::-webkit-scrollbar,
.ttos-record-cell::-webkit-scrollbar {
  width: 6px;
}

.locked-card::-webkit-scrollbar-thumb,
.ttos-locked-card::-webkit-scrollbar-thumb,
.ttos-static-card::-webkit-scrollbar-thumb,
.ttos-layout-lock-card::-webkit-scrollbar-thumb,
.ttos-drop-cell::-webkit-scrollbar-thumb,
.ttos-log-cell::-webkit-scrollbar-thumb,
.ttos-fragment-cell::-webkit-scrollbar-thumb,
.ttos-record-cell::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

/* Optional fixed-height page modules. */
.ttos-static-module {
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  contain: content;
}

/* Safety: preserve shell and nav. This asset must not replace the master shell. */
.ttos-static-frame-note {
  display: none;
}
