:root {
  color-scheme: light;
  --background: #f5f5f5;
  --surface: #ffffff;
  --surface-muted: #ebebeb;
  --text: #111111;
  --text-muted: #5c5c5c;
  --border: #d4d4d4;
  --border-strong: #222222;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1200px;
}

@font-face {
  font-family: 'ltEnergy';
  src: url('../data/LTEnergy.ttf') format('truetype'), local('ltEnergy'), local('LT Energy'), local('LTENERGY');
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
  color: var(--text);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[data-admin-only] {
  display: none !important;
}

body.is-admin [data-admin-only] {
  display: initial !important;
}

body.is-admin .field[data-admin-only] {
  display: flex !important;
}

body.is-admin .admin-card[data-admin-only] {
  display: block !important;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  height: 56px;
  width: auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 1rem;
  font-family: 'ltEnergy', Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-main {
  flex: 1;
  padding: 40px 0 64px;
}

.hero {
  margin-bottom: 28px;
  padding: 36px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.page-subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.controls-card,
.admin-card,
.legal-card,
.notice-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.controls-card {
  padding: 24px;
  margin-bottom: 28px;
}

.admin-card {
  padding: 24px;
  margin-bottom: 28px;
}

.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.8fr) auto;
  gap: 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.input,
.select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input:focus,
.select:focus,
.textarea:focus,
.btn:focus,
.icon-btn:focus,
.video-modal-close:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-card-title,
.admin-panel-title {
  margin: 0;
}

.admin-card-text {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.admin-status {
  min-width: 220px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f1f1f1;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.admin-status.is-success {
  background: #111111;
  color: #ffffff;
}

.admin-status.is-warning {
  background: #ebebeb;
  color: #111111;
}

.admin-status.is-error {
  background: #e2e2e2;
  color: #111111;
  border: 1px solid var(--border);
}

.admin-grid,
.admin-form-grid {
  display: grid;
  gap: 18px;
}

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

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

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
}

.admin-steps {
  display: grid;
  gap: 12px;
}

.admin-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
}

.admin-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-step-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.admin-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.results-count {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.manual-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.06);
}

.manual-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #efefef 100%);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.manual-card-media img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.manual-card-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 172px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-align: center;
  padding: 18px;
}

.manual-card-media.is-fallback .manual-card-fallback {
  display: flex;
}

.manual-card-media.is-fallback img {
  display: none;
}

.manual-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

.manual-card-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.manual-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge.is-muted {
  background: var(--surface-muted);
  color: var(--text);
}

.manual-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn,
.icon-btn,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.icon-btn:hover,
.back-link:hover {
  transform: translateY(-1px);
}

.btn.is-secondary,
.icon-btn.is-secondary,
.back-link {
  background: #ffffff;
  color: #111111;
  border-color: var(--border);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.notice-card {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
}

.site-footer {
  padding: 0 0 32px;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-note {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.legal-layout {
  display: grid;
  gap: 24px;
}

.legal-card {
  padding: 32px;
}

.legal-card h1,
.legal-card h2,
.legal-card p,
.legal-card ul {
  margin-top: 0;
}

.legal-card h1 {
  margin-bottom: 20px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.legal-card h2 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.legal-card p,
.legal-card li {
  color: #222222;
  line-height: 1.7;
}

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

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.video-modal.is-open {
  display: flex;
}

.video-modal-dialog {
  position: relative;
  width: min(100%, 960px);
  padding: 18px;
  background: #0f0f0f;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.video-modal-frame,
.video-modal-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-sm);
  background: #000000;
}

.video-modal-frame[hidden],
.video-modal-player[hidden] {
  display: none;
}

.video-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

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

@media (max-width: 900px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }

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

  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .controls-card,
  .admin-card,
  .legal-card {
    padding: 24px;
  }

  .admin-card-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 20px), var(--container));
  }

  .page-main {
    padding: 24px 0 40px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    height: 48px;
  }

  .manual-card-actions,
  .footer-links,
  .legal-actions,
  .site-nav {
    width: 100%;
  }

  .btn,
  .icon-btn,
  .back-link {
    width: 100%;
  }

  .site-footer-inner {
    padding: 18px;
  }
}
