/* ------------------------------------------------------------------
   Bauhaus structure × Baroque light
   12-column skeleton, solid colour blocks, 4–6px rules, zero radius.
   Jost is self-hosted from Google Fonts (latin + latin-ext subsets).
------------------------------------------------------------------- */

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --bg: #1b1511;
  --bg: oklch(0.16 0.015 50);
  --surface: #2a211b;
  --surface: oklch(0.22 0.025 45);
  --ink: #f1e6d2;
  --ink: oklch(0.92 0.03 80);
  --muted: #c1ad91;
  --muted: oklch(0.74 0.04 75);
  --line: #b39258;
  --line: oklch(0.62 0.1 75);
  --accent: #8d2f29;
  --accent: oklch(0.45 0.15 25);
  --on-accent: #f7ecd7;
  --on-accent: oklch(0.95 0.02 80);
  --accent2: #d2a65d;
  --accent2: oklch(0.72 0.12 78);
  --accent3: #b78d75;
  --accent3: oklch(0.68 0.07 50);
  --beam-strength: 0.4;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --fast: 200ms var(--ease);
  --pad: clamp(18px, 2.2vw, 34px);
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  color-scheme: dark;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

/* --- the single side light, vignette, and a fine grain ------------- */

.light-beam,
.vignette,
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.light-beam {
  background:
    linear-gradient(
      112deg,
      rgba(255, 220, 170, 0.36) 0%,
      rgba(255, 220, 170, 0.13) 19%,
      rgba(255, 220, 170, 0.03) 34%,
      transparent 48%
    ),
    radial-gradient(
      ellipse at 12% 14%,
      rgba(255, 214, 158, 0.2),
      transparent 54%
    );
  opacity: var(--beam-strength);
  mix-blend-mode: screen;
}

.vignette {
  background:
    radial-gradient(
      ellipse at 44% 34%,
      transparent 26%,
      rgba(7, 5, 4, 0.32) 63%,
      rgba(4, 3, 2, 0.68) 100%
    );
}

