/* =========================================================================
   Stick Fight Arena -- shared chrome for the status page and admin area.
   The game canvas does not use this file; it ships its own minimal styles.
   ========================================================================= */

:root {
  /* Brand palette. The two accents are the fighters: orange is the Hothead,
     cyan is the Cowardly Genius, and everything else in the identity is
     built from those two against near-black. */
  --hot:        #ff5a3c;
  --cool:       #39c7ff;
  --bg:         #0e1016;
  --bg-2:       #12151f;
  --panel:      #161a24;
  --panel-2:    #1b2030;
  --line:       #252b3c;
  --line-soft:  #1e2432;
  --ink:        #e7eaf2;
  --ink-dim:    #a3abc0;
  --ink-mute:   #737d94;
  --ok:         #46d39a;
  --warn:       #ffb020;
  --bad:        #ff4d6a;

  --radius:     14px;
  --radius-sm:  9px;
  --maxw:       960px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 12% -8%,  rgba(255, 90, 60, .13), transparent 60%),
    radial-gradient(900px  560px at 92% 4%,   rgba(57, 199, 255, .11), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--cool); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #7bd9ff; }

code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: .08em .38em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 2rem) 4rem;
}

/* ------------------------------------------------------------ masthead -- */

.masthead { margin-bottom: 2.5rem; }

.brand { display: flex; align-items: center; gap: 1rem; }
.brand-mark { display: block; flex: none; }

.brand-text h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4.6vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -.022em;
  font-weight: 800;
  background: linear-gradient(96deg, var(--hot) 8%, #ffd0a0 46%, var(--cool) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: .2rem 0 0;
  color: var(--ink-mute);
  font-size: .94rem;
  font-style: italic;
}

.lede {
  margin: 1.4rem 0 0;
  max-width: 62ch;
  color: var(--ink-dim);
  font-size: 1.02rem;
}

/* -------------------------------------------------------------- bars ---- */

.bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.bar-lg { height: 14px; }

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hot), var(--cool));
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
}

/* --------------------------------------------------------- overall box -- */

.overall {
  margin: 2.2rem 0 1.6rem;
  padding: clamp(1.1rem, 3vw, 1.7rem);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.overall-row { display: flex; gap: clamp(1rem, 4vw, 2rem); align-items: center; flex-wrap: wrap; }

.overall-figure { flex: none; min-width: 8.5rem; }

.pct {
  display: block;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.pct-sign { font-size: .45em; font-weight: 700; color: var(--ink-mute); margin-left: .08em; }
.pct-sub  { display: block; margin-top: .3rem; font-size: .82rem; color: var(--ink-mute); }

.overall-bar-wrap { flex: 1 1 18rem; min-width: 0; }
.overall-now { margin: .85rem 0 0; color: var(--ink-dim); font-size: .95rem; }
.overall-now strong { color: var(--ink); }

/* --------------------------------------------------------- environment -- */

.env { margin-bottom: 2.6rem; }

.env-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.env-list li {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .8rem;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: .86rem;
  min-width: 0;
}

.env-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-mute); }
.env-list li.ok   .env-dot { background: var(--ok);   box-shadow: 0 0 0 3px rgba(70, 211, 154, .16); }
.env-list li.warn .env-dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 176, 32, .16); }

.env-label { color: var(--ink-mute); }
.env-value {
  margin-left: auto; font-family: var(--mono); font-size: .8rem;
  color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --------------------------------------------------------------- plan --- */

.plan h2 {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  font-weight: 700;
}

.milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }

.milestone {
  padding: 1.05rem clamp(.9rem, 3vw, 1.3rem);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--line);
}
.milestone.is-done    { border-left-color: var(--ok); }
.milestone.is-active  { border-left-color: var(--hot); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.milestone.is-blocked { border-left-color: var(--bad); }

.ms-head { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: .85rem; }

.ms-index {
  flex: none;
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-mute);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .24rem .42rem;
  margin-top: .12rem;
}
.milestone.is-active .ms-index { color: var(--hot); border-color: rgba(255, 90, 60, .42); }
.milestone.is-done   .ms-index { color: var(--ok);  border-color: rgba(70, 211, 154, .38); }

.ms-title { flex: 1 1 auto; min-width: 0; }
.ms-title h3 { margin: 0; font-size: 1.06rem; font-weight: 700; letter-spacing: -.01em; }
.ms-title p  { margin: .12rem 0 0; font-size: .875rem; color: var(--ink-mute); }

