@font-face {
  font-family: "Cummins Innova Display";
  src: url("/fonts/CumminsInnovaDisplay-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Display";
  src: url("/fonts/CumminsInnovaDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Display";
  src: url("/fonts/CumminsInnovaDisplay-SemiBold.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Display";
  src: url("/fonts/CumminsInnovaDisplay-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Display";
  src: url("/fonts/CumminsInnovaDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Display";
  src: url("/fonts/CumminsInnovaDisplay-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Text";
  src: url("/fonts/CumminsInnovaText-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Text";
  src: url("/fonts/CumminsInnovaText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Text";
  src: url("/fonts/CumminsInnovaText-SemiBold.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Text";
  src: url("/fonts/CumminsInnovaText-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cummins Innova Text";
  src: url("/fonts/CumminsInnovaText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #010101;
  --white: #f3f3f3;
  --muted: rgba(243, 243, 243, 0.72);
  --red: #da291c;
  --lilac: #bebaff;
  --ok: #86efac;
  --err: #ffb4b8;
  --glass: rgba(250, 250, 250, 0.08);
  --line: rgba(250, 250, 250, 0.14);
  --display: "Cummins Innova Display", Syne, sans-serif;
  --text: "Cummins Innova Text", "Cummins Innova Display", sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  font-family: var(--text);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
}

.screen[hidden],
[hidden] {
  display: none !important;
}

.frame {
  position: relative;
  height: calc(100svh - 24px);
  margin: 12px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.stage-photo {
  position: absolute;
  inset: 0;
  background: #021814 url("/media/qsk60-bg.jpg") center 48% / cover no-repeat;
  transform: scale(1.04);
}

.stage-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 1, 1, 0.18) 0%, rgba(1, 1, 1, 0.08) 38%, rgba(1, 1, 1, 0.55) 100%),
    linear-gradient(90deg, rgba(1, 1, 1, 0.2), transparent 42%, rgba(1, 1, 1, 0.35) 100%);
}

body[data-view="chat"] .stage-photo {
  filter: brightness(0.42) saturate(1.1);
}

body[data-view="chat"] .stage-veil {
  background: linear-gradient(180deg, rgba(1, 1, 1, 0.42), rgba(1, 1, 1, 0.58));
}

.mast,
.screen {
  position: relative;
  z-index: 1;
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 28px 0;
  gap: 1rem;
}

.logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
}

.logo-top {
  margin-top: 6px;
}

.nav-pill {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 6px 8px 6px 16px;
  border-radius: 50px;
  background: rgba(250, 250, 250, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.nav-status,
.nav-link,
#who {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 40px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--white);
  font: 500 0.92rem var(--text);
  cursor: default;
}

.nav-link {
  cursor: pointer;
  border-radius: 50px;
  transition: background 0.25s ease;
}

.nav-link:hover {
  background: rgba(250, 250, 250, 0.14);
}

#who {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.login-screen {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: end;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4vh 50px 50px;
}

.hero-copy h1 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lilac);
}

.lede {
  margin: 0;
  max-width: 28rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--muted);
}

.glass-box,
.composer-shell,
.msg,
.glass-bar {
  background: rgba(250, 250, 250, 0.08);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.glass-box {
  width: min(24.5rem, 100%);
  justify-self: end;
  padding: 1.5rem 1.6rem 1.35rem;
  border-radius: 10px;
}

.glass-box h2 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.15;
}

.box-kicker {
  margin: 0 0 1.2rem;
  font-family: var(--display);
  font-size: 0.95rem;
  color: var(--muted);
}

label {
  display: block;
  width: 100%;
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  margin-top: 0.4rem;
  height: 50px;
  padding: 0 1.05rem;
  border-radius: 8px;
  border: 1px solid rgba(250, 250, 250, 0.18);
  background: rgba(250, 250, 250, 0.08);
  color: var(--white);
  font: 400 1.05rem var(--text);
}

textarea {
  height: auto;
  min-height: 3.2rem;
  padding: 0.85rem 1.05rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(243, 243, 243, 0.38);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--lilac);
  box-shadow: 0 0 0 3px rgba(190, 186, 255, 0.18);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 0.35rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 40px;
  cursor: pointer;
  background: var(--white);
  color: var(--black);
  font: 500 1rem var(--text);
  transition: background 0.35s ease, color 0.35s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--red);
  color: var(--white);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 50px;
  padding: 0 1.15rem;
  border-radius: 40px;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  font: 500 0.92rem var(--text);
  cursor: pointer;
  transition: background 0.35s ease, color 0.35s ease;
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--black);
}

.btn-ghost svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.legal {
  margin: 0.95rem 0 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
}

.error {
  color: var(--err);
  font-family: var(--mono);
  font-size: 0.8rem;
  margin: 0 0 0.7rem;
}

.chat-screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.thread {
  flex: 1;
  overflow: auto;
  padding: 1.4rem 1.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.welcome {
  margin: auto;
  max-width: 40rem;
  padding: 1.2rem;
}

.welcome-kicker {
  margin: 0 0 0.5rem;
  color: var(--lilac);
  font-size: 0.95rem;
  font-weight: 500;
}

.welcome h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
}

.welcome p {
  margin: 0;
  max-width: 32rem;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--muted);
}

.msg {
  max-width: min(48rem, 100%);
  padding: 0.95rem 1.1rem;
  border-radius: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  font-size: 1rem;
}

.msg.user {
  align-self: flex-end;
  background: rgba(218, 41, 28, 0.22);
  border-color: rgba(218, 41, 28, 0.35);
}

.msg.bot {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg-body {
  white-space: pre-wrap;
}

.feedback {
  margin-top: 0.15rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
}

.feedback-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.feedback-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.fb-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.fb-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.fb-good:hover {
  border-color: rgba(72, 187, 120, 0.7);
  background: rgba(72, 187, 120, 0.15);
}

.fb-bad:hover,
.fb-send-bad:hover {
  border-color: rgba(218, 41, 28, 0.7);
  background: rgba(218, 41, 28, 0.15);
}

.feedback-bad-form {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.feedback-bad-form[hidden] {
  display: none !important;
}

.feedback-comment-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.feedback-comment-label span {
  opacity: 0.7;
}

.feedback-comment {
  width: 100%;
  resize: vertical;
  min-height: 2.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  padding: 0.45rem 0.55rem;
}

.feedback-status {
  margin: 0.45rem 0 0;
  font-size: 0.84rem;
}

.feedback-status.ok {
  color: #7ddea0;
}

.feedback-status.warn {
  color: #f0c674;
}

.feedback-status.err {
  color: #f5857a;
}

.manual-fig-wrap {
  margin: 0.75rem 0;
}

.manual-fig {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  border-radius: 8px;
}

.manual-fig-wrap figcaption {
  margin-top: 0.3rem;
  font-size: 0.82rem;
  opacity: 0.8;
}

.msg.bot h2,
.msg.bot h3 {
  font-size: 1rem;
  margin: 0.8rem 0 0.3rem;
  font-weight: 600;
}

.thumbs,
.previews {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.thumbs {
  margin-top: 0.5rem;
}

.thumbs img,
.previews img {
  height: 64px;
  border-radius: 8px;
}

.composer {
  padding: 0 1.4rem 1.4rem;
}

.composer-shell {
  border-radius: 10px;
  padding: 0.85rem 0.95rem 0.95rem;
}

.composer textarea {
  margin: 0;
}

.composer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.attach {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  white-space: nowrap;
  margin: 0;
}

.attach input {
  display: none;
}

.btn-send {
  width: auto;
  margin: 0;
  min-width: 7.5rem;
}

.status {
  color: var(--lilac);
  font-family: var(--mono);
  font-size: 0.78rem;
  margin: 0 0 0.45rem;
}

@media (max-width: 900px) {
  .frame {
    margin: 8px;
    height: calc(100svh - 16px);
  }

  .mast {
    flex-wrap: wrap;
    padding: 16px 16px 0;
  }

  .login-screen {
    grid-template-columns: 1fr;
    padding: 1.2rem 1.1rem 1.2rem;
    align-items: start;
    align-content: start;
  }

  .glass-box {
    justify-self: stretch;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .lede {
    font-size: 1rem;
  }
}