.grain {
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* --- shared type --------------------------------------------------- */

.micro,
.kicker,
.section-note,
.rail-sub,
.rail-index,
.bot-note p,
.log-meta,
.footer,
.mini-head,
.info-item span,
.mini-stat span {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  margin: 0;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display {
  margin: 0;
  font-size: clamp(94px, 12.2vw, 178px);
  font-weight: 700;
  line-height: 0.76;
  letter-spacing: -0.06em;
  color: var(--on-accent);
  text-align: left;
}

.masthead,
.frame {
  width: min(1560px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

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

.masthead {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 0;
  padding: 20px 0 13px;
  border-bottom: 6px solid var(--line);
}

.masthead-brand {
  grid-column: span 6;
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.brand-seal {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
}

.seal-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent2);
}

.seal-square {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  background: var(--accent);
}

.seal-triangle {
  position: absolute;
  right: 15px;
  top: 5px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid var(--accent3);
}

.brand-copy {
  min-width: 0;
}

.masthead .micro {
  margin: 0 0 4px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 0.95;
  white-space: nowrap;
}

.masthead h1 span {
  color: var(--accent2);
}

.masthead-note {
  grid-column: span 3;
  align-self: end;
  padding-left: 14px;
  border-left: 4px solid var(--line);
  min-width: 0;
}

.masthead-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead-note p + p {
  margin-top: 2px;
  color: var(--ink);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.note-rule {
  display: block;
  width: 32px;
  height: 4px;
  margin-bottom: 7px;
  background: var(--accent2);
}

.masthead-actions {
  grid-column: span 3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border-left: 4px solid var(--accent2);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.live-pill i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent2);
}

.live-pill.warn {
  border-left-color: var(--accent3);
}

.live-pill.warn i {
  background: var(--accent3);
}

.live-pill.bad {
  border-left-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.live-pill.bad i {
  background: var(--on-accent);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  transition: background var(--fast), color var(--fast), transform var(--fast);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--fast);
}

.icon-btn:hover {
  background: var(--accent2);
  color: var(--bg);
}

.icon-btn:hover svg {
  transform: rotate(90deg);
}

.icon-btn:active {
  transform: translate(2px, 2px);
}

.icon-btn.small {
  width: 34px;
  height: 34px;
}

.icon-btn.spinning svg {
  transform: rotate(90deg);
}

/* --- the 12-column frame ------------------------------------------ */

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
}

.notice {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: start;
  padding: 11px 14px;
  background: var(--surface);
  border-bottom: 4px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.notice-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.notice div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notice strong {
  margin-right: 8px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.notice button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  padding: 0;
  transition: color var(--fast), transform var(--fast);
}

.notice button:hover {
  color: var(--accent2);
  transform: rotate(90deg);
}

.notice.hidden {
  display: none;
}

.band {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  position: relative;
  border-top: 6px solid var(--line);
}

.section-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0 13px;
  border-bottom: 4px solid var(--line);
}

.section-label h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: clamp(27px, 3vw, 44px);
  line-height: 0.95;
}

.section-label .kicker {
  color: var(--accent2);
}

.section-note {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: var(--bg);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.chip.ok {
  background: transparent;
  color: var(--accent2);
  border-bottom: 4px solid var(--accent2);
}

.chip.warn {
  background: transparent;
  color: var(--ink);
  border-bottom: 4px solid var(--accent3);
}

.chip.bad {
  background: var(--accent);
  color: var(--on-accent);
}

/* --- hero: vertical title, red curtain, performer ------------------ */

.hero-band {
  min-height: 640px;
}

.hero-rail {
  grid-column: span 1;
  position: relative;
  min-height: 640px;
  border-right: 6px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

.rail-word {
  position: absolute;
  top: 24px;
  left: 4px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--ink);
  font-size: clamp(48px, 5.4vw, 84px);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.rail-sub {
  position: absolute;
  top: 27px;
  right: 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--accent2);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.rail-figures {
  position: absolute;
  left: 13px;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  align-items: flex-start;
}

.figure-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent2);
}

.figure-square {
  width: 24px;
  height: 24px;
  background: var(--accent);
}

.figure-triangle {
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 22px solid var(--accent3);
}

.rail-index {
  position: absolute;
  left: 13px;
  bottom: 20px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.hero-red {
  grid-column: span 6;
  position: relative;
  min-height: 640px;
  padding: var(--pad);
  overflow: hidden;
  color: var(--on-accent);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.2) 0,
      rgba(0, 0, 0, 0.2) 1px,
      rgba(255, 255, 255, 0.035) 1px,
      rgba(255, 255, 255, 0.035) 2px,
      transparent 2px,
      transparent 11%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 34%),
    var(--accent);
  border-right: 6px solid var(--line);
}

.hero-red::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero-red .kicker {
  color: var(--on-accent);
  opacity: 0.82;
}

.display {
  margin: 18px 0 20px;
}

.lede {
  max-width: 30ch;
  margin: 0 0 24px;
  color: var(--on-accent);
  font-size: clamp(13px, 1.15vw, 16px);
  line-height: 1.65;
  opacity: 0.88;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 9px;
  border-top: 4px solid var(--accent2);
  color: var(--on-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.hero-tags span {
  padding-right: 8px;
}

.hero-tags span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--accent2);
}

.ornament {
  position: absolute;
  right: -50px;
  bottom: -52px;
  z-index: 1;
  width: min(42vw, 420px);
  opacity: 0.85;
  pointer-events: none;
}

.ornament svg {
  display: block;
  width: 100%;
  height: auto;
}

.curtain-tie {
  position: absolute;
  top: 0;
  right: 62px;
  z-index: 2;
  width: 6px;
  height: 100px;
  background: var(--accent2);
}

