/* Noösphere web session. Loaded after style.css and app.css.
   Dark only, quicksilver accent. Nothing here flashes: every change is a slow breath
   (ten seconds) or a short, deliberate fade. 16px gutters; no horizontal scroll at phone width. */

:root {
  --ns-panel: rgba(8, 10, 16, 0.62);
  --ns-field: #07090e;
  --ns-line: rgba(185, 198, 214, 0.16);
  --ns-line-strong: rgba(185, 198, 214, 0.34);
  --ns-danger: #e6867a;
  --ns-warn: #e0bb78;
}

html, body { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body.session-page { min-height: 100vh; }

.session-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 16px 40px;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

/* ---- header tabs ---- */
.app-header { flex-wrap: wrap; gap: 10px 16px; }
.app-header .app-name { text-decoration: none; }
.app-header a.app-name:hover { color: var(--accent-bright); }
.app-header .app-sub { color: var(--dim); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--dim);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 12px;
  cursor: pointer;
  min-height: 36px;
}
.tab:hover { color: var(--accent-bright); }
.tab[aria-selected="true"] { color: var(--accent-bright); border-color: var(--accent-border); background: var(--accent-glow); }
.tab:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* ---- type ---- */
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--eyebrow);
  text-transform: uppercase;
}
.page-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.1;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.page-title em { color: var(--accent); font-style: italic; }
.page-title.small { font-size: clamp(24px, 5vw, 30px); }
.lede { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--hero-sub); max-width: 60ch; }
.hint { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--dim); }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.status { font-family: var(--mono); font-size: 12px; color: var(--accent-dim); }
.opt { font-style: normal; color: var(--dim); font-size: 12px; }
.stamp-line { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent-dim); margin: 14px 0 0; }

/* ---- panels & layout ---- */
.panel {
  background: var(--ns-panel);
  border: 1px solid var(--ns-line);
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
}
.panel + .panel { margin-top: 16px; }
.station-card { background: var(--ns-panel); border: 1px solid var(--ns-line); border-radius: 16px; padding: 20px 18px; margin: 18px 0; }
.danger-zone { border-color: rgba(230, 134, 122, 0.3); }
.panel-inline { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.check-inline { align-self: end; }

.form { display: grid; gap: 16px; margin-top: 18px; }
.inline-form { grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 560px) { .inline-form { grid-template-columns: 1fr 1fr auto; align-items: end; } }

.field-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-group legend {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 10px;
  padding: 0;
}
.field { display: grid; gap: 7px; font-size: 14px; color: var(--card-body); min-width: 0; }
.field > span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); }

input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--ns-field);
  color: var(--text);
  border: 1px solid var(--ns-line);
  border-radius: 10px;
  padding: 11px 12px;
  font: 15px/1.4 var(--serif);
  min-height: 44px;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #5b6476; }
input[type="checkbox"] { width: auto; min-height: 0; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--card-body); margin-top: 14px; }
.check input { margin-top: 3px; }

