/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg-base: #f9ecd3;
  --surface: #fff6e0;
  --surface-soft: #ffe6b2;
  --text: #1a1f28;
  --text-soft: #3f4757;
  --border-color: #2b2f38;
  --link: #c44b31;
  --accent: #ff6f4f;
  --accent-dark: #c94a32;
  --accent-contrast: #fff;
  --newsletter-cta: #2f7d3f;
  --newsletter-cta-text: #fff6e0;
  --screen: #a7d7ff;
  --overlay: rgba(255, 244, 214, 0.28);
  --shadow: rgba(0, 0, 0, 0.25);
  --pixel: 3px;
  --bg-image-light: url("/assets/backgrounds/background_day-1f2e89ab.png");
  --bg-image-dark: url("/assets/backgrounds/background_night-5443f7bb.png");
  --bg-light-opacity: 1;
  --bg-dark-opacity: 0;
  --alert-bg: #fef6db;
  --alert-success-bg: #d9f8c7;
  --alert-success-text: #1f3d2a;
  --alert-error-bg: #ffd1c7;
  --alert-error-text: #4a2a00;
  --alert-warning-bg: #ffe7c7;
  --alert-warning-text: #4a2a00;
  --alert-info-bg: #cfe7ff;
  --alert-info-text: #1a3c55;
  --ink: var(--text);
  --ink-soft: var(--text-soft);
  --paper: var(--surface);
  --paper-soft: var(--surface-soft);
  --border: var(--border-color);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-base: #0c1421;
    --surface: #161e2b;
    --surface-soft: #1f2a3b;
    --text: #eef3fa;
    --text-soft: #c0cad8;
    --border-color: #3a4454;
    --link: #7dd3fc;
    --accent: #ff8a63;
    --accent-dark: #f36b46;
    --accent-contrast: #11151d;
    --newsletter-cta: #3f9855;
    --newsletter-cta-text: #0f1a12;
    --screen: #2c5f85;
    --overlay: rgba(10, 16, 28, 0.55);
    --shadow: rgba(0, 0, 0, 0.6);
    --bg-light-opacity: 0;
    --bg-dark-opacity: 1;
    --alert-bg: #1e2736;
    --alert-success-bg: #1f3d2a;
    --alert-success-text: #d7f5e6;
    --alert-error-bg: #4b1f1a;
    --alert-error-text: #ffd9c9;
    --alert-warning-bg: #4b3518;
    --alert-warning-text: #ffe2b8;
    --alert-info-bg: #1d3447;
    --alert-info-text: #cfe8ff;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-light-opacity: 1;
  --bg-dark-opacity: 0;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #0c1421;
  --surface: #161e2b;
  --surface-soft: #1f2a3b;
  --text: #eef3fa;
  --text-soft: #c0cad8;
  --border-color: #3a4454;
  --link: #7dd3fc;
  --accent: #ff8a63;
  --accent-dark: #f36b46;
  --accent-contrast: #11151d;
  --newsletter-cta: #3f9855;
  --newsletter-cta-text: #0f1a12;
  --screen: #2c5f85;
  --overlay: rgba(10, 16, 28, 0.55);
  --shadow: rgba(0, 0, 0, 0.6);
  --bg-light-opacity: 0;
  --bg-dark-opacity: 1;
  --alert-bg: #1e2736;
  --alert-success-bg: #1f3d2a;
  --alert-success-text: #d7f5e6;
  --alert-error-bg: #4b1f1a;
  --alert-error-text: #ffd9c9;
  --alert-warning-bg: #4b3518;
  --alert-warning-text: #ffe2b8;
  --alert-info-bg: #1d3447;
  --alert-info-text: #cfe8ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Press Start 2P", system-ui;
  color: var(--ink);
  background-color: var(--bg-base);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

html,
body {
  min-height: 100%;
}

body::before,
body::after,
html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image: var(--bg-image-light);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-light-opacity);
  transition: opacity 0.6s ease;
  z-index: -3;
}

body::after {
  background-image: var(--bg-image-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--bg-dark-opacity);
  transition: opacity 0.6s ease;
  z-index: -2;
}