.ms-state {
  flex: none;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .6rem;
  white-space: nowrap;
  margin-top: .15rem;
}
.milestone.is-done    .ms-state { color: var(--ok);  border-color: rgba(70, 211, 154, .38); }
.milestone.is-active  .ms-state { color: var(--hot); border-color: rgba(255, 90, 60, .42); }
.milestone.is-blocked .ms-state { color: var(--bad); border-color: rgba(255, 77, 106, .42); }

/* -------------------------------------------------------------- tasks --- */

.tasks {
  list-style: none;
  margin: .9rem 0 0;
  padding: 0;
  display: grid;
  gap: .32rem;
}

.task {
  display: flex; align-items: baseline; gap: .6rem;
  font-size: .9rem;
  color: var(--ink-mute);
}

.tick {
  flex: none;
  width: 13px; height: 13px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  background: transparent;
  position: relative;
  top: 2px;
}

.task.is-done  { color: var(--ink-dim); }
.task.is-done .tick {
  border-color: var(--ok);
  background: var(--ok);
}
/* Checkmark drawn with borders so it needs no icon font or SVG request. */
.task.is-done .tick::after {
  content: "";
  position: absolute;
  left: 3.5px; top: .5px;
  width: 3.5px; height: 7px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.task.is-active { color: var(--ink); }
.task.is-active .tick {
  border-color: var(--hot);
  background: repeating-linear-gradient(45deg, var(--hot) 0 2px, transparent 2px 4px);
}

.task.is-blocked { color: var(--bad); }
.task.is-blocked .tick { border-color: var(--bad); background: rgba(255, 77, 106, .2); }

.task-text { min-width: 0; }

/* --------------------------------------------------------------- foot --- */

.foot {
  margin-top: 2.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  align-items: baseline; justify-content: space-between;
  font-size: .82rem;
  color: var(--ink-mute);
}
.foot p { margin: 0; }
.foot-links { display: flex; gap: 1rem; }

/* ------------------------------------------------------------- motion --- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------------------------------------------------- generated ---- */
/* generated: progress-bar widths, 0-100 */
.w-0{width:0%}
.w-1{width:1%}
.w-2{width:2%}
.w-3{width:3%}
.w-4{width:4%}
.w-5{width:5%}
.w-6{width:6%}
.w-7{width:7%}
.w-8{width:8%}
.w-9{width:9%}
.w-10{width:10%}
.w-11{width:11%}
.w-12{width:12%}
.w-13{width:13%}
.w-14{width:14%}
.w-15{width:15%}
.w-16{width:16%}
.w-17{width:17%}
.w-18{width:18%}
.w-19{width:19%}
.w-20{width:20%}
.w-21{width:21%}
.w-22{width:22%}
.w-23{width:23%}
.w-24{width:24%}
.w-25{width:25%}
.w-26{width:26%}
.w-27{width:27%}
.w-28{width:28%}
.w-29{width:29%}
.w-30{width:30%}
.w-31{width:31%}
.w-32{width:32%}
.w-33{width:33%}
.w-34{width:34%}
.w-35{width:35%}
.w-36{width:36%}
.w-37{width:37%}
.w-38{width:38%}
.w-39{width:39%}
.w-40{width:40%}
.w-41{width:41%}
.w-42{width:42%}
.w-43{width:43%}
.w-44{width:44%}
.w-45{width:45%}
.w-46{width:46%}
.w-47{width:47%}
.w-48{width:48%}
.w-49{width:49%}
.w-50{width:50%}
.w-51{width:51%}
.w-52{width:52%}
.w-53{width:53%}
.w-54{width:54%}
.w-55{width:55%}
.w-56{width:56%}
.w-57{width:57%}
.w-58{width:58%}
.w-59{width:59%}
.w-60{width:60%}
.w-61{width:61%}
.w-62{width:62%}
.w-63{width:63%}
.w-64{width:64%}
.w-65{width:65%}
.w-66{width:66%}
.w-67{width:67%}
.w-68{width:68%}
.w-69{width:69%}
.w-70{width:70%}
.w-71{width:71%}
.w-72{width:72%}
.w-73{width:73%}
.w-74{width:74%}
.w-75{width:75%}
.w-76{width:76%}
.w-77{width:77%}
.w-78{width:78%}
.w-79{width:79%}
.w-80{width:80%}
.w-81{width:81%}
.w-82{width:82%}
.w-83{width:83%}
.w-84{width:84%}
.w-85{width:85%}
.w-86{width:86%}
.w-87{width:87%}
.w-88{width:88%}
.w-89{width:89%}
.w-90{width:90%}
.w-91{width:91%}
.w-92{width:92%}
.w-93{width:93%}
.w-94{width:94%}
.w-95{width:95%}
.w-96{width:96%}
.w-97{width:97%}
.w-98{width:98%}
.w-99{width:99%}
.w-100{width:100%}