.curtain-tie::after {
  content: "";
  position: absolute;
  left: -9px;
  bottom: -20px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent2);
}

.hero-triangle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 0;
  height: 0;
  border-right: 90px solid var(--accent2);
  border-top: 90px solid transparent;
}

.hero-bot {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--pad);
  background: var(--surface);
}

.hero-bot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 4px solid var(--line);
}

.hero-bot-head .kicker {
  color: var(--accent2);
}

.bot-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 0 22px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 86px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  border: 4px solid var(--accent2);
}

.bot-main {
  min-width: 0;
}

.bot-main h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: "Jost", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  background: var(--line);
}

.mini-stat {
  min-width: 0;
  padding: 12px;
  background: var(--bg);
}

.mini-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.mini-stat strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-stat strong.ok {
  color: var(--accent2);
}

.mini-stat strong.bad {
  color: var(--ink);
}

.bot-actions {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 42px;
  padding: 0 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}

.btn + .btn {
  background: var(--bg);
  color: var(--ink);
  border-bottom: 4px solid var(--accent2);
}

.btn:hover {
  background: var(--accent2);
  color: var(--bg);
}

.btn:active {
  transform: translate(2px, 2px);
}

.bot-note {
  margin-top: auto;
  padding-top: 18px;
}

.note-line {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--line);
}

.bot-note p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}

/* --- entry blocks -------------------------------------------------- */

.entries-band .section-label,
.server-band .section-label {
  border-bottom: 4px solid var(--line);
}

.entry-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  background: var(--line);
}

.entry {
  grid-column: span 4;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 270px;
  padding: 23px;
  overflow: hidden;
  background: var(--surface);
  color: var(--ink);
  transition: transform var(--fast), background var(--fast);
}

.entry-astrbot {
  background: var(--accent);
  color: var(--on-accent);
}

.entry:hover {
  transform: translate(-4px, -4px);
}

.entry:active {
  transform: translate(2px, 2px);
}

.entry-num {
  position: absolute;
  top: 12px;
  right: 16px;
  color: var(--accent2);
  font-size: clamp(54px, 5vw, 78px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.08em;
  opacity: 0.9;
  pointer-events: none;
}

.entry-astrbot .entry-num {
  color: var(--on-accent);
  opacity: 0.32;
}

.entry-mark {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 39px;
  margin-bottom: 26px;
}

.mark-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent2);
}

.mark-circle.gold {
  background: var(--accent2);
}

.mark-square {
  width: 16px;
  height: 16px;
  background: var(--accent);
}

.mark-bar {
  width: 38px;
  height: 6px;
  background: var(--line);
}

.mark-triangle {
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 24px solid var(--accent3);
}

.entry-copy {
  position: relative;
  z-index: 1;
  max-width: 88%;
}

.entry-copy h3 {
  margin: 0 0 6px;
  font-size: clamp(28px, 2.7vw, 38px);
  line-height: 1;
}

.entry-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.entry-astrbot .entry-copy p {
  color: var(--on-accent);
  opacity: 0.82;
}

.entry-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 4px solid var(--line);
  color: var(--muted);
  font-family: "Jost", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.entry-astrbot .entry-foot {
  color: var(--on-accent);
  border-top-color: var(--accent2);
}

.entry-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.entry-state i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--muted);
}

.entry-state.ok {
  color: var(--accent2);
}

.entry-state.ok i {
  background: var(--accent2);
}

.entry-astrbot .entry-state.ok {
  color: var(--on-accent);
}

.entry-astrbot .entry-state.ok i {
  background: var(--accent2);
}

.entry-state.bad {
  color: var(--ink);
}

.entry-state.bad i {
  background: var(--accent);
}

.entry-astrbot .entry-state.bad {
  color: var(--on-accent);
}

.entry-astrbot .entry-state.bad i {
  background: var(--on-accent);
}

.arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--bg);
  color: var(--accent2);
  font-size: 19px;
  line-height: 1;
  transition: transform var(--fast), background var(--fast), color var(--fast);
}