html::before {
  background: var(--overlay);
  z-index: -1;
  transition: background-color 0.35s ease;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:focus-visible,
.pixel-button:focus-visible,
.text-link:focus-visible,
.nav-links a:focus-visible,
.footer-links a:focus-visible,
.topic-pill:focus-visible,
.breadcrumbs__link:focus-visible,
.app-alert__dismiss:focus-visible {
  outline: 2px dashed var(--accent-dark);
  outline-offset: 2px;
}

.text-link:hover,
.nav-links a:hover,
.footer-links a:hover {
  text-decoration: underline;
}

body,
.page,
.site-header,
.breadcrumbs__list,
.hero,
.stat-tile,
.hero-card,
.story-card,
.topic-pill,
.newsletter,
.app-alert,
.app-alert__dismiss,
.newsletter-form input,
.form-input,
.pixel-button,
.pixel-gear-button,
.site-footer {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 32px;
}

.flash {
  margin: 0 0 24px;
}

.breadcrumbs {
  margin: 0 0 18px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.breadcrumbs__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border: var(--pixel) solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: var(--accent-dark);
}

.breadcrumbs__link,
.breadcrumbs__current {
  display: inline-block;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.breadcrumbs__link {
  font-weight: 700;
}

.breadcrumbs__link:focus-visible {
  outline: 2px dashed var(--accent-dark);
  outline-offset: 2px;
}

.breadcrumbs__current {
  color: var(--ink);
}

.brand {
  font-family: "Press Start 2P", system-ui;
  font-size: 16px;
  letter-spacing: 1px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: var(--pixel) solid var(--border);
  background: var(--paper);
  color: var(--ink);
  padding: 6px;
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.3s ease,
    color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle__option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-toggle__option:has(input:focus-visible) {
  outline: 2px dashed var(--accent-dark);
  outline-offset: 2px;
}

.theme-toggle__option:has(input:checked) {
  background: var(--surface-soft);
  border-color: var(--border);
}

.theme-toggle__text {
  font-size: 10px;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 20px;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 14px;
}

.nav-links a,
.footer-links a {
  color: inherit;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pixel-gear-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 7px;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
}

.pixel-gear-button:hover,
.pixel-gear-button:focus-visible {
  background: rgba(128, 128, 128, 0.12);
  color: var(--ink);
  text-decoration: none;
}

:root[data-theme="dark"] .pixel-gear-button:hover,
:root[data-theme="dark"] .pixel-gear-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.pixel-gear-button:focus-visible {
  outline: 2px dashed var(--accent-dark);
  outline-offset: 2px;
}

.pixel-gear-button::after {
  content: "Account settings";
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--text);
  color: var(--bg-base);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}

.pixel-gear-button:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pixel-gear-label {
  display: inline;
}

.pixel-gear-icon {
  width: 30px;
  height: 30px;
  position: relative;
  display: block;
  flex-shrink: 0;
  background: #2d2434;
  clip-path: polygon(
    39% 0%, 61% 0%,
    61% 12%, 73% 12%,
    81% 20%, 88% 20%,
    88% 32%, 100% 39%,
    100% 61%, 88% 61%,
    88% 73%, 80% 81%,
    73% 88%, 61% 88%,
    61% 100%, 39% 100%,
    39% 88%, 27% 88%,
    19% 80%, 12% 73%,
    12% 61%, 0% 61%,
    0% 39%, 12% 39%,
    12% 27%, 20% 19%,
    27% 12%, 39% 12%
  );
  transform-origin: center;
  transition: transform 0.4s ease-in-out;
}

.pixel-gear-button:hover .pixel-gear-icon,
.pixel-gear-button:focus-visible .pixel-gear-icon {
  transform: rotate(60deg);
}

.pixel-gear-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: linear-gradient(145deg, #f1f9ff 0%, #dceaf4 52%, #bed1e0 100%);
  clip-path: polygon(
    40% 0%, 60% 0%,
    60% 11%, 72% 11%,
    80% 19%, 89% 19%,
    89% 31%, 100% 40%,
    100% 60%, 89% 60%,
    89% 72%, 81% 80%,
    72% 89%, 60% 89%,
    60% 100%, 40% 100%,
    40% 89%, 28% 89%,
    20% 81%, 11% 72%,
    11% 60%, 0% 60%,
    0% 40%, 11% 40%,
    11% 28%, 19% 20%,
    28% 11%, 40% 11%
  );
}

.pixel-gear-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center,
      transparent 0 3px,
      #2d2434 3px 6px,
      #d8e8f2 6px 9px,
      #2d2434 9px 11px,
      transparent 11px 100%),
    linear-gradient(145deg, transparent 0 34%, rgba(255, 255, 255, 0.5) 34% 46%, transparent 46% 100%),
    linear-gradient(325deg, transparent 0 34%, rgba(59, 75, 104, 0.55) 34% 47%, transparent 47% 100%);
}

@media (prefers-reduced-motion: reduce) {
  .pixel-gear-icon {
    transition: none;
  }

  .pixel-gear-button::after {
    transition: none;
  }
}

