/* Synthwave chrome shared by every page: neon panels over a sunset grid. */
:root {
   --bg: #0d0221;
   --panel: rgba(16, 5, 42, .88);
   --pink: #ff3cac;
   --cyan: #05d9e8;
   --purple: #b967ff;
   --yellow: #fffb96;
   --orange: #ff9e3d;
   --text: #f2e9ff;
   --muted: #a99cc9;
   --line: rgba(185, 103, 255, .45);
   --display: "Orbitron", "Arial Black", sans-serif;
   --script: "Mr Dafoe", "Brush Script MT", cursive;
   --mono: "VT323", "Courier New", monospace;
   --body: "Chakra Petch", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
   background: var(--bg);
   color: var(--text);
   font: 16px/1.5 var(--body);
   padding-bottom: 40px;
   overflow-x: hidden;
}
/* faint CRT scanlines */
body::after {
   content: ""; position: fixed; inset: 0; z-index: 3000; pointer-events: none;
   background: repeating-linear-gradient(rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
}

a { color: var(--cyan); }
a:visited { color: var(--purple); }
b, strong { color: #fff; }

/* ---------- SUNSET SCENE ---------- */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden;
   background: linear-gradient(180deg, #0d0221 0%, #1d0b45 38%, #4a1366 58%, #0d0221 58.2%, #0d0221 100%); }
.scene .stars { position: absolute; inset: 0 0 42% 0;
   background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent),
      radial-gradient(1.5px 1.5px at 38% 30%, #fff, transparent), radial-gradient(1px 1px at 88% 34%, #fff, transparent),
      radial-gradient(1px 1px at 55% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 22% 42%, #fff, transparent),
      radial-gradient(1px 1px at 92% 6%, #fff, transparent), radial-gradient(1px 1px at 4% 30%, #fff, transparent);
   opacity: .7; }
.scene .sun {
   position: absolute; left: 50%; top: 58%;
   width: min(70vw, 520px); aspect-ratio: 1;
   transform: translate(-50%, -62%);
   border-radius: 50%;
   background: linear-gradient(180deg, var(--yellow) 0%, var(--orange) 40%, var(--pink) 75%, #b0127a 100%);
   -webkit-mask: linear-gradient(#000 0 50%, transparent 0), repeating-linear-gradient(#000 0 12px, transparent 12px 18px);
           mask: linear-gradient(#000 0 50%, transparent 0), repeating-linear-gradient(#000 0 12px, transparent 12px 18px);
   filter: drop-shadow(0 0 40px rgba(255, 60, 172, .55));
}
.scene .peak { position: absolute; left: 0; right: 0; top: 58%; transform: translateY(-100%); width: 100%; height: 14vh; }
.scene .floor { position: absolute; left: -50%; right: -50%; top: 58%; bottom: 0; perspective: 300px; }
.scene .floor::before {
   content: ""; position: absolute; inset: 0 0 -100% 0;
   background-image: linear-gradient(var(--pink) 2px, transparent 2px), linear-gradient(90deg, var(--pink) 2px, transparent 2px);
   background-size: 70px 70px;
   transform: rotateX(62deg); transform-origin: top;
   animation: gridRun 3s linear infinite;
   opacity: .55;
   -webkit-mask: linear-gradient(transparent, #000 25%); mask: linear-gradient(transparent, #000 25%);
}
@keyframes gridRun { to { background-position: 0 70px; } }

/* ---------- PANELS ("windows") ---------- */
.win {
   background: var(--panel);
   border: 1px solid var(--line);
   border-radius: 4px;
   box-shadow: 0 0 0 1px rgba(5, 217, 232, .12), 0 0 28px rgba(255, 60, 172, .22);
   min-width: 0;
   overflow: hidden;
}
.titlebar {
   display: flex; align-items: center; justify-content: space-between; gap: 8px;
   padding: 7px 10px;
   background: linear-gradient(90deg, rgba(255, 60, 172, .38), rgba(185, 103, 255, .18) 60%, rgba(5, 217, 232, .12));
   border-bottom: 1px solid var(--line);
   font: 700 12px/1.2 var(--display);
   letter-spacing: .14em; text-transform: uppercase; color: #fff;
   text-shadow: 0 0 8px var(--pink);
   user-select: none;
}
.titlebar .t { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar .t svg { flex: none; }
.titlebar .ctl { display: flex; gap: 4px; flex: none; }
.titlebar .ctl button {
   width: 22px; height: 20px; padding: 0;
   display: grid; place-items: center;
   background: transparent; color: var(--cyan);
   border: 1px solid rgba(5, 217, 232, .6); border-radius: 2px;
   font: 700 12px/1 var(--display); cursor: pointer;
}
.titlebar .ctl button:hover { background: rgba(5, 217, 232, .18); }
.win.inactive .titlebar { filter: saturate(.55); }

.body { padding: 14px; }
.win.min .body, .win.min .sunken, .win.min .statusbar { display: none; }
.win > .sunken { margin: 12px; }

.statusbar {
   display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
   padding: 4px 12px 6px;
   border-top: 1px dashed var(--line);
   font: 17px/1.2 var(--mono); color: var(--muted);
}

/* ---------- CONTROLS ---------- */
.btn {
   display: inline-flex; align-items: center; justify-content: center; gap: 8px;
   min-height: 42px; padding: 10px 16px;
   background: rgba(5, 217, 232, .06); color: var(--cyan);
   border: 1px solid var(--cyan); border-radius: 3px;
   font: 700 12px/1.1 var(--display); letter-spacing: .12em; text-transform: uppercase;
   text-decoration: none; cursor: pointer;
   box-shadow: 0 0 10px rgba(5, 217, 232, .3), inset 0 0 10px rgba(5, 217, 232, .15);
   transition: background .15s, box-shadow .15s;
}
.btn:visited { color: var(--cyan); }
.btn:hover { background: rgba(5, 217, 232, .18); box-shadow: 0 0 18px rgba(5, 217, 232, .55), inset 0 0 12px rgba(5, 217, 232, .25); }
.btn:active, .btn.pressed { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.btn.default, .btn.default:visited {
   color: #fff; border-color: var(--pink);
   background: linear-gradient(90deg, var(--pink), var(--purple));
   box-shadow: 0 0 18px rgba(255, 60, 172, .55);
   text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.btn.default:hover { box-shadow: 0 0 28px rgba(255, 60, 172, .85); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.sunken {
   background: rgba(0, 0, 0, .38);
   border: 1px solid rgba(185, 103, 255, .3);
   border-radius: 3px;
   padding: 12px;
}
input[type=text], select {
   font: 16px var(--body); color: var(--text);
   background: var(--bg);
   border: 1px solid var(--cyan); border-radius: 3px;
   padding: 7px 8px; min-height: 40px;
}
label { font: 700 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-right: 6px; }

.progress { height: 20px; padding: 3px; border: 1px solid var(--cyan); border-radius: 2px; box-shadow: 0 0 10px rgba(5, 217, 232, .3); }
.progress > div {
   height: 100%;
   background: repeating-linear-gradient(90deg, var(--pink) 0 10px, transparent 10px 13px);
   filter: drop-shadow(0 0 4px var(--pink));
}
hr.etched { border: 0; height: 1px; margin: 14px 0; background: linear-gradient(90deg, transparent, var(--pink), transparent); }

/* ---------- ICON TILES ---------- */
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.icon {
   display: flex; flex-direction: column; align-items: center; gap: 6px;
   padding: 10px 4px;
   color: var(--text); text-decoration: none; text-align: center;
   font: 700 10px/1.25 var(--display); letter-spacing: .08em; text-transform: uppercase;
   background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer;
}
.icon:visited { color: var(--text); }
.icon svg, .icon img { width: 36px; height: 36px; filter: drop-shadow(0 0 6px rgba(5, 217, 232, .55)); }
.icon:hover, .icon:focus-visible { border-color: var(--cyan); background: rgba(5, 217, 232, .08); color: var(--cyan); outline: none; box-shadow: 0 0 12px rgba(5, 217, 232, .35); }
nav.icons .icon { background: rgba(16, 5, 42, .7); border-color: rgba(185, 103, 255, .35); }

/* ---------- DIALOGS ---------- */
.dialog-backdrop {
   position: fixed; inset: 0; z-index: 2000;
   display: grid; place-items: center; padding: 16px;
   background: rgba(13, 2, 33, .72);
   -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.dialog-backdrop[hidden] { display: none; }
.dialog { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 0 40px rgba(255, 60, 172, .45); }
.dialog .body { display: flex; gap: 14px; align-items: flex-start; }
.dialog .body img.photo { max-width: 100%; max-height: 45vh; display: block; margin: 0 auto 10px; border: 1px solid var(--line); }
.dialog .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }

/* ---------- SECTION HEADINGS ---------- */
.section-h {
   display: flex; align-items: center; gap: 14px;
   margin: 22px 0 0;
   font: italic 900 clamp(20px, 4vw, 28px)/1.1 var(--display);
   color: #fff; text-shadow: 0 0 10px var(--pink);
}
.section-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--pink), transparent); }
.section-h small { font: 20px var(--mono); font-style: normal; color: var(--muted); text-shadow: none; }

/* ---------- KEY FACTS ---------- */
.keyfacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .keyfacts { grid-template-columns: 1fr; } }
.fact {
   display: flex; flex-direction: column; gap: 4px;
   padding: 16px;
   background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
   box-shadow: 0 0 22px rgba(255, 60, 172, .2);
}
.fact .k { font: 700 11px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--pink); text-shadow: 0 0 6px var(--pink); }
.fact .v { font: 900 clamp(20px, 2.6vw, 26px)/1.15 var(--display); color: #fff; }
.fact .s { color: var(--muted); flex: 1; }
.fact .btn { margin-top: 10px; width: 100%; }

/* ---------- PAGE CARDS ---------- */
.pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
a.page-card {
   display: grid; grid-template-columns: 52px 1fr; gap: 4px 14px; align-content: start;
   padding: 18px;
   background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
   color: var(--text); text-decoration: none;
   box-shadow: 0 0 22px rgba(255, 60, 172, .18);
   transition: transform .15s, border-color .15s, box-shadow .15s;
}
a.page-card:visited { color: var(--text); }
a.page-card:hover, a.page-card:focus-visible { transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 0 26px rgba(5, 217, 232, .45); outline: none; }
a.page-card svg { grid-row: span 3; width: 52px; height: 52px; filter: drop-shadow(0 0 8px rgba(5, 217, 232, .6)); }
a.page-card h3 { margin: 0; font: 900 17px/1.2 var(--display); letter-spacing: .04em; text-transform: uppercase; color: #fff; }
a.page-card p { margin: 0; color: var(--muted); font-size: 15px; }
a.page-card .go { font: 21px/1 var(--mono); color: var(--cyan); margin-top: 8px; }
a.page-card.primary { border-color: var(--pink); background: linear-gradient(135deg, rgba(255, 60, 172, .3), rgba(185, 103, 255, .2)), var(--panel); }
a.page-card.primary .go { color: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
   *, *::before, *::after { animation: none !important; transition: none !important; }
}
