:root {
  color-scheme: dark;
  --page: #252032;
  --sidebar: #30283f;
  --paper: #352c47;
  --input: #211a30;
  --text: #fdf6ff;
  --muted: #e3dff2;
  --edge: #19141f;
  --ink: #19141f;
  --yellow: #ffdb58;
  --lavender: #c4a1ff;
  --mint: #daf5f0;
  --green: #bafca2;
  --pink: #ffc0cb;
  --peach: #ffa07a;
  --blue: #87ceeb;
  --cream: #fdfd96;
  --focus: var(--yellow);
}
:root.light {
  color-scheme: light;
  --page: #ffdb58;
  --sidebar: #fff3e7;
  --paper: #fff3e7;
  --input: #fff;
  --text: #19141f;
  --muted: #423747;
  --focus: #702197;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  background-color: var(--page);
  background-image: radial-gradient(circle, var(--edge) 0.75px, transparent 0.9px);
  background-size: 15px 15px;
  color: var(--text);
  font: 1rem/1.55 system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  background: var(--sidebar);
  border-right: 3px solid var(--edge);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 4px 24px;
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -.04em;
}
.brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .08em;
}
.mark, .icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 2px solid var(--edge);
  border-radius: 7px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px var(--edge);
  font-style: normal;
  font-size: 1.3rem;
}
nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  margin: 4px 3px;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: .91rem;
  font-weight: 680;
}
nav a:hover, nav [aria-current=page] {
  border-color: var(--edge);
  background: var(--green);
  color: var(--ink);
  box-shadow: 3px 3px var(--edge);
}
nav i { width: 20px; text-align: center; font-style: normal; }
.navlabel, .eyebrow {
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.navlabel { margin: 20px 10px 6px; color: var(--muted); }
.aside-foot { margin-top: auto; padding: 24px 6px 0; color: var(--muted); font-size: .82rem; }
.aside-foot span { color: var(--text); }
header {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4%;
  border-bottom: 3px solid var(--edge);
  background: var(--sidebar);
  color: var(--muted);
  font-size: .91rem;
}
header b { margin: 0 7px; }
#crumb { color: var(--text); font-weight: 800; }
.content { max-width: 1320px; margin: auto; padding: 30px 4% 54px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 29%);
  align-items: center;
  gap: 24px;
  padding: clamp(21px, 3.5vw, 50px);
  background: var(--paper);
  color: var(--text);
  border: 2px solid var(--edge);
  border-radius: 20px;
  box-shadow: 4px 5px var(--edge);
}
.hero p { max-width: 35rem; }
.hero .button { margin-top: 8px; }
.eyebrow {
  display: inline-block;
  padding: 3px 8px;
  border: 2px solid var(--edge);
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
}
.shield-art {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 232px);
  aspect-ratio: 1;
}
.art-grid, .art-tile, .art-triangle, .art-circle { position: absolute; }
.art-grid {
  inset: 5% 65% 65% 0;
  background-color: var(--yellow);
  background-image: linear-gradient(to right, var(--edge) 1px, transparent 1px),
    linear-gradient(to bottom, var(--edge) 1px, transparent 1px);
  background-size: 13px 13px;
}
.art-tile {
  inset: 1% 5% auto auto;
  width: 28%;
  aspect-ratio: 1;
  border: 2px solid var(--edge);
  background: var(--green);
  box-shadow: 3px 3px var(--edge);
  transform: rotate(8deg);
}
.art-triangle {
  inset: auto auto 3% 2%;
  width: 45%;
  aspect-ratio: 1.2;
  background: var(--blue);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.art-circle {
  inset: auto 1% 9% auto;
  width: 31%;
  aspect-ratio: 1;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: #ff6b6b;
}
.lock {
  position: relative;
  width: 46%;
  aspect-ratio: 1.3;
  margin-top: 20%;
  border: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--lavender);
  box-shadow: 4px 4px var(--edge);
}
.lock::before {
  position: absolute;
  bottom: 100%;
  left: 21%;
  width: 58%;
  height: 70%;
  content: "";
  border: 2px solid var(--edge);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}