.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent;
  border: 1px solid var(--ns-line);
  color: var(--dim);
  border-radius: 999px;
  padding: 9px 14px;
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  min-height: 40px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.chip:hover { color: var(--accent-bright); border-color: var(--accent-border); }
.chip[aria-pressed="true"], .chip.is-on {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.btn {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.08em;
  border-radius: 12px;
  padding: 13px 18px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--accent-border);
  background: transparent;
  color: var(--accent-dim);
  transition: color 0.3s, border-color 0.3s, background 0.3s, opacity 0.3s;
}
.btn:hover:not(:disabled) { color: var(--accent-bright); border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { background: var(--accent); color: #07090e; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-bright); border-color: var(--accent-bright); color: #07090e; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(230, 134, 122, 0.45); color: var(--ns-danger); }
.btn.danger:hover:not(:disabled) { border-color: var(--ns-danger); color: #f2b3ab; }
.btn.small { padding: 9px 13px; min-height: 36px; font-size: 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* ---- sky strip ---- */
.sky-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 12px 14px;
  border: 1px solid var(--ns-line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  background: rgba(185, 198, 214, 0.04);
  margin: 0 0 6px;
}
.sky-line { font-family: var(--mono); font-size: 12px; color: var(--accent-bright); line-height: 1.5; }
.sky-note { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; }

/* ---- waiting ---- */
.big-time { font-family: var(--mono); font-size: 56px; font-weight: 300; color: var(--heading); margin: 6px 0 14px; letter-spacing: 0.04em; }

/* ---- run ---- */
.run-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.phase-name { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--heading); }
.phase-blurb { margin: 6px 0 0; font-size: 14px; color: var(--card-body); line-height: 1.5; max-width: 34ch; }
.clock-block { text-align: right; flex-shrink: 0; }
.clock { margin: 0; font-family: var(--mono); font-size: 32px; font-weight: 300; color: var(--heading); font-variant-numeric: tabular-nums; }
.clock-sub { margin: 4px 0 0; font-family: var(--mono); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

.progress { height: 2px; background: var(--ns-line); border-radius: 2px; margin: 18px 0 0; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.4s linear; }

/* The stage: a breathing sphere above three rings, inside a slow pacer ring. */
.stage {
  position: relative;
  height: 300px;
  margin: 10px auto 0;
  max-width: 340px;
  --b: 0.5;
  --halo: 0.1;
  overflow: hidden;
}
.stage .pacer, .stage .orb-wrap, .stage .cosmos { position: absolute; left: 50%; top: 50%; }
.pacer { width: 0; height: 0; }
.pacer-ring, .pacer-fill, .pacer-tick {
  position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%);
}
.pacer-ring { width: 254px; height: 254px; border: 0.5px solid rgba(185, 198, 214, 0.13); }
.pacer-fill {
  width: 252px; height: 252px;
  border: 1.25px solid rgba(185, 198, 214, calc(0.18 + 0.32 * var(--b)));
  transform: translate(-50%, -50%) scale(calc(0.74 + 0.26 * var(--b)));
}

.orb-wrap { width: 300px; height: 260px; transform: translate(-50%, -50%); transition: opacity 2s ease; }
.stage[data-mode="vector"] .orb-wrap { display: none; }
.stage.dim .orb-wrap { opacity: 0.34; }
.halo {
  position: absolute; left: 50%; top: 50%;
  width: 280px; height: 280px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(0.86 + 0.16 * var(--b)));
  background: radial-gradient(circle, rgba(185, 198, 214, 1) 0%, rgba(185, 198, 214, 0) 62%);
  opacity: var(--halo);
  pointer-events: none;
}
.rings { position: absolute; inset: 0; }
.ring {
  position: absolute; left: 50%; top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(185, 198, 214, 0.5);
  transform: translate(-50%, calc(-50% + 64px)) scale(calc(0.92 + var(--k) * var(--b)));
}
.ring.r0 { width: 130px; height: 34px; --k: 0.06; border-width: 0.65px; }
.ring.r1 { width: 174px; height: 48px; --k: 0.10; border-width: 0.65px; }
.ring.r2 { width: 218px; height: 62px; --k: 0.14; border-width: 1px; }
.orb {
  position: absolute; left: 50%; top: 50%;
  width: 128px; height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 50%;
  background: radial-gradient(circle at 27% 20%,
    #d9e3ee 0%, #b9c6d6 22%, #5c708c 58%, #17213a 82%, rgba(185, 198, 214, 0.7) 100%);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(calc(-6px - 8px * var(--b))) scale(calc(0.94 + 0.10 * var(--b)));
  opacity: 0.86;
}
.stage.elevated .orb { opacity: 1; }
.orb::after {
  content: ""; position: absolute; width: 42px; height: 13px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.24); filter: blur(6px); transform: rotate(-34deg);
  left: 20px; top: 24px;
}

/* Cosmic address: five rings and a small central sun. */
.cosmos { display: none; width: 0; height: 0; }
.stage[data-mode="vector"] .cosmos { display: block; }
.cosmos .o {
  position: absolute; left: 50%; top: 50%;
  border-radius: 50%;
  border: 0.6px solid rgba(185, 198, 214, 0.25);
  transform: translate(-50%, -50%);
}
.cosmos .o1 { width: 55px; height: 55px; }
.cosmos .o2 { width: 98px; height: 98px; }
.cosmos .o3 { width: 141px; height: 141px; }
.cosmos .o4 { width: 184px; height: 184px; }
.cosmos .o5 { width: 227px; height: 227px; }
.cosmos .dot {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px rgba(185, 198, 214, 0.35);
}

.narration {
  min-height: 3.2em;
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--accent-bright);
  font-style: italic;
  text-wrap: balance;
}
.ground-box { text-align: center; margin-top: 4px; }
.ground-step { margin: 0; font-size: 15px; color: var(--card-body); line-height: 1.55; }


.controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.controls .btn { flex: 1 1 auto; min-width: 100px; }
.controls .btn.primary { flex: 1.4 1 auto; }

.marks { margin-top: 18px; display: grid; gap: 8px; }
.marks:empty { display: none; }
.mark-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--ns-line); border-radius: 10px; background: var(--ns-field);
}
.mark-row p { margin: 0; }
.mark-row .mono { font-size: 12px; color: var(--card-body); }
.mark-row .accent { color: var(--accent-bright); margin-top: 3px; }
.mark-row .hint { margin-top: 3px; }
.mark-row .btn { flex-shrink: 0; }