.pixel-button {
  border: var(--pixel) solid var(--border);
  border-radius: 0;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  text-transform: uppercase;
  box-shadow: 6px 6px 0 var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pixel-button.primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.pixel-button.newsletter-submit {
  background: var(--newsletter-cta);
  color: var(--newsletter-cta-text);
}

.pixel-button.secondary {
  background: var(--screen);
}

.pixel-button.ghost {
  background: transparent;
}

.pixel-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--border);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
  padding: 24px;
  background: var(--paper);
  border: var(--pixel) solid var(--border);
  box-shadow: 12px 12px 0 var(--border);
}

.hero--compact {
  padding: 20px;
  gap: 22px;
}

.hero-copy h1 {
  font-size: clamp(26px, 3.2vw, 40px);
  margin-top: 12px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
}

.hero-subtitle {
  margin: 20px 0 24px;
  color: var(--ink-soft);
  max-width: 520px;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  color: var(--ink-soft);
  font-size: 15px;
}

.stat-tile {
  background: var(--surface);
  border: var(--pixel) solid var(--border);
  padding: 10px 12px;
  box-shadow: 4px 4px 0 var(--border);
}

.hero-meta strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
}

.hero-card {
  background: var(--surface);
  padding: 24px;
  border: var(--pixel) solid var(--border);
  box-shadow: 8px 8px 0 var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
}

.section {
  margin-top: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.text-link {
  font-weight: 700;
  color: var(--accent-dark);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.story-card {
  background: var(--surface);
  border: var(--pixel) solid var(--border);
  padding: 20px;
  display: grid;
  gap: 12px;
  min-height: 190px;
  box-shadow: 6px 6px 0 var(--border);
}

.story-card--full {
  min-height: auto;
}

.muted {
  color: var(--ink-soft);
  font-size: 16px;
}

.card-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.topics {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: var(--pixel) solid var(--border);
  padding: 10px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 4px 4px 0 var(--border);
}

.newsletter {
  background: var(--paper-soft);
  padding: 28px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: center;
  border: var(--pixel) solid var(--border);
  box-shadow: 10px 10px 0 var(--border);
}

.newsletter-anchor {
  position: relative;
  top: -12px;
  display: block;
}

#values.section.newsletter,
.section.newsletter {
  display: block;
}

.newsletter-messages {
  width: 100%;
  margin-bottom: 24px;
}

.newsletter-messages:empty {
  display: none;
}

.newsletter-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 768px) {
  .newsletter-body {
    flex-direction: column;
    align-items: stretch;
  }
}

.flash-messages {
  display: grid;
}

.app-alert {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: var(--pixel) solid var(--border);
  box-shadow: 6px 6px 0 var(--border);
  font-weight: 600;
  font-size: 14px;
  background: var(--alert-bg);
  color: var(--ink);
}

.app-alert + .app-alert {
  margin-top: 12px;
}

.app-alert__message {
  line-height: 1.4;
}

.app-alert__dismiss {
  border: var(--pixel) solid var(--border);
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--border);
  font-family: inherit;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  text-transform: uppercase;
}

.app-alert__dismiss:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--border);
}

.app-alert--success {
  background: var(--alert-success-bg);
  border-color: var(--border);
  box-shadow: 6px 6px 0 var(--border);
  color: var(--alert-success-text);
}

.app-alert--error {
  background: var(--alert-error-bg);
  border-color: var(--border);
  box-shadow: 6px 6px 0 var(--border);
  color: var(--alert-error-text);
}

.app-alert--warning {
  background: var(--alert-warning-bg);
  border-color: var(--border);
  box-shadow: 6px 6px 0 var(--border);
  color: var(--alert-warning-text);
}

.app-alert--info {
  background: var(--alert-info-bg);
  border-color: var(--border);
  box-shadow: 6px 6px 0 var(--border);
  color: var(--alert-info-text);
}

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

.newsletter-form input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border: var(--pixel) solid var(--border);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--border);
}

.article-form {
  display: grid;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-label {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: var(--pixel) solid var(--border);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--border);
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
}

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

.form-field--checkbox {
  gap: 6px;
}

.form-checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--link);
}

.form-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.form-hint a {
  color: var(--link);
}

.forgot-password-link {
  color: #333;
}

.article-page {
  background: var(--paper);
  border: var(--pixel) solid var(--border);
  box-shadow: 10px 10px 0 var(--border);
  padding: clamp(20px, 4vw, 36px);
}

.article-page__header {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.article-page__header h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.25;
}