.entry-astrbot .arrow {
  background: var(--on-accent);
  color: var(--accent);
}

.entry:hover .arrow {
  transform: rotate(90deg);
}

/* --- status -------------------------------------------------------- */

.services-panel {
  grid-column: span 7;
  min-width: 0;
  padding: 4px var(--pad) 12px 0;
  border-right: 6px solid var(--line);
}

.resources-panel {
  grid-column: span 5;
  min-width: 0;
  padding: 14px 0 12px var(--pad);
  background: var(--surface);
}

.service-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px 0;
  border-top: 4px solid var(--line);
}

.service-row:first-child {
  border-top: 0;
}

.service-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--muted);
}

.dot.ok {
  background: var(--accent2);
}

.dot.bad {
  background: var(--accent);
}

.service-name {
  min-width: 0;
}

.service-name strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.service-name span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.service-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.service-right b {
  color: var(--ink);
}

.service-right .open {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--bg);
  color: var(--accent2);
  font-size: 16px;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}

.service-right .open:hover {
  background: var(--accent2);
  color: var(--bg);
  transform: rotate(90deg);
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.container-list {
  display: flex;
  flex-direction: column;
}

.container-row {
  display: grid;
  grid-template-columns: minmax(74px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 4px solid var(--line);
  font-size: 10px;
}

.container-row .cname {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
}

.container-row .cname small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.meter {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--muted);
  font-family: "Jost", "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.meter b {
  color: var(--ink);
  font-weight: 700;
  font-size: 10px;
}

.resource-ornament {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 54px;
  margin-top: 16px;
}

.resource-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent2);
}

.resource-square {
  width: 26px;
  height: 26px;
  background: var(--accent);
}

.resource-triangle {
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-bottom: 30px solid var(--accent3);
}

/* --- server -------------------------------------------------------- */

.server-band .section-label {
  border-bottom: 0;
}

.stat-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 14px 0 4px;
  background: var(--line);
}

.stat {
  min-width: 0;
  padding: 16px;
  background: var(--bg);
}

.stat-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.stat-top span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.stat-top b {
  color: var(--ink);
  font-family: "Jost", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(25px, 2.4vw, 36px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.bar {
  height: 6px;
  background: var(--surface);
  overflow: hidden;
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent2);
  transition: width 300ms var(--ease);
}

.stat:nth-child(2) .bar i {
  background: var(--accent3);
}

.stat:nth-child(3) .bar i {
  background: var(--accent);
}

.stat small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.load-lines {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
  margin: 2px 0 5px;
}

.load-lines i {
  display: block;
  width: 26%;
  background: var(--accent2);
}

.load-lines i:nth-child(1) { height: 45%; }
.load-lines i:nth-child(2) { height: 70%; background: var(--accent3); }
.load-lines i:nth-child(3) { height: 100%; background: var(--accent); }

.info-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 4px 0 16px;
  background: var(--line);
}

.info-item {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
}

.info-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.info-item strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- logs ---------------------------------------------------------- */

.logs-band {
  padding-bottom: 16px;
}

.logs-head {
  align-items: flex-end;
}

.logs-head .kicker {
  color: var(--accent2);
}

.log-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.segmented {
  display: inline-flex;
  gap: 0;
  background: var(--bg);
}

.seg {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: background var(--fast), color var(--fast);
}

.seg + .seg {
  border-left: 4px solid var(--line);
}

.seg.active {
  background: var(--accent2);
  color: var(--bg);
}

.seg:hover {
  color: var(--ink);
}

.seg.active:hover {
  color: var(--bg);
}

.seg:active {
  transform: translateY(2px);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: relative;
  display: block;
  width: 30px;
  height: 18px;
  background: var(--surface);
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: var(--muted);
  transition: transform var(--fast), background var(--fast);
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(12px);
  background: var(--on-accent);
}

