/* Common accessibility and small-screen defaults, loaded after page styles. */
:root {
  color-scheme: dark;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #c6ff6a;
  outline-offset: 4px;
}
main:focus {
  outline: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.btn,
.mini,
.labnode,
.controls button,
.choices button,
.steps button,
.simcontrols button,
.notes-controls button {
  min-height: 44px;
}
button {
  touch-action: manipulation;
}
input[type="search"],
#terminal-command {
  font-size: 16px;
}
a,
p,
h1,
h2,
h3,
dd {
  overflow-wrap: break-word;
}
.grid > *,
.workgrid > *,
.layout > *,
.simgrid > *,
.nowboard > * {
  min-width: 0;
}
.nav a,
.head nav a,
.head > a,
.nowcard a,
.item a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 1000;
  background: #c6ff6a;
  color: #112016;
  padding: 10px 16px;
  border-radius: 6px;
}
.skip-link:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.modal-open {
  overflow: hidden;
}
.no-script {
  color: #c6ff6a;
  padding-block: 12px;
}
@media (max-width: 650px) {
  .nav,
  .head {
    flex-wrap: wrap;
  }
  .head {
    height: auto;
    min-height: 72px;
    padding-block: 14px;
    gap: 6px 12px;
  }
  .head nav {
    flex-basis: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .head nav a:nth-child(2) {
    display: inline-flex;
  }
  .nav {
    gap: 8px 16px;
  }
  .demo,
  .console {
    padding: 20px;
  }
  .simcontrols {
    gap: 8px;
  }
  .simcontrols button {
    flex: 1 1 130px;
  }
  .choices button,
  .steps button {
    flex: 1 1 auto;
  }
  .footer {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Inline links need a non-color cue. */
p a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* The same status vocabulary appears on cards, stations and project pages. */
.project-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #668075;
  border-radius: 30px;
  background: #17312c;
  color: #d7efbd;
  font:
    600 12px/1.5 system-ui,
    sans-serif;
  letter-spacing: 0.02em;
}
.project-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 24px;
}
.project-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #b6f4d7;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-weight: 600;
}

/* v19: consistent touch and focus behavior */
a:focus-visible,summary:focus-visible{outline:3px solid #c6ff6a;outline-offset:3px}
@media(max-width:650px){.project-entry{gap:10px 14px}.project-entry a{padding-block:8px}}