.article-page__content {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

.article-page__content p + p {
  margin-top: 1.1em;
}

.article-page__actions {
  margin-top: 32px;
  padding-top: 20px;
  border-top: var(--pixel) solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.article-page__actions form {
  margin: 0;
}

.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: var(--pixel) solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 16px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .breadcrumbs__list {
    padding: 8px 10px;
  }

  .breadcrumbs__item {
    max-width: 200px;
  }

  .breadcrumbs__link,
  .breadcrumbs__current {
    max-width: 170px;
  }

  .article-page {
    padding: 18px;
  }
}

/* ==========================================================================
   LUNAR STANDARD TIME TOOL
   ========================================================================== */

.lst-terminal {
  background: #040c14;
  border: var(--pixel) solid #0d4a2c;
  box-shadow:
    8px 8px 0 #020a0e,
    0 0 48px rgba(74, 254, 149, 0.07);
  position: relative;
  overflow: hidden;
}

/* CRT scanline overlay */
.lst-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.12) 3px,
    rgba(0, 0, 0, 0.12) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.lst-terminal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #020810;
  border-bottom: 1px solid #0d4a2c;
}

.lst-terminal__title {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: #1a6b3a;
  letter-spacing: 0.04em;
}

.lst-terminal__live {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: #4afe95;
  animation: lst-pulse 2s ease-in-out infinite;
}

@keyframes lst-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.lst-terminal__screen {
  padding: clamp(20px, 4vw, 36px) clamp(20px, 4vw, 36px);
  position: relative;
  z-index: 2;
}

.lst-terminal__block {
  margin: 0;
}

.lst-terminal__label {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: #1a7a46;
  letter-spacing: 0.08em;
  margin: 0 0 16px 0;
  text-transform: uppercase;
}

.lst-terminal__clock {
  font-family: "VT323", monospace;
  font-size: clamp(44px, 9vw, 84px);
  color: #4afe95;
  line-height: 1;
  text-shadow: 0 0 24px rgba(74, 254, 149, 0.35);
  margin: 0 0 14px 0;
  letter-spacing: 0.02em;
}

.lst-terminal__cursor {
  animation: lst-blink 1s step-end infinite;
  color: #4afe95;
}

@keyframes lst-blink {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 0; }
}

.lst-terminal__earth {
  font-family: "VT323", monospace;
  font-size: 20px;
  color: #1a7a46;
  letter-spacing: 0.04em;
  margin: 0;
}

.lst-terminal__divider {
  height: 1px;
  background: #0d4a2c;
  margin: 28px 0;
}

.lst-terminal__input-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.lst-input {
  background: #020810;
  border: 1px solid #0d4a2c;
  color: #4afe95;
  font-family: "VT323", monospace;
  font-size: 22px;
  padding: 10px 14px;
  outline: none;
  flex: 1;
  min-width: 200px;
  caret-color: #4afe95;
  color-scheme: dark;
}

.lst-input:focus {
  border-color: #4afe95;
  box-shadow: 0 0 10px rgba(74, 254, 149, 0.18);
}

.lst-input::-webkit-calendar-picker-indicator {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(100deg);
  cursor: pointer;
}

.lst-terminal__result {
  margin-top: 20px;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lst-result-prefix {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: #1a7a46;
  letter-spacing: 0.06em;
}

.lst-result-line {
  font-family: "VT323", monospace;
  font-size: clamp(32px, 5vw, 52px);
  color: #7fffc4;
  text-shadow: 0 0 14px rgba(127, 255, 196, 0.28);
  line-height: 1.1;
}

.lst-result-error {
  font-family: "VT323", monospace;
  font-size: 22px;
  color: #ff6b6b;
}

/* Source / GitHub card */
.lst-source-card {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
  border: var(--pixel) solid var(--border);
  box-shadow: 8px 8px 0 var(--border);
  overflow: hidden;
}

.lst-source-card__copy {
  padding: clamp(20px, 4vw, 36px);
  border-right: var(--pixel) solid var(--border);
}

.lst-source-card__copy h3 {
  font-size: clamp(18px, 3vw, 26px);
  margin: 8px 0 12px;
}

.lst-source-card__copy p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.lst-source-card__actions {
  display: flex;
  gap: 12px;
}

.lst-source-card__code {
  padding: clamp(20px, 4vw, 36px);
  background: #040c14;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lst-code-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "VT323", monospace;
  font-size: clamp(16px, 2.2vw, 20px);
  word-break: break-all;
}

.lst-code-comment {
  color: #1a6b3a;
}

.lst-code-line {
  color: #4afe95;
  text-shadow: 0 0 8px rgba(74, 254, 149, 0.25);
}

@media (max-width: 768px) {
  .lst-source-card {
    grid-template-columns: 1fr;
  }

  .lst-source-card__copy {
    border-right: none;
    border-bottom: var(--pixel) solid var(--border);
  }

  .lst-terminal__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