.switch em {
  font-style: normal;
}

select {
  height: 34px;
  padding: 0 24px 0 8px;
  border: 0;
  border-bottom: 4px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  outline: none;
}

select:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.log-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 7px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.log-pane {
  grid-column: 1 / -1;
  display: block;
  height: 460px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-top: 6px solid var(--line);
  background: #0d0907;
  color: var(--ink);
  font-family: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: var(--accent3) #0d0907;
}

.log-pane::-webkit-scrollbar {
  width: 8px;
}

.log-pane::-webkit-scrollbar-track {
  background: #0d0907;
}

.log-pane::-webkit-scrollbar-thumb {
  background: var(--accent3);
}

.log-line {
  display: block;
  min-height: 1.62em;
  padding: 1px 0 1px 8px;
  border-left: 4px solid transparent;
  margin-left: -10px;
}

.log-line.error {
  border-left-color: var(--accent);
  color: var(--ink);
  background: rgba(141, 47, 41, 0.16);
}

.log-line.warn {
  border-left-color: var(--accent2);
  color: var(--accent2);
}

.log-line.info {
  color: var(--muted);
}

.log-line.dim {
  color: var(--muted);
  opacity: 0.72;
}

.log-placeholder {
  color: var(--muted);
}

/* --- footer / toast ------------------------------------------------ */

.footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 13px 0 10px;
  border-top: 6px solid var(--line);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* --- account / password dialog ------------------------------------ */

.account-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  overflow: auto;
  border: 0;
  background: var(--surface);
  color: var(--ink);
}

.account-dialog::backdrop {
  background: rgba(4, 3, 2, 0.8);
}

.account-dialog form {
  padding: 22px;
  border-top: 6px solid var(--line);
}

.account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 13px;
  border-bottom: 4px solid var(--line);
}

.account-head .kicker {
  color: var(--accent2);
}

.account-head h2 {
  margin: 3px 0 0;
  font-size: 32px;
  line-height: 1;
}

.account-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}

.account-close:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: rotate(90deg);
}

