/* Devcon 9 Lisbon additions: flag accents, TBC marker, the guest@lisboa terminal */

.tbc {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 4px;
  border-radius: 999px;
  background: var(--flag-red);
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: 0.12em;
}
.fact.ok h3::before { content: "\2713  "; color: var(--leaf); }
.fact a { color: var(--leaf); }

.announce { border-bottom: 4px solid transparent; border-image: linear-gradient(90deg, var(--flag-green) 0 40%, var(--flag-red) 40% 100%) 1; }

.flagbar { display: flex; height: 8px; }
.flagbar span:first-child { flex: 2; background: var(--flag-green); }
.flagbar span:last-child { flex: 3; background: var(--flag-red); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Terminal ---------- */
.term-section { padding-block: clamp(56px, 8vw, 104px); background: var(--night); }
.term-section .section-head { max-width: 720px; margin-bottom: 28px; }
.term-section h2 { margin: 0 0 12px; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; }

.crt {
  --phosphor: #7dff9b;
  --phosphor-dim: #3f9a58;
  --phosphor-glow: rgba(125, 255, 155, 0.35);
  position: relative;
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(14px, 3vw, 30px);
  border-radius: 28px;
  background: linear-gradient(180deg, #2a2a2a, #121212);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.08);
}
.crt[data-color="amber"] { --phosphor: #ffb547; --phosphor-dim: #a8702a; --phosphor-glow: rgba(255, 181, 71, 0.35); }
.crt[data-color="white"] { --phosphor: #e8f0ea; --phosphor-dim: #8a948d; --phosphor-glow: rgba(232, 240, 234, 0.3); }

.crt-screen {
  position: relative;
  overflow: hidden;
  height: clamp(380px, 58vh, 560px);
  border-radius: 22px / 26px;
  background: radial-gradient(ellipse at center, #0d1a10 0%, #050a06 75%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9);
}
.crt-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
}
.crt-out {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: clamp(16px, 3vw, 32px);
  margin: 0;
  font: 500 clamp(0.8rem, 1.6vw, 0.98rem)/1.5 ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  color: var(--phosphor);
  text-shadow: 0 0 6px var(--phosphor-glow);
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: var(--phosphor-dim) transparent;
}
.crt-out .dim { color: var(--phosphor-dim); }
.crt-out .art { color: var(--phosphor); line-height: 1.15; }
.crt-out a { color: var(--phosphor); }
.crt-out button.cmd {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-shadow: inherit;
}
.crt-out button.cmd:focus-visible, .crt-out a:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 2px; }

.crt-line { display: flex; gap: 0.6ch; align-items: baseline; }
.crt-line label { flex: none; }
.crt-in {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  caret-color: var(--phosphor);
  text-shadow: inherit;
  padding: 0;
}

.crt-bar { display: flex; align-items: center; gap: 12px; padding: 14px 6px 0; color: #9a9a9a; font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; }
.crt-led { width: 9px; height: 9px; border-radius: 50%; background: var(--phosphor); box-shadow: 0 0 8px var(--phosphor); }
.crt-bar button {
  font: inherit; letter-spacing: inherit; color: #ddd; background: #1c1c1c; border: 1px solid #3a3a3a;
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.crt-bar button:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.crt-bar .crt-brand { margin-left: auto; }

/* Without JS: a plain menu */
.crt-fallback { display: grid; gap: 4px; padding: clamp(16px, 3vw, 32px); font-family: ui-monospace, Consolas, monospace; color: #7dff9b; }
.crt-fallback a { color: inherit; }
.crt.is-live .crt-fallback { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .crt.is-live .crt-screen { animation: crt-on 0.6s var(--ease-out) both; }
  @keyframes crt-on {
    0% { transform: scaleY(0.01); filter: brightness(3); }
    60% { transform: scaleY(1); filter: brightness(1.6); }
    100% { transform: none; filter: none; }
  }
}

.crt-out > div:empty { min-height: 1.5em; }
.crt-out .art { font-size: clamp(0.5rem, 2.3vw, 1em); }