/* ---- overlays ---- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(3, 4, 7, 0.78);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
}
.overlay[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 560px;
  background: #0a0c12;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  display: grid; gap: 14px;
  margin: auto 0;
}
.sheet .actions { margin-top: 4px; }
.sheet .promise { border-top: 1px solid var(--ns-line); padding-top: 12px; }
.sheet .promise h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 19px; color: var(--heading); }
.sheet .promise p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--card-body); }
.sheet .lede { margin: 0; }

/* ---- readouts ---- */
.readout { font-family: var(--mono); font-size: 13px; color: var(--accent-bright); margin: 10px 0 0; font-variant-numeric: tabular-nums; }

/* ---- guide ---- */
.cards { display: grid; gap: 14px; margin-top: 18px; }
.card { background: var(--ns-panel); border: 1px solid var(--ns-line); border-radius: 14px; padding: 18px; }
.card h3 { margin: 6px 0 2px; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--heading); }
.card-sub { margin: 0 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.card-body { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--card-body); }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-cat { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.stamp {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; padding: 4px 8px;
  border-radius: 6px; border: 1px solid var(--accent-border); color: var(--accent-dim);
}
.stamp-lore { color: var(--accent-bright); border-color: var(--accent); background: var(--accent-glow); }
.stamp-field { color: var(--dim); }

/* ---- log ---- */
.standing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
@media (min-width: 560px) { .standing { grid-template-columns: repeat(6, 1fr); } }
.stat { background: var(--ns-panel); border: 1px solid var(--ns-line); border-radius: 12px; padding: 14px 10px; text-align: center; }
.stat-num { margin: 0; font-family: var(--mono); font-size: 22px; font-weight: 300; color: var(--heading); font-variant-numeric: tabular-nums; }
.stat-label { margin: 6px 0 0; font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.standing .wide { grid-column: 1 / -1; margin: 0; }
.log-list { display: grid; gap: 8px; }
.log-item {
  display: grid; gap: 4px; text-align: left; cursor: pointer;
  background: var(--ns-panel); border: 1px solid var(--ns-line); border-radius: 12px;
  padding: 14px; color: var(--text); font: inherit; min-height: 44px;
}
.log-item:hover { border-color: var(--accent-border); }
.log-item[aria-expanded="true"] { border-color: var(--accent); }
.log-when { font-family: var(--serif); font-size: 17px; color: var(--heading); }
.log-meta { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }
.report {
  margin: 14px 0 0;
  padding: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  font: 13px/1.6 var(--mono);
  color: var(--card-body);
  background: var(--ns-field);
  border: 1px solid var(--ns-line);
  border-radius: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

/* ---- station ---- */
.designation {
  margin: 0; font-family: var(--mono); font-size: 30px; letter-spacing: 0.12em; color: var(--accent-bright);
}

/* ---- footer tweaks ---- */
.app-footer .footer-legal p { max-width: 70ch; }

/* ---- phone width ---- */
@media (max-width: 480px) {
  .run-head { flex-direction: column; }
  .clock-block { text-align: left; }
  .phase-name { font-size: 30px; }
  .clock { font-size: 28px; }
  .panel { padding: 18px 14px; }
  .controls .btn { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .progress span { transition: none; }
  .orb-wrap { transition: none; }
}

/* Phones get the app; the browser session is for computers. */
.phone-gate { display: none; }
.is-phone .phone-gate { display: block; }
.is-phone .session-app, .is-phone .tabs { display: none; }
.gate-badge { display: inline-flex; }