.account-user {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-user strong {
  color: var(--accent2);
}

.account-field {
  display: block;
  margin-bottom: 18px;
}

.account-field span {
  display: block;
  margin-bottom: 5px;
  color: var(--accent2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-field input {
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-bottom: 4px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

.account-field input:focus-visible {
  border-bottom-color: var(--accent2);
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.account-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.account-error {
  margin: 0 0 14px;
  padding: 9px 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.account-save,
.account-secondary {
  flex: 1;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}

.account-save {
  background: var(--accent);
  color: var(--on-accent);
}

.account-save:hover {
  background: var(--accent2);
  color: var(--bg);
}

.account-secondary {
  background: var(--bg);
  color: var(--muted);
  border-bottom: 4px solid var(--line);
}

.account-secondary:hover {
  color: var(--ink);
  border-bottom-color: var(--accent2);
}

.account-save:active,
.account-secondary:active {
  transform: translate(2px, 2px);
}

.account-save:disabled,
.account-secondary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  max-width: calc(100vw - 36px);
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity var(--fast), transform var(--fast);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.bad {
  background: var(--bg);
  color: var(--on-accent);
  border: 4px solid var(--accent);
}

/* --- skeletons ----------------------------------------------------- */

.skeleton-row {
  height: 44px;
  background: var(--surface);
  animation: skeleton 1.2s steps(2, end) infinite;
}

@keyframes skeleton {
  50% {
    background: var(--bg);
  }
}

/* --- responsive: still a 12-column grid ---------------------------- */

@media (max-width: 1120px) {
  .hero-rail {
    display: none;
  }

  .hero-red {
    grid-column: span 7;
  }

  .hero-bot {
    grid-column: span 5;
  }

  .masthead-brand {
    grid-column: span 7;
  }

  .masthead-note {
    display: none;
  }

  .masthead-actions {
    grid-column: span 5;
  }
}

@media (max-width: 900px) {
  .hero-red {
    grid-column: span 7;
  }

  .hero-bot {
    grid-column: span 5;
  }

  .services-panel {
    grid-column: span 12;
    padding-right: 0;
    border-right: 0;
    border-bottom: 6px solid var(--line);
  }

  .resources-panel {
    grid-column: span 12;
    padding-left: 0;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry {
    grid-column: span 12;
    min-height: 210px;
  }

  .entry-copy {
    max-width: 76%;
  }

  .entry-num {
    font-size: 72px;
  }
}

@media (max-width: 700px) {
  :root {
    --pad: 16px;
  }

  .masthead,
  .frame {
    width: calc(100% - 28px);
  }

  .masthead {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    padding-top: 14px;
  }

  .masthead-brand {
    grid-column: span 12;
  }

  .masthead-actions {
    grid-column: span 12;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .brand-seal {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .seal-circle {
    width: 28px;
    height: 28px;
  }

  .seal-square {
    width: 19px;
    height: 19px;
  }

  .seal-triangle {
    right: 11px;
    border-left-width: 8px;
    border-right-width: 8px;
    border-bottom-width: 14px;
  }

  .masthead h1 {
    font-size: 22px;
  }

  .masthead .micro {
    font-size: 8px;
  }

  .hero-red,
  .hero-bot {
    grid-column: span 12;
  }

  .hero-red {
    min-height: 480px;
    border-right: 0;
    border-bottom: 6px solid var(--line);
  }

  .hero-bot {
    min-height: auto;
  }

  .display {
    font-size: clamp(82px, 25vw, 118px);
  }

  .lede {
    font-size: 13px;
    max-width: 26ch;
  }

  .ornament {
    width: 250px;
    right: -58px;
    bottom: -38px;
    opacity: 0.7;
  }

  .curtain-tie {
    right: 34px;
    height: 74px;
  }

  .hero-triangle {
    border-right-width: 64px;
    border-top-width: 64px;
  }

  .section-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .section-note {
    white-space: normal;
  }

  .section-label h2 {
    font-size: 29px;
  }

  .stat-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 12px;
  }

  .info-item {
    padding: 10px;
  }

  .info-item strong {
    font-size: 10px;
  }

  .entry {
    min-height: 220px;
    padding: 18px;
  }

  .entry-copy {
    max-width: 80%;
  }

  .entry-copy h3 {
    font-size: 30px;
  }

  .entry-num {
    top: 16px;
    right: 14px;
    font-size: 58px;
  }

  .bot-profile {
    padding: 18px 0;
  }

  .avatar {
    flex-basis: 66px;
    width: 66px;
    height: 66px;
    font-size: 27px;
  }

  .bot-main h3 {
    font-size: 25px;
  }

  .bot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-actions {
    flex-direction: column;
  }

  .btn {
    flex: none;
    width: 100%;
  }

  .logs-head {
    align-items: stretch;
  }

  .log-controls {
    justify-content: flex-start;
  }

  .log-pane {
    height: 46vh;
    min-height: 290px;
    font-size: 10px;
  }

  .log-line {
    padding-left: 6px;
    margin-left: -8px;
  }

  .footer {
    flex-direction: column;
    gap: 4px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .masthead,
  .frame {
    width: calc(100% - 20px);
  }

  .bot-grid,
  .stat-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .section-label h2 {
    font-size: 26px;
  }

  .entry-copy {
    max-width: 88%;
  }

  .hero-red {
    min-height: 440px;
  }
}

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

  .entry:hover,
  .entry:active,
  .btn:active,
  .icon-btn:active,
  .seg:active {
    transform: none;
  }

  .entry:hover .arrow,
  .icon-btn:hover svg,
  .service-right .open:hover,
  .notice button:hover,
  .account-close:hover {
    transform: none;
  }

  .account-save:active,
  .account-secondary:active {
    transform: none;
  }
}
