/* LUMINA Education portal — palette matches on-node dashboard (dashboard.css) */
:root {
  --portal-bg: #061626;
  --portal-surface: #0a1f2e;
  --portal-border: #0f2a3d;
  --portal-border-muted: #1a3a4d;
  --portal-text: #f2f2f2;
  --portal-text-muted: #bbb;
  --portal-teal: #3ccfc9;
  --portal-purple: #9d8fff;
  --portal-link: #4ba6e8;
  --portal-success: #57c47e;
  --portal-success-hover: #6ed492;
  --portal-danger: #e65a6b;
  --portal-danger-hover: #d44a5a;
  --portal-radius: 14px;
  --portal-gap: 14px;
  --esp-tools-button-color: var(--portal-success);
  --esp-tools-button-text-color: #061626;
  --md-sys-color-primary: var(--portal-success);
  --md-sys-color-on-primary: #061626;
}

html {
  background: var(--portal-bg);
  scroll-behavior: smooth;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--portal-bg);
  color: var(--portal-text);
  margin: 0;
  padding: 20px 16px 28px;
  line-height: 1.5;
}
@media (min-width: 480px) {
  body {
    padding: 24px 20px 32px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin-bottom: 12px;
}

.page {
  max-width: 560px;
  margin: 0 auto;
}

.portal-insecure-banner {
  background: #2a1520;
  border: 2px solid var(--portal-danger);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 var(--portal-gap) 0;
  font-size: 13px;
  line-height: 1.55;
  color: #f2d4d8;
}
.portal-insecure-banner strong {
  color: #ffb4be;
}

.brand {
  max-width: 300px;
  margin-bottom: 0;
  padding-bottom: 18px;
}
.logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 -10px 0;
}
.edition-row {
  width: 100%;
  margin-top: 0;
  line-height: 0;
}
.edition {
  margin: 0;
  padding: 0;
  color: #e4d5b7;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
  line-height: 1.2;
  transform-origin: left center;
}

.portal-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px 0;
}
.portal-nav .portal-btn {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.3);
}

main {
  display: flex;
  flex-direction: column;
  gap: var(--portal-gap);
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--portal-border);
}

.lead {
  color: #aaa;
  line-height: 1.55;
  margin: 0;
  font-size: 15px;
}
ol {
  line-height: 1.6;
  color: #ccc;
  padding-left: 1.25rem;
  margin: 0;
}
a:not(.portal-btn) {
  color: var(--portal-link);
}
code {
  background: var(--portal-border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

/* Shared button base */
.portal-btn,
esp-web-install-button button.portal-btn {
  display: inline-block;
  box-sizing: border-box;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  padding: 14px 28px;
  color: #061626;
  background: var(--portal-teal);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.portal-btn:hover,
esp-web-install-button button.portal-btn:hover {
  background: var(--portal-purple);
  color: #061626;
}
.portal-btn.active,
.portal-btn[aria-current='page'] {
  background: var(--portal-purple);
  color: #061626;
}

.portal-btn--success,
esp-web-install-button button.portal-btn--success {
  background: var(--portal-success);
  border-color: #3d8f5c;
  color: #061626;
}
.portal-btn--success:hover,
esp-web-install-button button.portal-btn--success:hover {
  background: var(--portal-success-hover);
  color: #061626;
}

.portal-btn--danger {
  background: var(--portal-danger);
  border-color: #b84a58;
  color: #f2f2f2;
  box-shadow: 0 0 18px rgba(230, 90, 107, 0.25);
}
.portal-btn--danger:hover {
  background: var(--portal-danger-hover);
  color: #f2f2f2;
}

.portal-btn--secondary {
  background: var(--portal-border);
  color: var(--portal-text);
  border-color: var(--portal-border-muted);
  box-shadow: none;
}
.portal-btn--secondary:hover {
  background: var(--portal-border-muted);
  color: var(--portal-text);
}

.portal-btn--wide {
  display: block;
  width: 100%;
  max-width: 360px;
  padding: 18px 32px;
  font-size: 17px;
}
.portal-btn--inline {
  font-size: 15px;
  padding: 10px 20px;
  box-shadow: none;
}

.flasher-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin: 2px 0 0 0;
}
.flasher-cta esp-web-install-button {
  display: block;
  width: 100%;
  max-width: none;
  text-align: center;
  margin: 0;
  line-height: 0;
}
.flasher-cta esp-web-install-button button.portal-btn,
.flasher-cta .reset-row .portal-btn {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  min-height: 58px;
}
.flasher-cta .reset-row .portal-btn--danger {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);
}
.reset-row {
  margin: 0;
  width: 100%;
  max-width: none;
}

.portal-actions {
  margin: 4px 0 0 0;
  text-align: center;
  display: flex;
  justify-content: center;
}
.portal-actions .portal-btn--wide {
  max-width: 100%;
}

.portal-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0;
}
.portal-card h2 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: var(--portal-teal);
}
.portal-card p {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--portal-text-muted);
  line-height: 1.55;
}
.portal-card p:last-child {
  margin-bottom: 0;
}
.portal-card ul,
.portal-card ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--portal-text-muted);
  line-height: 1.55;
  font-size: 13px;
}
.portal-card li {
  margin: 6px 0;
}
.portal-card .portal-actions {
  margin-top: 14px;
}

