:root {
  color-scheme: dark;
  --bg: #0b1a2b;
  --surface: #112236;
  --surface-2: #172c43;
  --border: rgba(237, 234, 224, 0.14);
  --text: #edeae0;
  --muted: #b9b6ac;
  --soft: #8f9189;
  --accent: #7fa98c;
  --accent-2: #1f4d3a;
  --steel: #9fb6c7;
  --danger: #d18a76;
  --success: #a9c7a7;
  --radius-card: 8px;
  --radius-button: 8px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(237, 234, 224, 0.04), transparent 280px),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.04), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: soft-light;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(11, 26, 43, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--accent-2);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
}

.brand-name,
.product-name {
  white-space: nowrap;
}

.brand-name {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.product-name {
  border-left: 1px solid var(--border);
  padding-left: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.8vw, 34px);
  color: var(--muted);
  font-size: 0.88rem;
}

.main-nav a {
  transition: color 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  outline: none;
}

.nav-toggle {
  display: none;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
}

main {
  position: relative;
  z-index: 1;
  padding: 0 clamp(20px, 5vw, 72px) 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: clamp(56px, 9vh, 96px) 0 48px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12em;
  margin-bottom: 24px;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 6.3rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-body {
  max-width: 38rem;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  background: var(--accent);
  color: #08150f;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #95bd9f;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1d3854;
}

.text-link {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 160ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
  outline: none;
}

.capsule-preview,
.timeline-panel,
.steps article,
.opened-card,
.contribute-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.capsule-preview {
  padding: clamp(24px, 3vw, 36px);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  color: var(--steel);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill {
  border: 1px solid rgba(174, 191, 154, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--success);
  letter-spacing: 0.06em;
}

.capsule-preview h2 {
  margin-bottom: 24px;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 400;
  line-height: 1.12;
  overflow-wrap: break-word;
}

.record-list {
  display: grid;
  gap: 1px;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--border);
}

.record-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface-2);
}

.record-list dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.record-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 650;
}

.preview-note {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.preview-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1rem;
}

.preview-note p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.timeline-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.44fr) 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 64px;
  padding: 24px;
  background: var(--surface-2);
}

.timeline-panel h2,
.section-intro h2,
.split-section h2 {
  margin-bottom: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.18;
}

.timeline-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-controls button,
.custom-date {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface);
  color: var(--muted);
  padding: 0 14px;
  font-size: 0.86rem;
}

.timeline-controls button {
  cursor: pointer;
}

.timeline-controls button:hover,
.timeline-controls button:focus-visible,
.timeline-controls button.is-active {
  border-color: rgba(230, 221, 204, 0.34);
  color: var(--text);
  outline: none;
}

.capsule-preview.is-updating {
  animation: previewUpdate 420ms ease;
}

.custom-date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.custom-date input {
  width: 132px;
  border: 0;
  background: transparent;
  color: var(--text);
  color-scheme: dark;
}

.content-grid,
.split-section {
  margin-top: 56px;
}

.section-intro {
  max-width: 620px;
  margin-bottom: 24px;
}

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

.steps article {
  padding: 22px;
}

.steps span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 800;
}

.steps h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1rem;
}

.steps p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.type-list span {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
  color: var(--text);
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}

.opened-card,
.contribute-card {
  padding: 24px;
}

.opened-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.82rem;
}

blockquote {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.2;
}

.contribute-card {
  display: grid;
  gap: 20px;
  align-content: start;
}

.contribute-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.page-heading {
  max-width: 820px;
  padding: 56px 0 32px;
}

.page-heading h1 {
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.page-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.notice {
  margin: 24px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  color: var(--muted);
  line-height: 1.55;
}

.notice code {
  color: var(--text);
}

.notice.warning {
  border-color: rgba(230, 221, 204, 0.22);
}

.notice.error,
.form-state.error {
  border-color: rgba(209, 138, 118, 0.4);
  color: var(--danger);
}

.form-card {
  display: grid;
  gap: 24px;
  max-width: 980px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.form-card.compact {
  max-width: 480px;
}

fieldset {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--text);
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 12px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(230, 221, 204, 0.38);
}

textarea {
  resize: vertical;
}

.choice-grid,
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.choice-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--text);
}

