/* Tropical sunset theme: purple night, hot pink, orange sun, teal water.
   The stripes double as the "still hidden" bars. All original; no game artwork. */
:root {
  --night: #2a0a3d;
  --deep: #1b0629;
  --sheet: #3a1152;
  --line: #6a2f86;
  --text: #fff4f8;
  --soft: #e3b9d6;
  --coral: #ff3d9a;
  --sun: #ffb347;
  --sea: #22e0d0;
  --focus: #ffffff;
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; background: var(--night); color: var(--text); font-family: var(--body); line-height: 1.5; }
a { color: var(--sun); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; background: var(--deep); border-bottom: 1px solid var(--line); }
.bar .top { display: flex; align-items: center; gap: 1rem; padding-top: .55rem; padding-bottom: .35rem; }
.bar .name { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.bar .meter { flex: 1; height: .5rem; background: var(--sheet); border-radius: 1rem; overflow: hidden; }
.bar .meter i { display: block; height: 100%; width: 0; background: var(--sun); transition: width .3s ease; }
.bar .pct { font-variant-numeric: tabular-nums; min-width: 3rem; text-align: right; }
.bar .lang { font-size: .9rem; }
.bar nav { display: flex; gap: 1.1rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { color: var(--soft); text-decoration: none; white-space: nowrap; font-size: .93rem; padding: .15rem 0; border-bottom: 2px solid transparent; }
.bar nav a:hover { color: var(--text); }
.bar nav a[aria-current=page] { color: var(--text); border-bottom-color: var(--coral); }

/* hero: sunset sky with a slatted sun */
.sky { position: relative; overflow: hidden; background: linear-gradient(180deg, #2a0a3d 0%, #6b1570 38%, #d6247f 72%, #ff7a59 100%); border-bottom: 4px solid var(--sea); }
.sun { position: absolute; right: -3rem; bottom: -7rem; width: 19rem; height: 19rem; border-radius: 50%;
  background: linear-gradient(180deg, #ffe36e 0%, #ffb347 45%, #ff5fa8 100%);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 1.15rem, transparent 1.15rem 1.6rem);
  mask-image: repeating-linear-gradient(180deg, #000 0 1.15rem, transparent 1.15rem 1.6rem); opacity: .9; }
.hero { position: relative; padding: 2.75rem 1.25rem 2.25rem; }
.hero h1 { text-shadow: 0 2px 0 rgba(27, 6, 41, .45); }
.sky .hero p { color: #fff4f8; text-shadow: 0 1px 3px rgba(27, 6, 41, .75); }
@media (max-width: 640px) { .sun { width: 12rem; height: 12rem; right: -4rem; bottom: -5rem; opacity: .6; } }
.hero h1 { font-family: var(--display); font-size: clamp(2.2rem, 7vw, 3.7rem); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 1.1rem; max-width: 22ch; text-wrap: balance; }
.hero p { max-width: 34rem; margin: 0; color: var(--soft); }
.hero .stripes { margin: 0 0 1.1rem; }
.stripe { display: block; height: clamp(1rem, 3vw, 1.5rem); margin: .3rem 0; border-radius: 2px; transform-origin: left; transition: opacity .35s ease, transform .35s ease; }
.stripe:nth-child(1) { background: var(--sea); width: 60%; }
.stripe:nth-child(2) { background: #fff4f8; width: 44%; }
.stripe:nth-child(3) { background: var(--sun); width: 52%; }
.stripe:nth-child(4) { background: var(--sea); width: 30%; }
.stripe.open { opacity: .18; transform: scaleX(.5); }

main section { padding: 1.4rem 0; }
h2 { font-family: var(--display); font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 1.3rem 0 .35rem; color: var(--sun); font-weight: 700; }
h4 { font-size: .95rem; margin: 1rem 0 .3rem; color: var(--sea); }
.note { color: var(--soft); font-size: .94rem; margin: .3rem 0 0; }

/* still-hidden bars */
.redacted { display: block; height: .95em; border-radius: 2px; margin: .45em 0; background: var(--line); }
.locked { margin-top: 1.2rem; }
.locked .redacted:nth-child(3n) { width: 62%; }
.locked .redacted:nth-child(3n+1) { width: 84%; background: #52206b; }
.locked .redacted:nth-child(3n+2) { width: 47%; }

/* controls */
input, select, button { font: inherit; color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .75rem; }
input[type=search] { width: 100%; margin-top: .7rem; font-size: 1.05rem; padding: .7rem .9rem; border-color: var(--soft); }
input::placeholder { color: var(--soft); }
button { cursor: pointer; font-weight: 700; border-color: var(--soft); }
button:hover { border-color: var(--sun); }
button.primary { background: var(--coral); border-color: var(--coral); color: #2a0320; }
button.primary:hover { background: var(--sun); border-color: var(--sun); }
button.wide { width: 100%; margin-top: 1.4rem; padding: .8rem; font-size: 1.05rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .7rem; }
.results { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.results .hit { text-align: left; border-color: var(--sea); }
details { margin-top: .8rem; }
summary { cursor: pointer; color: var(--soft); }

/* current quest briefing */
.brief, main section.brief { background: var(--sheet); border: 1px solid var(--line); border-top: 6px solid var(--coral); border-radius: 10px; padding: 1.3rem 1.25rem 1.4rem; margin: .6rem 0; }
.brief.empty { border-top-color: var(--line); color: var(--soft); }
.brief .kicker { margin: 0; color: var(--coral); font-weight: 700; font-size: .93rem; }
.brief h2.quest { font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.08; margin: .15rem 0 .3rem; }
.facts { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: 1rem 0 0; }
.facts div { max-width: 11rem; }
.facts dt { font-family: var(--display); font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--sun); }
.facts dd { margin: .2rem 0 0; color: var(--soft); font-size: .88rem; }
.guide summary { color: var(--text); font-weight: 700; }
.guide ol { padding-left: 1.3rem; }
.guide li { margin: .35rem 0; }
.spoiler { margin-top: 1.4rem; padding: 1rem; border: 1px dashed var(--coral); border-radius: 8px; }
.spoiler h3 { margin-top: 0; color: var(--coral); }
.spoiler button { margin-top: .6rem; }
.spoiler .t { font-weight: 700; margin: .6rem 0 0; }

/* lists */
ul.plain { margin: .2rem 0; padding-left: 1.2rem; }
ul.items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
ul.items li { border-bottom: 1px solid var(--line); }
ul.items li { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; padding: .7rem .2rem; }
ul.items .open { background: none; border: 0; border-radius: 4px; padding: 0; text-align: left; font-weight: 400; color: inherit; }
ul.items .open:hover .t { text-decoration: underline; text-decoration-color: var(--sun); }
ul.items input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; padding: 0; accent-color: var(--sea); }
ul.items .t { font-weight: 700; }
ul.items .h { display: block; color: var(--soft); font-size: .92rem; }
ul.items .m { color: var(--soft); font-size: .9rem; white-space: nowrap; }
ul.items li.done .t { text-decoration: line-through; color: var(--soft); }
.group h3 { color: var(--soft); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 1rem; }
.more { display: inline-block; margin-top: .9rem; font-weight: 700; }
.empty { padding: 1rem 0; color: var(--soft); }

/* planner and calculators */
.plan, main section.plan { background: var(--sun); color: #2b2204; border-radius: 10px; padding: 1.25rem; margin: 1rem 0; }
.plan.alt { background: var(--sea); color: #06241f; }
.plan h2 { color: inherit; }
.plan .note { color: inherit; opacity: .8; }
.plan input, .plan select { background: #fffdf6; color: #1b1b1b; border-color: #1b1b1b; }
.plan input[type=number] { width: 7rem; }
.plan button.primary { background: var(--deep); border-color: var(--deep); color: var(--text); }
.plan ol { margin: 1rem 0 0; padding-left: 1.3rem; }
.plan .result { font-family: var(--display); font-size: 1.35rem; font-weight: 700; margin: .9rem 0 0; }
.plan .redacted { background: rgba(0, 0, 0, .25); }

/* articles: tips, facts, builds, story page */
button.entry { display: block; width: 100%; text-align: left; font-weight: 400; background: var(--sheet); border: 1px solid var(--line); border-left: 5px solid var(--sea); border-radius: 8px; padding: .9rem 1rem; margin: .8rem 0; }
button.entry:nth-child(3n+2) { border-left-color: var(--sun); }
button.entry:nth-child(3n) { border-left-color: var(--coral); }
button.entry:hover { border-color: var(--sun); }
.entry .et { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 700; }
.entry .ep { display: block; color: var(--soft); margin: .25rem 0; max-width: 38rem; }
.entry .more { margin-top: .3rem; color: var(--sun); font-size: .92rem; }

.share canvas { width: 100%; max-width: 22rem; height: auto; border-radius: 10px; display: block; margin: .8rem 0; border: 1px solid var(--line); }

footer { padding: 2.2rem 0 3rem; color: var(--soft); font-size: .88rem; border-top: 1px solid var(--line); margin-top: 2rem; }
footer p { margin: .3rem 0; max-width: 40rem; }

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

/* confidence marks */
.conf { display: inline-block; min-width: 1.35rem; padding: 0 .3rem; border-radius: 1rem; font: 700 .72rem/1.35rem var(--body); text-align: center; vertical-align: middle; cursor: help; letter-spacing: 0; }
.conf.low { background: #ff4d4d; color: #2a0000; }
.conf.mid { background: #ffd23f; color: #2b2204; }
.conf.high { background: #3ddc84; color: #04260f; }
.legend { margin: 2.5rem 0 0; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
.legend summary { color: var(--text); font-weight: 700; }
.legend ul { list-style: none; padding: 0; margin: .6rem 0 0; }
.legend li { margin: .45rem 0; }
.legend p { color: var(--soft); margin: .6rem 0 0; max-width: 38rem; }

/* site tagline */
.bar .name .tag { font-family: var(--body); font-weight: 400; font-size: .8rem; color: var(--sun); margin-left: .35rem; white-space: nowrap; }

/* mission slider */
.slider { margin-top: 1.2rem; padding: 1rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; }
.slider label { display: block; font-weight: 700; }
.slider input[type=range] { width: 100%; padding: 0; margin: .7rem 0 .4rem; border: 0; background: none; accent-color: var(--coral); }
.slider output { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: var(--sun); }

/* detail dialog */
dialog.detail { width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0; border: 1px solid var(--line); border-top: 6px solid var(--coral); border-radius: 12px; background: var(--sheet); color: var(--text); }
dialog.detail::backdrop { background: rgba(15, 3, 24, .78); }
dialog.detail .inner { position: relative; padding: 1.5rem 1.4rem 1.6rem; }
dialog.detail h2 { font-size: 1.7rem; line-height: 1.1; margin-right: 2.5rem; }
dialog.detail .kicker { margin: 0 0 .2rem; color: var(--coral); font-weight: 700; font-size: .93rem; }
dialog.detail .close { position: absolute; top: .8rem; right: .8rem; width: 2.4rem; height: 2.4rem; padding: 0; font-size: 1.5rem; line-height: 1; }
dialog.detail img { display: block; max-width: 100%; border-radius: 8px; margin-top: .6rem; }

/* palms on wide screens */
.palm { display: none; }
@media (min-width: 1250px) {
  .palm { display: block; position: fixed; bottom: -1rem; width: clamp(11rem, 16vw, 19rem); height: auto; fill: #4a1763; opacity: .9; pointer-events: none; z-index: 0; }
  .palm.left { left: 1vw; }
  .palm.right { right: 1vw; transform: scaleX(-1); }
  main, footer, .sky { position: relative; z-index: 1; }
  footer { background: var(--night); }
}

/* submission form */
.submit form { display: grid; gap: 1.1rem; margin-top: 1rem; max-width: 38rem; }
.field label { display: block; font-weight: 700; }
.field .note { margin: .15rem 0 .4rem; }
.field input, .field select, .field textarea { width: 100%; }
textarea { font: inherit; color: var(--text); background: var(--deep); border: 1px solid var(--line); border-radius: 6px; padding: .6rem .75rem; resize: vertical; }
.field input:focus, .field select:focus, textarea:focus { border-color: var(--sun); }
label.check { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; }
label.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; padding: 0; flex: none; accent-color: var(--coral); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { font-weight: 700; color: var(--sun); min-height: 1.5em; margin: 0; }
.thanks { margin-top: 1rem; padding: 1.2rem; background: var(--sheet); border: 1px solid var(--sea); border-left: 5px solid var(--sea); border-radius: 8px; }
.thanks p { margin: 0 0 .8rem; font-size: 1.05rem; }
button:disabled { opacity: .6; cursor: wait; }
dialog.detail .report { display: inline-block; margin-top: 1.4rem; font-size: .92rem; }

/* privacy and other text pages */
.prose { max-width: 40rem; padding: 1rem 0 0; }
.prose h2 { font-size: 1.2rem; margin: 1.6rem 0 .3rem; }
.prose p { margin: 0; color: var(--text); }