.steps-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #ccc;
  font-size: 13px;
  line-height: 1.55;
}
.steps-list li {
  margin: 6px 0;
}

.portal-btn:focus-visible {
  outline: 2px solid #f2f2f2;
  outline-offset: 2px;
}
esp-web-install-button [slot='unsupported'],
esp-web-install-button [slot='not-allowed'] {
  display: block;
  margin-top: 12px;
  padding: 12px 14px;
  background: #2a1520;
  border: 1px solid var(--portal-danger);
  border-radius: 10px;
  color: #f2d4d8;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* Modal */
.lumina-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 12, 20, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100000;
  box-sizing: border-box;
}
.lumina-modal {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  max-width: 440px;
  width: 100%;
  padding: 20px 22px;
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.55);
}
.lumina-modal h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
  color: var(--portal-teal);
}
.lumina-modal .lumina-modal-msg {
  margin: 0 0 14px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #ddd;
}
.lumina-modal .lumina-modal-help {
  background: var(--portal-bg);
  border: 1px solid var(--portal-border-muted);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--portal-text-muted);
  margin-bottom: 16px;
}
.lumina-modal .lumina-modal-help strong {
  color: var(--portal-text);
}
.lumina-modal .lumina-modal-help ul {
  margin: 8px 0 0 1rem;
  padding: 0;
}
.lumina-modal .lumina-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

/* Help accordions — expandable panels (not primary CTAs) */
.help-prose {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: var(--portal-text-muted);
  line-height: 1.55;
}
.help-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.help-accordion-item {
  border: none;
  background: transparent;
  border-radius: var(--portal-radius);
}
.help-accordion-summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  user-select: none;
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.35;
  padding: 13px 44px 13px 16px;
  color: var(--portal-text);
  background: var(--portal-border);
  border: 1px solid var(--portal-border-muted);
  border-radius: var(--portal-radius);
  box-shadow: none;
  transition: background 0.2s, border-color 0.2s;
}
.help-accordion-summary::-webkit-details-marker {
  display: none;
}
.help-accordion-summary::marker {
  content: '';
}
.help-accordion-summary::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--portal-teal);
  border-bottom: 2px solid var(--portal-teal);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.2s;
}
.help-accordion-summary:hover {
  background: var(--portal-border-muted);
  border-color: var(--portal-teal);
}
.help-accordion-item[open] > .help-accordion-summary {
  background: var(--portal-border-muted);
  border-color: var(--portal-purple);
  border-radius: var(--portal-radius) var(--portal-radius) 0 0;
  margin-bottom: 0;
}
.help-accordion-item[open] > .help-accordion-summary::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--portal-purple);
}
.help-accordion-panel {
  padding: 14px 18px 16px;
  background: var(--portal-surface);
  border: 1px solid var(--portal-border-muted);
  border-top: none;
  border-radius: 0 0 var(--portal-radius) var(--portal-radius);
}
.help-accordion-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--portal-text-muted);
  line-height: 1.55;
  font-size: 13px;
}
.help-accordion-panel li {
  margin: 6px 0;
}
.help-accordion-panel .help-prose {
  margin: 0;
  font-size: 13px;
  color: var(--portal-text-muted);
  line-height: 1.55;
}
.help-accordion-panel a {
  color: var(--portal-link);
}

.portal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-border);
  text-align: center;
}
.portal-footer p {
  margin: 0;
}
.portal-footer-copy {
  font-size: 12px;
  color: #666;
}
