:root {
    --bg: #1a1030;
    --panel: #241645;
    --panel-2: #2d1c55;
    --border: #46337f;
    --text: #f4effc;
    --muted: #b7a8da;
    --green: #ff8a1f;      /* accent: Monk-orange */
    --green-dim: #d96a00;
    --amber: #ff7ac8;      /* pink, like the cup ring */
    --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  }
  * { box-sizing: border-box; }
  body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.6;
    background-image: linear-gradient(90deg, #5a3aa8 0%, #2a1a52 22%, #1a1030 40%, #1a1030 60%, #2a1a52 78%, #5a3aa8 100%);
    background-attachment: fixed;
  }
  a { color: var(--green); text-decoration: none; }
  a:hover { text-decoration: underline; }
  .page { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }

  /* Banner image */
  .banner-img { display: block; margin: 18px 0 14px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--panel); }
  .banner-img img { display: block; width: 100%; height: auto; }
  .banner-img:hover { text-decoration: none; }

  /* Banner (old text version, unused) */
  .banner {
    margin: 18px 0 14px; padding: 22px 24px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  }
  .logo { font-family: var(--mono); font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; color: var(--green); margin: 0; letter-spacing: -.5px; }
  .logo .cursor { display: inline-block; width: .55em; height: 1em; background: var(--green); vertical-align: -0.12em; margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .tagline { font-family: var(--mono); color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
  .ticker { font-family: var(--mono); font-size: .8rem; color: var(--amber); border: 1px dashed var(--border); padding: 8px 12px; border-radius: 4px; }

  /* Top menu */
  .topnav {
    display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 16px;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  }
  .topnav a { padding: 10px 16px; font-family: var(--mono); font-size: .88rem; color: var(--text); border-right: 1px solid var(--border); }
  .topnav a:hover { background: var(--green); color: #04110a; text-decoration: none; }

  /* Portal layout */
  .portal { display: grid; grid-template-columns: 210px minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
  @media (max-width: 960px) { .portal { grid-template-columns: 1fr; } .side-right { order: 3; } }

  .block { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 16px; overflow: hidden; }
  .block > h3 {
    margin: 0; padding: 9px 14px; font-family: var(--mono); font-size: .82rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; color: var(--green);
    background: var(--panel-2); border-bottom: 1px solid var(--border);
  }
  .block > h3::before { content: "> "; color: var(--green-dim); }
  .block .body { padding: 12px 14px; font-size: .94rem; }
  .block ul { list-style: none; margin: 0; padding: 0; }
  .block li { padding: 5px 0; border-bottom: 1px dotted var(--border); }
  .block li:last-child { border-bottom: 0; }
  .block li a::before { content: "› "; color: var(--green-dim); }
  .muted { color: var(--muted); }

  /* Center posts */
  .post { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 16px; }
  .post header { padding: 12px 18px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
  .post header h2 { margin: 0; font-size: 1.15rem; }
  .post header h2 a { color: var(--text); }
  .post header h2 a:hover { color: var(--green); text-decoration: none; }
  .meta { font-family: var(--mono); font-size: .76rem; color: var(--muted); margin-top: 3px; }
  .tag { display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 1px 8px; border: 1px solid var(--green-dim); color: var(--green); border-radius: 3px; margin-right: 4px; }
  .post .content { padding: 16px 18px; }
  .post .content p { margin: 0 0 10px; }
  .more { font-family: var(--mono); font-size: .85rem; }

  .welcome pre {
    background: #0f0820; border: 1px solid var(--border); border-radius: 4px; padding: 12px 14px;
    font-family: var(--mono); font-size: .88rem; color: var(--green); overflow-x: auto; margin: 12px 0 0;
  }
  .welcome pre .c { color: var(--muted); }

  .video { position: relative; aspect-ratio: 16/9; background: #000; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

  .btn { display: inline-block; padding: 8px 14px; background: var(--green); color: #04110a; font-family: var(--mono); font-weight: 700; font-size: .85rem; border-radius: 4px; }
  .btn:hover { text-decoration: none; filter: brightness(1.1); }

  .stat { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .82rem; padding: 3px 0; }
  .stat span:last-child { color: var(--green); }

  footer { margin-top: 10px; text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; }

/* active menu item */
.topnav a.active { background: var(--green); color: #04110a; }
.empty { color: var(--muted); font-family: var(--mono); font-size: .9rem; }

.portal > main {
  min-width: 0;
}

.video-feed {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.video-card {
  flex: 0 1 min(100%, 280px);
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.video-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}