.choice-grid input {
  width: auto;
}

.preset-grid button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.preset-grid button:hover,
.preset-grid button:focus-visible,
.preset-grid button.is-active {
  border-color: rgba(230, 221, 204, 0.34);
  color: var(--text);
  outline: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-state {
  min-height: 24px;
  color: var(--muted);
}

.form-state.success {
  color: var(--success);
}

.form-state.loading,
.loading {
  color: var(--steel);
}

.dashboard {
  display: grid;
  gap: 16px;
  margin-bottom: 56px;
}

.data-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 18px;
}

.data-section h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1rem;
}

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding: 14px 0;
}

.data-row:first-of-type {
  border-top: 0;
}

.data-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.data-row span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.empty,
.fine-print {
  color: var(--muted);
}

.fine-print {
  font-size: 0.88rem;
}

@keyframes previewUpdate {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
    border-color: rgba(230, 221, 204, 0.22);
  }

  100% {
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 12px;
    max-height: 0;
    overflow: hidden;
    border: 0 solid var(--border);
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 240ms ease, opacity 180ms ease, transform 180ms ease, border-width 180ms ease, padding 180ms ease;
  }

  .main-nav.is-open {
    max-height: 620px;
    border-width: 1px;
    border-radius: var(--radius-card);
    padding: 14px;
    background: rgba(17, 34, 54, 0.98);
    opacity: 1;
    transform: translateY(0);
  }

  .main-nav a {
    min-height: 40px;
    border-radius: var(--radius-button);
    padding: 10px 12px;
  }

  .main-nav a:hover,
  .main-nav a:focus-visible {
    background: var(--surface-2);
  }

  .hero,
  .timeline-panel,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 48px;
  }

  .timeline-controls {
    justify-content: flex-start;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .topbar {
    padding: 14px 16px;
  }

  .brand {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 4px 10px;
    max-width: calc(100% - 86px);
  }

  .brand-mark {
    grid-row: span 2;
  }

  .brand-name,
  .product-name {
    white-space: normal;
  }

  .product-name {
    border-left: 0;
    padding-left: 0;
    font-size: 0.78rem;
  }

  .main-nav {
    grid-template-columns: 1fr;
    font-size: 0.82rem;
  }

  main {
    padding: 0 16px 48px;
    overflow-x: hidden;
  }

  .hero {
    gap: 28px;
    padding: 38px 0 36px;
  }

  h1 {
    max-width: 7em;
    font-size: clamp(2.18rem, 10vw, 2.65rem);
    line-height: 1.04;
  }

  .hero-body {
    max-width: 21rem;
    margin-bottom: 24px;
    font-size: 0.95rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .capsule-preview,
  .timeline-panel,
  .steps article,
  .opened-card,
  .contribute-card {
    border-radius: 12px;
  }

  .capsule-preview {
    padding: 20px;
  }

  .capsule-preview h2 {
    font-size: 1.72rem;
  }

  .record-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .timeline-panel {
    margin-bottom: 48px;
    padding: 18px;
  }

  .timeline-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-controls button,
  .custom-date {
    width: 100%;
    justify-content: space-between;
  }

  .custom-date input {
    width: 150px;
  }

  .steps,
  .type-list {
    grid-template-columns: 1fr;
  }

  .choice-grid,
  .preset-grid {
    grid-template-columns: 1fr;
  }

  .data-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* --- TIME CAPSULE ENHANCED STYLES --- */

.create-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 980px) {
  .create-layout {
    grid-template-columns: 1fr;
  }
}

.progressive-form .step {
  display: block;
}

.capsule-preview.live-preview {
  position: sticky;
  top: 100px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.capsule-preview.is-updating {
  transform: scale(0.98);
  opacity: 0.8;
}

.sealing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 19, 21, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 10;
}

.is-sealing .sealing-overlay {
  opacity: 1;
  pointer-events: all;
  animation: sealLock 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sealLock {
  0% { transform: scale(1.05); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sealing-content {
  text-align: center;
  transform: translateY(10px);
  animation: sealContent 0.5s ease 0.2s forwards;
  opacity: 0;
}

@keyframes sealContent {
  to { transform: translateY(0); opacity: 1; }
}

.seal-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.seal-icon::after {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.dashboard-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}
.dashboard-controls input, .dashboard-controls select {
  max-width: 300px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.data-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.data-row:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}
.data-row:first-of-type {
  border-top: 1px solid var(--border);
}

.data-row-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.countdown {
  font-variant-numeric: tabular-nums;
  color: var(--steel);
  font-size: 0.9rem;
}

.reveal-animation {
  animation: calmReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes calmReveal {
  0% { opacity: 0; transform: translateY(20px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

.time-rail-shell,
.dashboard-command,
.temporal-workspace,
.wall-grid,
.credits-grid,
.settings-grid {
  display: grid;
  gap: 16px;
}

.time-rail-presets,
.horizon-control,
.example-list,
.credit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.time-rail-presets button,
.horizon-control button {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 12px;
  cursor: pointer;
}

.time-rail-presets button:hover,
.time-rail-presets button:focus-visible,
.time-rail-presets button.is-active,
.horizon-control button:hover,
.horizon-control button:focus-visible,
.horizon-control button[aria-pressed="true"] {
  border-color: rgba(127, 169, 140, 0.46);
  color: var(--text);
  outline: none;
}

.time-rail-track {
  position: relative;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
}

.time-rail-track::before {
  content: "";
  position: absolute;
  inset: 20px 0;
  border-radius: 999px;
  background: rgba(237, 234, 224, 0.12);
}

.time-rail-track span,
.time-rail-track i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.time-rail-track span {
  left: 0;
  width: calc(var(--rail-ratio, 0) * 100%);
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.time-rail-track i {
  left: calc(var(--rail-ratio, 0) * (100% - 18px));
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(127, 169, 140, 0.14);
}

.time-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--border);
}

.time-readout div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-2);
}

.time-readout dt,
.due-count {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.time-readout dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.dashboard-command {
  grid-template-columns: minmax(180px, 1fr) 150px 180px minmax(260px, 1fr) auto auto auto;
  align-items: end;
  margin-bottom: 18px;
}

.temporal-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  align-items: start;
}

.temporal-field,
.context-panel,
.temporal-empty,
.credit-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.temporal-field {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  padding: 26px;
}

.field-axis {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.temporal-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(190px, 28vw);
  border: 1px solid rgba(237, 234, 224, 0.16);
  border-radius: var(--radius-card);
  background: var(--surface-2);
  color: var(--text);
  padding: 12px;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: transform 220ms ease, opacity 220ms ease, border-color 160ms ease;
}

.temporal-node strong,
.temporal-node span,
.temporal-node em,
.temporal-node small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.temporal-node span,
.temporal-node em,
.temporal-node small {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.temporal-node.is-selected,
.temporal-node:focus-visible {
  border-color: rgba(127, 169, 140, 0.66);
  outline: none;
  transform: translate(-50%, -50%) scale(1.02);
}

.context-panel,
.temporal-empty {
  padding: 22px;
}

.temporal-empty {
  display: grid;
  place-items: start;
  gap: 12px;
  min-height: 260px;
}

.empty-mark {
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(127, 169, 140, 0.45) 50%, transparent 51%),
    linear-gradient(180deg, transparent 49%, rgba(237, 234, 224, 0.18) 50%, transparent 51%),
    var(--surface-2);
}

.wall-grid,
.credits-grid,
.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.credit-card {
  padding: 22px;
}

.credit-avatar,
.credit-card img {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--text);
  object-fit: cover;
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  scroll-behavior: auto !important;
  transition-duration: 0ms !important;
  animation-duration: 0ms !important;
}

@media (max-width: 980px) {
  .dashboard-command,
  .temporal-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-command {
    align-items: stretch;
  }

  .horizon-control {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .horizon-control button {
    flex: 0 0 auto;
  }

  .temporal-field {
    min-height: 0;
    overflow: visible;
  }

  .temporal-node {
    position: static;
    width: 100%;
    margin-top: 12px;
    transform: none;
  }

  .temporal-node.is-selected,
  .temporal-node:focus-visible {
    transform: none;
  }
}

@media (max-width: 620px) {
  .time-readout {
    grid-template-columns: 1fr;
  }

  .capsule-preview.live-preview {
    position: static;
  }
}

/* --- BlackPanda Labs light product system --- */

:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --surface: #fcfcfb;
  --surface-2: #ffffff;
  --border: rgba(23, 36, 58, 0.08);
  --text: #17243a;
  --muted: #667085;
  --soft: #8a938f;
  --accent: #6f8d83;
  --accent-2: #dfe9e5;
  --steel: #6f8d83;
  --danger: #b9614f;
  --success: #426f61;
  --shadow-soft: 0 26px 70px rgba(23, 36, 58, 0.08);
  --shadow-card: 0 18px 44px rgba(23, 36, 58, 0.06);
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-card: 28px;
  --radius-button: 999px;
  --sans: Inter, Manrope, "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: var(--sans);
}

@keyframes bplReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bplNavReveal {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 18% 14%, rgba(111, 141, 131, 0.08), transparent 28rem),
    radial-gradient(circle at 84% 42%, rgba(23, 36, 58, 0.045), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

body::before {
  display: none;
}

.topbar {
  position: sticky;
  top: 20px;
  width: min(calc(100% - 48px), 1320px);
  margin: 20px auto 0;
  border: 1px solid rgba(23, 36, 58, 0.06);
  border-radius: 999px;
  padding: 12px 14px 12px 18px;
  background: rgba(252, 252, 251, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  animation: bplNavReveal 520ms var(--ease-premium) both;
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  min-width: 180px;
  line-height: 1.05;
}

.brand-copy strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 750;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.main-nav {
  gap: clamp(12px, 1.45vw, 22px);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.main-nav a {
  border-radius: 999px;
  padding: 9px 2px;
  transition: color 160ms ease, background 160ms ease, transform 160ms var(--ease-premium);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-toggle {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(23, 36, 58, 0.06);
}

main {
  width: min(calc(100% - 48px), 1320px);
  margin: 0 auto;
  padding: 72px 0 88px;
}

.hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.68fr);
  min-height: auto;
  padding: clamp(54px, 9vw, 112px) 0 48px;
}

.hero-copy,
.home-preview,
.page-heading,
.dashboard-command,
.temporal-workspace,
.create-layout,
.settings-grid,
.credits-grid,
.wall-grid,
.form-card,
.contribute-card {
  animation: bplReveal 680ms var(--ease-premium) both;
}

.home-preview,
.summary-card,
.settings-grid,
.credits-grid,
.wall-grid {
  animation-delay: 90ms;
}

.steps article,
.split-section,
.data-section,
.opened-card,
.credit-card {
  animation: bplReveal 620ms var(--ease-premium) both;
}

.steps article:nth-child(1) {
  animation-delay: 60ms;
}

.steps article:nth-child(2) {
  animation-delay: 110ms;
}

.steps article:nth-child(3) {
  animation-delay: 160ms;
}

.steps article:nth-child(4) {
  animation-delay: 210ms;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow,
.section-label {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

h1,
h2,
h3 {
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
}

h1 {
  max-width: 11.5em;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 650;
  line-height: 1.05;
}

.page-heading h1 {
  max-width: 12em;
  font-size: clamp(2.3rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.page-heading {
  display: grid;
  max-width: none;
  padding: 32px 0 28px;
}

.page-heading p:not(.eyebrow),
.hero-body,
.contribute-card p,
.preview-note p,
.fine-print,
.empty {
  color: var(--muted);
}

.hero-body {
  max-width: 42rem;
  font-size: clamp(1.06rem, 1.35vw, 1.22rem);
  line-height: 1.65;
}

.button {
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 750;
  box-shadow: none;
  transition: transform 180ms var(--ease-premium), box-shadow 180ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #21304a;
  color: #ffffff;
}

.button-secondary {
  border-color: rgba(23, 36, 58, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(23, 36, 58, 0.14);
  background: #ffffff;
}

.nav-cta {
  min-height: 44px;
  padding-inline: 24px;
}

.notice {
  width: fit-content;
  max-width: 760px;
  margin: 0 0 22px;
  border: 1px solid rgba(23, 36, 58, 0.08);
  border-radius: 18px;
  background: rgba(252, 252, 251, 0.76);
  color: var(--muted);
  box-shadow: 0 14px 34px rgba(23, 36, 58, 0.04);
}

.setup-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.setup-status span,
.setup-status strong {
  white-space: nowrap;
}

.setup-status span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.setup-status strong {
  color: var(--text);
  font-size: 0.88rem;
}

.setup-status p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.capsule-preview,
.timeline-panel,
.steps article,
.opened-card,
.contribute-card,
.form-card,
.data-section,
.context-panel,
.temporal-empty,
.credit-card,
.temporal-field,
.summary-card,
.companion-panel {
  border: 1px solid rgba(23, 36, 58, 0.07);
  border-radius: var(--radius-card);
  background: rgba(252, 252, 251, 0.9);
  box-shadow: var(--shadow-card);
  transition: transform 220ms var(--ease-premium), box-shadow 220ms ease, border-color 180ms ease;
}

.capsule-preview:hover,
.steps article:hover,
.opened-card:hover,
.contribute-card:hover,
.data-section:hover,
.credit-card:hover,
.summary-card:hover {
  border-color: rgba(23, 36, 58, 0.1);
  box-shadow: 0 24px 58px rgba(23, 36, 58, 0.08);
  transform: translateY(-3px);
}

.capsule-preview {
  padding: clamp(24px, 3vw, 36px);
}

.preview-header {
  color: var(--accent);
  letter-spacing: 0.18em;
}

.status-pill {
  border-color: rgba(111, 141, 131, 0.22);
  background: rgba(111, 141, 131, 0.08);
  color: var(--accent);
}

.capsule-preview h2,
.timeline-panel h2,
.section-intro h2,
.split-section h2,
.opened-card h2,
.data-section h2 {
  color: var(--text);
  font-family: var(--sans);
  font-weight: 650;
  line-height: 1.16;
}

.capsule-preview h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
}

.record-list {
  border-color: rgba(23, 36, 58, 0.08);
  border-radius: 18px;
  background: rgba(23, 36, 58, 0.07);
}

.record-list div {
  background: rgba(255, 255, 255, 0.82);
}

.record-list dt {
  color: var(--muted);
}

.record-list dd {
  color: var(--text);
}

.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steps article {
  padding: 24px;
  min-height: 138px;
}

.steps span {
  width: auto;
  height: auto;
  place-items: start;
  margin-bottom: 18px;
  border: 0;
  color: var(--accent);
  font-size: 0.78rem;
}

.steps h3 {
  color: var(--text);
  font-size: 1.05rem;
}

.steps p {
  color: var(--muted);
}

.example-list span {
  border: 1px solid rgba(23, 36, 58, 0.08);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 16px;
  font-weight: 650;
}

.split-section {
  grid-template-columns: minmax(0, 0.75fr) minmax(340px, 0.9fr);
  align-items: start;
}

.create-layout {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.44fr);
  gap: 28px;
}

.form-card {
  max-width: none;
  padding: clamp(22px, 3vw, 34px);
}

fieldset {
  border-top: 1px solid rgba(23, 36, 58, 0.07);
  padding-top: 20px;
}

fieldset:first-of-type {
  border-top: 0;
  padding-top: 0;
}

legend {
  color: var(--text);
  font-size: 1.05rem;
}

label {
  color: var(--muted);
  font-weight: 650;
}

input,
textarea,
select {
  border-color: rgba(23, 36, 58, 0.1);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(23, 36, 58, 0.24);
  box-shadow: 0 0 0 4px rgba(111, 141, 131, 0.12);
}

.choice-grid label,
.preset-grid button,
.time-rail-presets button,
.horizon-control button {
  border-color: rgba(23, 36, 58, 0.08);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  transition: transform 160ms var(--ease-premium), background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.choice-grid label:hover,
.preset-grid button:hover,
.time-rail-presets button:hover,
.horizon-control button:hover {
  transform: translateY(-1px);
}

.choice-grid label:has(input:checked),
.time-rail-presets button.is-active,
.horizon-control button[aria-pressed="true"] {
  border-color: rgba(111, 141, 131, 0.35);
  background: rgba(111, 141, 131, 0.12);
  color: var(--text);
}

.companion-panel {
  padding: 20px;
}

.time-rail-shell {
  border: 1px solid rgba(23, 36, 58, 0.07);
  border-radius: 24px;
  padding: 20px;
  background: #ffffff;
}

.time-rail-track::before {
  background: rgba(23, 36, 58, 0.1);
}

.time-rail-track span,
.time-rail-track i {
  background: var(--text);
}

.time-rail-track i {
  box-shadow: 0 0 0 5px rgba(23, 36, 58, 0.08);
}

.time-readout {
  border-radius: 18px;
  border-color: rgba(23, 36, 58, 0.08);
  background: rgba(23, 36, 58, 0.06);
}

.time-readout div {
  background: #ffffff;
}

.dashboard-heading {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.44fr);
  gap: 28px;
  align-items: end;
}

.summary-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  padding: 0;
  background: rgba(23, 36, 58, 0.06);
}

.summary-card div {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: rgba(252, 252, 251, 0.96);
}

.summary-card span,
.due-count,
.time-readout dt {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-card strong {
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

.dashboard-command {
  grid-template-columns: minmax(190px, 1.1fr) 150px 170px minmax(280px, 1.3fr) auto auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
  border: 1px solid rgba(23, 36, 58, 0.07);
  border-radius: 28px;
  padding: 16px;
  background: rgba(252, 252, 251, 0.92);
  box-shadow: var(--shadow-card);
}

.dashboard-command label {
  font-size: 0.78rem;
}

.horizon-control {
  align-items: center;
}

.horizon-control button {
  min-height: 38px;
  padding: 0 13px;
}

.motion-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(23, 36, 58, 0.08);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--muted);
  white-space: nowrap;
}

.motion-toggle input {
  width: 16px;
  accent-color: var(--text);
}

.temporal-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  gap: 22px;
}

.temporal-field {
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(23, 36, 58, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 36, 58, 0.035) 1px, transparent 1px),
    rgba(252, 252, 251, 0.92);
  background-size: 72px 72px;
}

.field-axis {
  border-bottom-color: rgba(23, 36, 58, 0.08);
  color: var(--muted);
  font-family: var(--sans);
}

.temporal-node {
  border-color: rgba(23, 36, 58, 0.08);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 16px 34px rgba(23, 36, 58, 0.07);
  animation: bplReveal 520ms var(--ease-premium) both;
}

.temporal-node span,
.temporal-node em,
.temporal-node small {
  color: var(--muted);
}

.temporal-node.is-selected,
.temporal-node:focus-visible {
  border-color: rgba(111, 141, 131, 0.42);
  box-shadow: 0 22px 46px rgba(23, 36, 58, 0.1);
}

.context-panel {
  background: rgba(252, 252, 251, 0.92);
  animation: bplReveal 520ms var(--ease-premium) both;
}

.temporal-empty {
  place-items: start;
  justify-content: center;
  background: rgba(252, 252, 251, 0.86);
  box-shadow: none;
}

.temporal-empty h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 650;
}

.empty-mark {
  border-color: rgba(23, 36, 58, 0.08);
  background:
    linear-gradient(90deg, transparent 49%, rgba(111, 141, 131, 0.36) 50%, transparent 51%),
    linear-gradient(180deg, transparent 49%, rgba(23, 36, 58, 0.12) 50%, transparent 51%),
    #ffffff;
}

.opened-card,
.wall-grid .opened-card {
  background: rgba(252, 252, 251, 0.94);
}

.credit-card {
  display: grid;
  gap: 10px;
}

.credit-avatar,
.credit-card img {
  background: var(--text);
  color: #ffffff;
}

.credit-links a,
.credit-links span {
  color: var(--muted);
  font-weight: 700;
}

.settings-grid,
.wall-grid,
.credits-grid {
  gap: 22px;
}

.loading {
  color: var(--muted);
}

.form-state.success {
  color: var(--success);
}

.form-state.error,
.notice.error {
  color: var(--danger);
}

@media (max-width: 1180px) {
  .topbar {
    align-items: center;
    flex-wrap: wrap;
    border-radius: 30px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-height: 0;
    overflow: hidden;
    border: 0 solid rgba(23, 36, 58, 0.08);
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 260ms var(--ease-premium), opacity 180ms ease, transform 220ms var(--ease-premium), padding 180ms ease, border-width 180ms ease;
  }

  .main-nav.is-open {
    max-height: 680px;
    border-width: 1px;
    border-radius: 24px;
    padding: 12px;
    background: #ffffff;
    opacity: 1;
    transform: translateY(0);
  }

  .main-nav a {
    min-height: 40px;
    padding: 10px 12px;
  }

  .dashboard-command,
  .dashboard-heading,
  .temporal-workspace,
  .hero,
  .split-section,
  .create-layout {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capsule-preview.live-preview {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }

  .button:hover,
  .button:focus-visible,
  .capsule-preview:hover,
  .steps article:hover,
  .opened-card:hover,
  .contribute-card:hover,
  .data-section:hover,
  .credit-card:hover,
  .summary-card:hover,
  .choice-grid label:hover,
  .preset-grid button:hover,
  .time-rail-presets button:hover,
  .horizon-control button:hover {
    transform: none;
  }
}

.reduce-motion .hero-copy,
.reduce-motion .home-preview,
.reduce-motion .page-heading,
.reduce-motion .dashboard-command,
.reduce-motion .temporal-workspace,
.reduce-motion .create-layout,
.reduce-motion .settings-grid,
.reduce-motion .credits-grid,
.reduce-motion .wall-grid,
.reduce-motion .form-card,
.reduce-motion .contribute-card,
.reduce-motion .steps article,
.reduce-motion .split-section,
.reduce-motion .data-section,
.reduce-motion .opened-card,
.reduce-motion .credit-card,
.reduce-motion .temporal-node,
.reduce-motion .context-panel,
.reduce-motion .topbar {
  animation: none !important;
}

/* --- Protected admin panel --- */

.admin-main {
  padding-top: 56px;
}

.admin-topbar .brand-copy small {
  color: var(--accent);
}

.admin-grid,
.admin-panel {
  display: grid;
  gap: 22px;
}

.admin-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.55fr);
}

.admin-card,
.admin-detail,
.admin-actions {
  border: 1px solid rgba(23, 36, 58, 0.07);
  border-radius: var(--radius-card);
  background: rgba(252, 252, 251, 0.92);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 2.5vw, 30px);
  animation: bplReveal 620ms var(--ease-premium) both;
}

.admin-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.admin-actions {
  display: grid;
  gap: 12px;
  box-shadow: none;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23, 36, 58, 0.07);
  border-radius: 22px;
  background: rgba(23, 36, 58, 0.06);
}

.admin-metric {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #ffffff;
}

.admin-metric span,
.admin-table-head span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-metric strong {
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.admin-command {
  grid-template-columns: minmax(220px, 1fr) 180px auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.admin-form-stack {
  align-content: start;
}

.admin-form-stack label,
.admin-inline-form {
  display: grid;
  gap: 8px;
}

.admin-form-stack input,
.admin-form-stack select,
.admin-form-stack textarea,
.admin-inline-form input,
.admin-inline-form select {
  width: 100%;
  border: 1px solid rgba(23, 36, 58, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.admin-inline-form {
  grid-template-columns: minmax(120px, 1fr);
}

.admin-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(23, 36, 58, 0.07);
  border-radius: 22px;
  background: rgba(23, 36, 58, 0.06);
}

.admin-table-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
}

.admin-table-row span {
  min-width: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  padding: 14px;
  overflow-wrap: anywhere;
}

.admin-table-row span strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.admin-table-head span {
  background: rgba(252, 252, 251, 0.96);
}

.button-small {
  min-height: 36px;
  width: fit-content;
  padding-inline: 14px;
  font-size: 0.82rem;
}

.admin-status {
  display: inline-flex;
  width: fit-content;
  text-transform: capitalize;
}

.danger-action {
  color: var(--danger);
}

.admin-empty {
  min-height: 220px;
}

@media (max-width: 1080px) {
  .admin-grid,
  .admin-detail,
  .admin-command {
    grid-template-columns: 1fr;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-table {
    overflow-x: auto;
  }

  .admin-table-row {
    min-width: 760px;
  }
}

@media (max-width: 680px) {
  .admin-main {
    padding-top: 36px;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-card,
  .admin-detail,
  .admin-actions {
    border-radius: 22px;
  }
}

@media (max-width: 680px) {
  .topbar,
  main {
    width: min(calc(100% - 28px), 1320px);
  }

  .topbar {
    top: 12px;
    margin-top: 12px;
    padding: 10px 12px;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy small {
    display: none;
  }

  .main-nav {
    grid-template-columns: 1fr;
  }

  main {
    padding-top: 42px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .page-heading h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .hero {
    padding-top: 34px;
  }

  .hero-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .setup-status {
    display: grid;
    width: 100%;
  }

  .steps,
  .summary-card,
  .choice-grid,
  .preset-grid,
  .time-readout,
  .wall-grid,
  .credits-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-command {
    border-radius: 22px;
  }

  .horizon-control,
  .time-rail-presets {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .horizon-control button,
  .time-rail-presets button {
    flex: 0 0 auto;
  }

  .temporal-field {
    min-height: 0;
    padding: 18px;
  }

  .temporal-node {
    width: 100%;
  }

  .record-list div {
    grid-template-columns: 1fr;
  }
}

/* ── Site Footer ─────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(11, 26, 43, 0.82);
  backdrop-filter: blur(12px);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 72px) 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.site-footer__logo .brand-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-2);
  border: 1px solid var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.site-footer__logo .brand-copy strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}

.site-footer__logo .brand-copy small {
  font-size: 0.75rem;
  color: var(--muted);
}

.site-footer__tagline {
  margin: 0;
  line-height: 1.65;
  max-width: 360px;
  color: var(--soft);
}

.site-footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 4px;
}

.site-footer__col a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s;
}

.site-footer__col a:hover {
  color: var(--text);
}

.site-footer__seo {
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 72px);
}

.site-footer__seo p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--soft);
  line-height: 1.6;
}

.site-footer__bottom {
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--soft);
}

@media (max-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 32px;
  }

  .site-footer__links {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .site-footer__tagline {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .site-footer__links {
    grid-template-columns: 1fr;
  }
}

/* ── Admin fieldset (site settings CMS) ────────────── */
.admin-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 20px 16px;
  margin: 0;
}

.admin-fieldset legend {
  padding: 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}