.lock::after {
  position: absolute;
  inset: 29% 43%;
  border-radius: 6px;
  background: var(--edge);
  content: "";
}
h1, h2, h3, p { margin: 0 0 12px; }
h1 { margin-top: 12px; font-size: clamp(2.1rem, 4.5vw, 4.2rem); line-height: 1; letter-spacing: -.065em; font-weight: 900; }
h2 { font-size: 1.6rem; letter-spacing: -.045em; }
h3 { font-size: 1.1rem; letter-spacing: -.025em; }
p, .muted { color: var(--muted); }
.button, button {
  display: inline-block;
  padding: 8px 13px;
  border: 2px solid var(--edge);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 3px 3px var(--edge);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.quiet { background: var(--mint); }
.button:hover, button:not(:disabled):hover { background: var(--peach); }
.button:active, button:not(:disabled):active { transform: translate(2px, 2px); box-shadow: 1px 1px var(--edge); }
button:disabled { opacity: .62; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
:root.light .grid :focus-visible { outline-color: var(--ink); }
.stats, .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stats { margin: 22px 0 30px; }
.card {
  display: block;
  padding: 17px;
  border: 2px solid var(--edge);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 4px 4px var(--edge);
  overflow-wrap: anywhere;
}
.card p:last-child { margin-bottom: 0; }
.stats strong { display: block; font-size: 1.65rem; line-height: 1.2; }
.stats .card, .grid .card { border-radius: 13px; box-shadow: 3px 4px var(--edge); }
.stats .card:nth-child(1) strong, .grid .card:nth-child(1) .icon { background: var(--mint); }
.stats .card:nth-child(2) strong, .grid .card:nth-child(2) .icon { background: var(--pink); }
.stats .card:nth-child(3) strong, .grid .card:nth-child(3) .icon { background: var(--lavender); }
.grid .card:nth-child(4) .icon { background: var(--blue); }
.grid .card:nth-child(5) .icon { background: var(--peach); }
.grid .card:nth-child(6) .icon { background: var(--green); }
.stats strong {
  display: table;
  margin-bottom: 7px;
  padding: 1px 8px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  color: var(--ink);
}
.card .icon { margin-bottom: 11px; }
.grid a:hover { transform: translate(-2px, -2px); box-shadow: 5px 6px var(--edge); }
.section-title {
  display: table;
  margin: 32px 0 13px;
  padding: 7px 13px;
  border: 2px solid var(--edge);
  border-radius: 8px;
  background: var(--paper);
}
.section-title h2 { margin: 0; }
.section-title p { margin: 0; }
.tool { max-width: 760px; margin-top: 22px; }
.tool form { display: grid; gap: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
label { display: grid; gap: 5px; font-weight: 700; }
input, select {
  min-width: 0;
  max-width: 100%;
  padding: 9px;
  border: 2px solid var(--edge);
  border-radius: 5px;
  background: var(--input);
  color: var(--text);
  font: inherit;
}
input[type=checkbox], input[type=radio] { accent-color: var(--lavender); }
.inline { display: flex; align-items: center; gap: 8px; }
.result:not(:empty) {
  margin-top: 16px;
  padding: 12px;
  border: 2px solid var(--edge);
  border-radius: 6px;
  background: var(--mint);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.result a { text-decoration: underline; }
.road { display: grid; gap: 12px; }
.road .card { display: flex; justify-content: space-between; gap: 12px; }
.road strong { color: var(--ink); background: var(--green); padding: 0 6px; border-radius: 3px; }
.lesson { margin-top: 14px; }
.lesson summary { cursor: pointer; font-weight: 800; }
.lesson[open] summary { margin-bottom: 10px; }
.lesson fieldset { min-width: 0; margin: 10px 0; border: 2px solid var(--edge); border-radius: 6px; }
.history { padding: 0; list-style: none; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--edge); }
.history time { display: block; color: var(--muted); font-size: .86rem; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mobile-nav-button, #nav-backdrop { display: none; }
.header-location { display: flex; align-items: center; gap: 12px; }
@media (max-width: 740px) {
  body { display: block; }
  #sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 11;
    width: min(300px, calc(100vw - 48px));
    height: 100%;
    visibility: hidden;
    transform: translateX(-100%);
  }
  #sidebar.is-open {
    visibility: visible;
    transform: none;
    box-shadow: 5px 0 var(--edge);
  }
  #sidebar .brand { margin-inline-end: 48px; }
  #nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10;
    background: rgba(25, 20, 31, .65);
  }
  body.nav-open { overflow: hidden; }
  .mobile-nav-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
  }
  #nav-close { position: absolute; top: 16px; right: 12px; font-size: 1.45rem; }
  header { min-height: 56px; }
  .content { padding-top: 20px; }
}
@media (max-width: 480px) {
  .hero { grid-template-columns: minmax(0, 1fr) 56px; gap: 9px; }
  .shield-art { align-self: start; margin-top: 6px; }
  .art-grid, .art-triangle { display: none; }
  .lock { width: 58%; }
  .stats { gap: 9px; }
  .stats .card { padding: 9px; font-size: .85rem; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .road .card { flex-wrap: wrap; }
}

.content:has(> .eyebrow) {
  min-height: calc(100vh - 67px);
  background: var(--paper);
}
@media (max-width: 390px) {
  .hero { display: block; }
  .shield-art { display: none; }
  h1 { overflow-wrap: anywhere; }
}

.password-output {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.password-output code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}
.password-output button {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
}
.password-output button:focus-visible { outline-color: var(--ink); }

#theme {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
}
.action-icon {
  display: inline-block;
  min-width: 1.15em;
  margin-inline-end: .15em;
  text-align: center;
}

.password-field { display: grid; gap: 5px; }
.password-input { position: relative; }
.password-input input {
  width: 100%;
  min-height: 48px;
  padding-inline-end: 50px;
}
.password-input button {
  position: absolute;
  inset-inline-end: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.password-input button:not(:disabled):hover {
  background: var(--paper);
}
.password-input button:not(:disabled):active {
  transform: translateY(-50%);
  box-shadow: none;
}
.password-input button:focus-visible { outline-offset: -4px; }
.password-input .eye-slash { display: none; }
.password-input input[type="text"] + button .eye-slash { display: inline; }

.tool textarea {
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 2px solid var(--edge);
  border-radius: 6px;
  background: var(--input);
  color: var(--text);
  font: .9rem/1.5 monospace;
  resize: vertical;
}
.tool fieldset { min-width: 0; border: 2px solid var(--edge); border-radius: 6px; }
#lab-completion:empty { display: none; }
.road a:hover { text-decoration: underline; }

.command-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px;
  background: var(--input);
  border: 2px solid var(--edge);
  border-radius: 6px;
}

.port-results { margin-top: 14px; overflow-x: auto; }
.port-results table { width: 100%; border-collapse: collapse; }
.port-results th, .port-results td {
  padding: 8px;
  text-align: start;
  border-bottom: 1px solid var(--edge);
  overflow-wrap: anywhere;
}

body.standalone-download { display: block; }
.standalone-download .content {
  width: min(100%, 860px);
  min-height: calc(100vh - 67px);
  background: var(--paper);
}
.standalone-download header a { font-weight: 800; }
