/* Satya instruments on /insights/star-gate-remote-viewing-models/. Loaded before site.css and
   written with the site's tokens (--bg, --fg, --accent, --shadow-1, --radius, --mono and the rest),
   so the panels read as the site's own cards. Every class starts with "sat-" so nothing here can
   change another page. Marigold marks only what to notice: the sidereal window, a target match and
   the "inside" status. No inline styles: satya.js sets --v through the CSSOM. */

/* The three figures sit above the article, the instruments between its prose blocks. */
.sat-figures {
  margin-top: clamp(8px, 2vw, 24px);
}

.sat-article .prose {
  padding-top: clamp(28px, 4vw, 48px);
}

.sat-article .prose > h2:first-child,
.sat-article .prose > h3:first-child {
  margin-top: 0;
}

/* Formulas: one row per line, the formula on the left and what it means on the right, so nothing
   depends on the width of symbols the mono subset lacks. Rows stack on a phone. */
.sat-formula {
  padding: 14px 22px;
  border-radius: var(--radius-md);
  background: var(--bg);
  box-shadow: var(--shadow-1);
}

.prose .sat-formula p {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2px 20px;
  align-items: baseline;
  margin: 0;
  padding: 7px 0;
  font-size: 15.5px;
  line-height: 1.45;
}

.prose .sat-formula code {
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .prose .sat-formula p {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Panels ---------- */

.sat-panel {
  margin-top: clamp(28px, 4vw, 40px);
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-2);
}

.sat-panel + .sat-panel {
  margin-top: 16px;
}

.sat-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.sat-wide {
  grid-column: 1 / -1;
}

.sat-controls,
.sat-readout {
  min-width: 0;
}

.sat-controls .field {
  margin-bottom: 16px;
}

.sat-controls .form__row {
  gap: 16px;
}

/* Two classes beat site.css's .field textarea, which loads after this file. */
.field textarea.sat-mono {
  font-family: var(--mono);
  font-size: 14px;
}

.sat-group,
.sat-stat dt,
.sat-refs dt,
.sat-table th,
.sat-range label,
.sat-legend {
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.sat-group {
  margin: 0 0 10px;
}

.sat-group:not(:first-child) {
  margin-top: 6px;
}

.sat-note,
.sat-zone {
  margin: 14px 0 0;
  font-size: 15.5px;
}

.sat-next {
  margin: 20px 0 0;
  font-size: 17.5px;
}

.sat-linkish {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* Range inputs keep the browser's track, in onyx. */
.sat-range {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.sat-range input {
  width: 100%;
  margin: 0;
  accent-color: var(--fg);
}

.sat-range output {
  margin-left: 6px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ---------- Readouts ---------- */

.sat-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 0;
}

.sat-stats--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sat-controls .sat-stats {
  margin-top: 24px;
}

.sat-stat {
  min-width: 0;
}

.sat-stat--wide {
  grid-column: 1 / -1;
}

.sat-stat dd {
  margin: 6px 0 0;
  color: var(--fg);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
  font-weight: 700;
  line-height: 1.12;
  font-variant-numeric: lining-nums tabular-nums;
  overflow-wrap: anywhere;
}

.sat-stat dd small {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
}

.sat-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sat-status[data-on="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* The sidereal dial: 0 h at the top, clockwise; the window is the one marigold mark. */
.sat-readout--dial {
  display: grid;
  grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
}

.sat-readout--dial .sat-stat dd {
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  white-space: nowrap;
  overflow-wrap: normal;
}

.sat-readout--dial .sat-stat dd small {
  white-space: normal;
}

.sat-dial {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
}

.sat-dial__face {
  fill: var(--bg);
  stroke: var(--fg);
  stroke-width: 1.5;
}

.sat-dial__tick {
  stroke: var(--fg);
  stroke-width: 1;
}

.sat-dial__tick--major {
  stroke-width: 2;
}

.sat-dial__window {
  fill: none;
  stroke: var(--accent);
  stroke-width: 14;
}

.sat-dial__hand {
  stroke: var(--fg);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.sat-dial__hub {
  fill: var(--fg);
}

.sat-dial__num {
  fill: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

/* The next seven windows: space between rows, never ruled lines. */
.sat-table {
  width: 100%;
  max-width: 34em;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sat-table th {
  padding: 16px 12px 8px 0;
  text-align: left;
}

.sat-table td {
  padding: 6px 12px 6px 0;
  font-size: 16.5px;
}

.sat-table td:not(:first-child) {
  font-family: var(--mono);
  font-size: 14px;
}

/* Transcript marks: overlay struck through, sensory words underlined, target hits in marigold. */
.sat-marked {
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--fg);
  font-size: 17px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sat-marked mark,
.sat-legend mark {
  padding: 1px 2px;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sat-m-aol {
  text-decoration: line-through 1.5px;
}

.sat-m-signal {
  text-decoration: underline 1.5px;
  text-underline-offset: 4px;
}

.sat-marked .sat-m-target,
.sat-legend .sat-m-target {
  background: var(--accent);
  color: var(--on-accent);
}

.sat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 22px;
  font-size: 11px;
}

.sat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.sat-chips li {
  padding: 3px 11px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12.5px;
}

.sat-chips--aol li {
  text-decoration: line-through;
}

.sat-chips:empty::after {
  content: "None";
  font-size: 16px;
}

.sat-readout > .sat-stats {
  margin-bottom: 22px;
}

/* Pictures: two canvases, the picture in grey and one onyx dot per tile sized by its entropy. */
.sat-files {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.sat-file {
  cursor: pointer;
}

.sat-file:focus-within {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

.sat-canvases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sat-canvas {
  margin: 0;
}

.sat-canvas canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--fg);
  background: var(--bg);
}

.sat-canvas figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* A meter: one onyx bar on an outlined track; satya.js sets --v from 0 to 1. */
.sat-meter {
  --v: 0;
  position: relative;
  height: 14px;
  margin: 4px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--fg);
}

.sat-meter__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--fg);
  transform: scaleX(var(--v));
  transform-origin: left center;
  transition: transform 300ms var(--ease-out);
}

.sat-meter__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
}

.sat-refs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 26px 0 0;
}

.sat-refs div {
  min-width: 0;
}

.sat-refs dt {
  font-size: 11px;
}

.sat-refs dd {
  margin: 4px 0 0;
  font-size: 16px;
}

@media (max-width: 900px) {
  .sat-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .sat-readout--dial {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .sat-readout--dial .sat-stats {
    width: 100%;
  }

  .sat-stats--3,
  .sat-canvases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sat-refs {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sat-meter__fill {
    transition: none;
  }
}
