:root {
  --usal-red: #8f1a1d;
  --usal-red-dark: #741619;
  --green-soft: #ecfdf3;
  --green-ink: #159554;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --shadow-xl: 0 25px 70px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 12px 30px rgba(143, 26, 29, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Lato", sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
}

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

button {
  cursor: pointer;
  border: 0;
}

.icon {
  display: inline-block;
  flex: 0 0 auto;
  line-height: 1;
}

.icon--tiny {
  font-size: 0.95rem;
}

.icon--xs {
  font-size: 0.95rem;
}

.icon--sm {
  font-size: 1.15rem;
}

.icon--md {
  font-size: 1.5rem;
}

.icon--lg {
  font-size: 2rem;
}

.icon--xl {
  font-size: 2.5rem;
}

.icon--avatar {
  font-size: 5rem;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 4.2rem;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand__badge {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: var(--usal-red);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.brand__title {
  margin: 0;
  color: var(--usal-red);
  font-size: 1.05rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__subtitle {
  margin: 0.2rem 0 0;
  color: var(--slate-500);
  font-size: 0.77rem;
  font-weight: 700;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--slate-500);
  font-size: 0.92rem;
  font-weight: 700;
}

.step-chip.is-active {
  color: var(--usal-red);
}

.stepper__arrow {
  color: var(--slate-300);
}

.app-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: #fff;
}

.app-nav__link {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--slate-500);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}

.app-nav__link.is-active {
  background: var(--usal-red);
  color: #fff;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.45rem 0.55rem 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: #fff;
}

.user-chip__name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--slate-700);
}

.user-chip__logout {
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 800;
}

.user-chip__logout:hover {
  background: var(--slate-200);
}

.main-shell {
  flex: 1;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.dashboard-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
}

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

.history-sidebar {
  position: sticky;
  top: 5.5rem;
  align-self: start;
}

.history-sidebar__section {
  background:
    radial-gradient(circle at top right, rgba(143, 26, 29, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--slate-200);
  border-radius: 1.85rem;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.08);
}

.history-sidebar__head {
  padding: 1.5rem 1.5rem 1rem;
}

.history-sidebar__head h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.history-sidebar__head p {
  margin: 0;
  color: var(--slate-500);
  max-width: 28ch;
  font-size: 0.88rem;
  line-height: 1.6;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0 1.15rem 1.15rem;
  max-height: 74vh;
  overflow-y: auto;
}

.history-card {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 1.05rem;
  border-radius: 1.85rem;
  border: 1px solid rgba(143, 26, 29, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), #fffdfc 88%);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.history-card:hover {
  transform: translateY(-1px);
  border-color: rgba(143, 26, 29, 0.18);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075);
}

.history-card--mid {
  border-color: rgba(180, 120, 38, 0.14);
}

.history-card--high,
.history-card--top {
  border-color: rgba(21, 149, 84, 0.14);
}

.history-card__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 88px;
  padding: 0.7rem 0.35rem;
  border-radius: 1.35rem;
  background: linear-gradient(180deg, #a64038 0%, #8d312b 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 20px rgba(143, 26, 29, 0.16);
}

.history-card--mid .history-card__score {
  background: linear-gradient(180deg, #c18a32 0%, #a06a1f 100%);
}

.history-card--high .history-card__score {
  background: linear-gradient(180deg, #24976a 0%, #197653 100%);
}

.history-card--top .history-card__score {
  background: linear-gradient(180deg, #14817a 0%, #116963 100%);
}

.history-card__score-value {
  display: block;
  font-size: 1.6rem;
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.history-card__score-label {
  display: block;
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 0.82;
}

.history-card__body {
  min-width: 0;
  padding: 0.18rem 0.1rem 0.08rem 0;
}

.history-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.7rem;
}

.history-card__eyebrow {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(143, 26, 29, 0.07);
  color: var(--usal-red);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-card__body h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--slate-800);
}

.history-card__body p,
.history-card__meta small {
  display: block;
  margin: 0;
  color: var(--slate-500);
  line-height: 1.45;
}

.history-card__body p {
  margin-top: 0.38rem;
  font-size: 0.8rem;
  color: var(--slate-600);
  max-width: 28ch;
}

.history-card__meta small {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #76839c;
}

.history-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  color: var(--usal-red);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

.history-empty,
.history-detail__empty {
  padding: 1rem 1.35rem 1.35rem;
}

.history-empty p,
.history-detail__empty p {
  margin: 0;
  color: var(--slate-500);
  line-height: 1.5;
}

.history-detail__empty h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.record-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem 1.4rem 1.8rem;
}

.record-header {
  margin-bottom: 1.45rem;
}

.record-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  color: var(--usal-red);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.record-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.record-date {
  margin: 0;
  color: #8390aa;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.record-meta__status {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(143, 26, 29, 0.07);
  color: var(--usal-red);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.record-header h2 {
  margin: 0.55rem 0 0;
  max-width: 920px;
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.record-header__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.95rem;
}

.record-header__tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(143, 26, 29, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--slate-700);
  font-size: 0.8rem;
  font-weight: 900;
}

.record-subtitle {
  margin: 0.85rem 0 0;
  max-width: 700px;
  color: var(--slate-500);
  font-size: 0.96rem;
  line-height: 1.6;
}

.record-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.record-summary,
.record-panel {
  border-radius: 1.9rem;
  border: 1px solid var(--slate-200);
  background:
    radial-gradient(circle at top right, rgba(143, 26, 29, 0.06), transparent 30%),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.07);
}

.record-summary {
  position: sticky;
  top: 5.5rem;
  padding: 1.35rem;
}

.record-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.record-pill-row span {
  padding: 0.5rem 0.76rem;
  border-radius: 999px;
  background: var(--slate-100);
  color: #51617a;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.record-context {
  margin-top: 1.2rem;
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  background: #fff7f7;
  border: 1px solid rgba(143, 26, 29, 0.12);
}

.record-context strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.84rem;
  color: var(--usal-red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.record-context p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.94rem;
  line-height: 1.6;
}

.record-score {
  margin-top: 1.2rem;
  padding: 1.25rem 1.15rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #972a26, #83211e);
  color: #fff;
  box-shadow: 0 18px 32px rgba(143, 26, 29, 0.2);
}

.record-score__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.record-score strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 2.7rem;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.record-score__label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.94rem;
  font-weight: 800;
  opacity: 0.92;
}

.record-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.record-breakdown article {
  padding: 0.95rem;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, #fbfcfe, #f4f7fb);
  border: 1px solid rgba(203, 213, 225, 0.65);
}

.record-breakdown span {
  display: block;
  color: #627088;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.record-breakdown strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.record-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.record-panel {
  padding: 1.45rem;
}

.record-panel h3 {
  margin: 0 0 1.1rem;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.record-message {
  padding: 1rem 1.05rem;
  border-radius: 1.15rem;
  margin-bottom: 0.7rem;
  max-width: 88%;
}

.record-message.is-user {
  margin-left: auto;
  background: linear-gradient(180deg, #fff8f8, #fff3f3);
  border: 1px solid rgba(143, 26, 29, 0.12);
}

.record-message.is-model {
  background: linear-gradient(180deg, #fbfcfe, #f5f7fb);
  border: 1px solid rgba(203, 213, 225, 0.55);
}

.record-message h4 {
  margin: 0 0 0.45rem;
  color: var(--slate-700);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.record-message p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.98rem;
  line-height: 1.7;
}

.view {
  display: none;
}

.view.is-active {
  display: flex;
}

.is-hidden {
  display: none !important;
}

.alert-banner {
  position: fixed;
  top: 5.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 15px 32px rgba(127, 29, 29, 0.16);
}

.alert-banner p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
}

.view--welcome {
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hero-card {
  width: 100%;
  max-width: 980px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-100);
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.hero-card__content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  text-align: center;
}

.hero-card__glow {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(143, 26, 29, 0.08);
  filter: blur(72px);
}

.hero-card__glow--top {
  top: -9rem;
  right: -8rem;
}

.hero-card__glow--bottom {
  left: -8rem;
  bottom: -10rem;
}

.hero-mark {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 2rem;
  border-radius: 1.35rem;
  background: var(--usal-red);
  color: #fff;
  display: grid;
  place-items: center;
  transform: rotate(-3deg);
  box-shadow: 0 18px 35px rgba(143, 26, 29, 0.28);
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4vw, 3.15rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-title span {
  color: var(--usal-red);
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto 2.2rem;
  color: var(--slate-600);
  font-size: 1.12rem;
  line-height: 1.7;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.35rem;
  text-align: left;
}

.feature-card {
  padding: 1.35rem;
  border-radius: 1.35rem;
  border: 1px solid var(--slate-100);
  background: var(--slate-50);
}

.feature-card__icon {
  color: var(--usal-red);
  margin-bottom: 0.8rem;
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, background-color 180ms ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--usal-red);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}

.btn--primary:hover:not(:disabled) {
  background: var(--usal-red-dark);
  transform: translateY(-1px);
}

.btn--hero {
  padding: 1rem 2.4rem;
  border-radius: 999px;
  font-size: 1.05rem;
}

.btn--full {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 1.3rem;
  font-size: 1.03rem;
}

.btn--compact {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
}

.btn--danger {
  background: #dc2626;
  color: #fff;
}

.btn--danger:hover:not(:disabled) {
  background: #b91c1c;
}

.panel {
  width: 100%;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-xl);
}

.view--config {
  padding: 0;
  justify-content: center;
  overflow-y: auto;
}

.panel--config {
  max-width: 980px;
  margin: 1rem auto;
  padding: 2.35rem;
}

.panel__header {
  margin-bottom: 1.7rem;
}

.panel__header h2,
.evaluation-head h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.panel__header p,
.evaluation-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.field-group {
  min-width: 0;
}

.config-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.config-section {
  padding: 1.45rem;
  border: 1px solid var(--slate-100);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
}

.section-heading {
  margin-bottom: 1.15rem;
}

.section-heading h3 {
  margin: 0 0 0.3rem;
  color: var(--slate-800);
  font-size: 1.08rem;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.92rem;
  line-height: 1.5;
}

.field-label,
.case-box__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
  color: var(--slate-700);
  font-size: 0.94rem;
  font-weight: 900;
}

.field-label .icon,
.case-box__title .icon {
  color: var(--usal-red);
}

.field-control {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  background: var(--slate-50);
  color: var(--slate-800);
  font-weight: 700;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field-control:focus {
  border-color: var(--usal-red);
  box-shadow: 0 0 0 4px rgba(143, 26, 29, 0.12);
}

.field-control--white {
  background: #fff;
}

.field-control--textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.55;
}

.case-box {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.advanced-options {
  border: 1px solid var(--slate-100);
  border-radius: 1.45rem;
  background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
  overflow: hidden;
}

.advanced-options[open] {
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.06);
}

.advanced-options__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  cursor: pointer;
}

.advanced-options__summary::-webkit-details-marker {
  display: none;
}

.advanced-options__summary h3 {
  margin: 0.15rem 0 0;
  color: var(--slate-800);
  font-size: 1.02rem;
  font-weight: 900;
}

.advanced-options__eyebrow {
  color: var(--usal-red);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.advanced-options__summary .icon {
  color: var(--slate-500);
  transition: transform 180ms ease;
}

.advanced-options[open] .advanced-options__summary .icon {
  transform: rotate(180deg);
}

.advanced-options__body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0 1.3rem 1.3rem;
  border-top: 1px solid var(--slate-100);
}

.mode-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.mode-pill {
  flex: 1;
  padding: 0.8rem 0.9rem;
  border-radius: 0.8rem;
  background: transparent;
  color: var(--slate-500);
  font-size: 0.92rem;
  font-weight: 900;
}

.mode-pill:hover {
  background: var(--slate-50);
}

.mode-pill.is-active {
  background: var(--usal-red);
  color: #fff;
  box-shadow: 0 12px 24px rgba(143, 26, 29, 0.2);
}

.tiny-label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--slate-500);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.helper-copy {
  margin: 0.55rem 0 0;
  color: var(--slate-400);
  font-size: 0.78rem;
}

.inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.btn--secondary {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}

.btn--secondary:hover {
  background: var(--slate-200);
}

.btn--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.info-box {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--slate-200);
  background: #fff;
  text-align: center;
}

.info-box p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.55;
}

.btn__icon {
  transition: opacity 180ms ease;
}

.btn__label {
  display: inline-flex;
  align-items: center;
}

.spin {
  animation: spin 900ms linear infinite;
}

.view--interview {
  min-height: calc(100vh - 4.2rem);
  background: var(--slate-900);
  overflow: hidden;
}

.interview-shell {
  width: 100%;
  height: calc(100vh - 4.2rem);
  min-height: calc(100vh - 4.2rem);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.18), transparent 26%),
    radial-gradient(circle at left center, rgba(143, 26, 29, 0.18), transparent 28%),
    var(--slate-900);
}

.interview-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.2rem;
  padding: 0 1.2rem;
  align-items: stretch;
  min-height: 0;
}

.interview-toolbar {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.live-pill__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: pulse 1.5s infinite;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-btn {
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
}

.icon-btn:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}

.interview-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6.4rem 1.5rem 2rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.interview-stage__content {
  width: 100%;
  max-width: 960px;
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.avatar-wave {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.avatar-wave--one {
  transform: scale(1.5);
  animation: ping 1.5s infinite;
}

.avatar-wave--two {
  transform: scale(2);
  animation: ping 1.5s infinite 0.22s;
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  position: relative;
  z-index: 2;
  width: clamp(10rem, 18vw, 12rem);
  height: clamp(10rem, 18vw, 12rem);
  border-radius: 999px;
  border: 4px solid rgba(100, 116, 139, 0.8);
  background: linear-gradient(145deg, #334155, #111827);
  color: rgba(203, 213, 225, 0.86);
  display: grid;
  place-items: center;
  box-shadow: 0 35px 65px rgba(0, 0, 0, 0.38);
}

.typing-dots {
  position: absolute;
  bottom: 1rem;
  display: flex;
  gap: 0.28rem;
}

.typing-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  animation: bounce 900ms infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.1s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.2s;
}

.subtitle-box {
  width: 100%;
  max-width: 860px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 1rem;
}

.subtitle-box p {
  margin: 0;
  padding: 0 1rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.55;
  font-weight: 300;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.34);
}

.interview-transcript {
  margin-top: 5.5rem;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.6rem;
  background: rgba(8, 15, 30, 0.58);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 8.5rem);
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.interview-transcript__head {
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.interview-transcript__head h3 {
  margin: 0 0 0.2rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.interview-transcript__head p {
  margin: 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.82rem;
  line-height: 1.45;
}

.interview-transcript__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.interview-transcript__empty {
  padding: 1rem;
}

.interview-transcript__empty p {
  margin: 0;
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.88rem;
  line-height: 1.5;
}

.transcript-message {
  padding: 0.9rem 0.95rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.transcript-message.is-user {
  margin-left: 1rem;
  background: rgba(143, 26, 29, 0.22);
}

.transcript-message.is-model {
  margin-right: 1rem;
  background: rgba(255, 255, 255, 0.06);
}

.transcript-message__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.transcript-message__meta span {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.transcript-message__meta small {
  color: rgba(203, 213, 225, 0.58);
  font-size: 0.72rem;
}

.transcript-message p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.controls-shell {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  padding: 1rem 1.2rem 2rem;
}

.controls-shell__inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.input-status {
  width: 100%;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-status p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  text-align: center;
}

.input-status p.listening {
  font-style: italic;
  animation: pulse-text 1.2s infinite;
}

.mic-row {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mic-btn {
  position: relative;
  z-index: 2;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--usal-red);
  color: #fff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.45);
}

.mic-btn:hover:not(:disabled) {
  background: #a61d21;
}

.mic-btn.is-listening {
  background: #ef4444;
  transform: scale(1.08);
}

.mic-btn:disabled {
  opacity: 0.5;
}

.mic-btn__ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 4px solid rgba(248, 113, 113, 0.7);
  animation: ping 1.3s infinite;
}

.send-btn {
  position: absolute;
  right: clamp(0rem, 8vw, 4rem);
  width: 3.6rem;
  height: 3.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--usal-red);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.34);
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.04);
  background: #f8fafc;
}

.controls-note {
  margin: 0;
  color: var(--slate-400);
  font-size: 0.78rem;
  text-align: center;
}

.text-form {
  width: 100%;
  max-width: 620px;
}

.text-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.95rem 1.25rem;
  outline: none;
}

.text-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.text-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.text-input:disabled {
  opacity: 0.55;
}

.view--evaluation {
  padding: 0;
  overflow-y: auto;
  background: var(--slate-50);
  justify-content: center;
}

.panel--evaluation {
  position: relative;
  overflow: hidden;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 2rem 2.25rem;
}

.assistant-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  height: calc(100vh - 4.2rem);
  max-height: calc(100vh - 4.2rem);
  overflow: hidden;
}

.assistant-sidebar,
.assistant-main {
  border-radius: 1.8rem;
  border: 1px solid var(--slate-200);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
}

.assistant-sidebar {
  padding: 1rem;
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.assistant-sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.assistant-sidebar__head h2,
.assistant-toolbar h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.assistant-sidebar__head p,
.assistant-toolbar p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.9rem;
  line-height: 1.5;
}

.assistant-sidebar__new {
  padding: 0.7rem 0.95rem;
  border-radius: 1rem;
}

.assistant-session-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.assistant-session-card {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1.15rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  text-align: left;
}

.assistant-session-card.is-active {
  background: #fff7f7;
  border-color: rgba(143, 26, 29, 0.26);
}

.assistant-session-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 900;
}

.assistant-session-card p,
.assistant-session-card small {
  display: block;
  margin: 0;
  color: var(--slate-500);
  line-height: 1.45;
}

.assistant-session-card p {
  font-size: 0.86rem;
}

.assistant-session-card small {
  margin-top: 0.4rem;
  font-size: 0.75rem;
}

.assistant-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 7rem);
  overflow: hidden;
}

.assistant-toolbar {
  padding: 1.2rem 1.3rem;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.assistant-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 240px;
}

.assistant-filter span {
  color: var(--slate-500);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.assistant-filter select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
}

.assistant-thread {
  flex: 1;
  min-height: 420px;
  padding: 1.3rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(143, 26, 29, 0.06), transparent 24%),
    linear-gradient(180deg, #fff, #fcfcfd);
}

.assistant-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--slate-500);
}

.assistant-empty .icon {
  color: var(--usal-red);
  margin-bottom: 1rem;
}

.assistant-empty h3 {
  margin: 0 0 0.5rem;
  color: var(--slate-800);
  font-size: 1.4rem;
  font-weight: 900;
}

.assistant-empty p {
  margin: 0;
  max-width: 620px;
  line-height: 1.7;
}

.assistant-message {
  max-width: 860px;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1.35rem;
}

.assistant-message.is-user {
  margin-left: auto;
  background: #fff5f5;
  border: 1px solid #fde2e2;
}

.assistant-message.is-assistant {
  background: #fff;
  border: 1px solid var(--slate-100);
}

.assistant-message__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.assistant-message__meta span {
  color: var(--slate-800);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.assistant-message__meta small {
  color: var(--slate-400);
}

.assistant-message__body {
  color: var(--slate-700);
  line-height: 1.7;
  white-space: pre-wrap;
}

.assistant-citations {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-100);
}

.assistant-citations h4 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 900;
}

.assistant-citation {
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  margin-bottom: 0.55rem;
}

.assistant-citation h5 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 900;
}

.assistant-citation p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.9rem;
  line-height: 1.55;
}

.assistant-compose {
  border-top: 1px solid var(--slate-100);
  padding: 1rem 1.2rem 1.2rem;
  background: #fff;
}

.assistant-compose textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  outline: none;
}

.assistant-compose textarea:focus {
  border-color: var(--usal-red);
  box-shadow: 0 0 0 4px rgba(143, 26, 29, 0.12);
}

.assistant-compose__actions {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.assistant-compose__actions p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.88rem;
  line-height: 1.5;
}

.assistant-compose__submit {
  min-width: 152px;
  padding: 0.95rem 1.35rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 28px rgba(143, 26, 29, 0.2);
}

.assistant-compose__submit .icon {
  font-size: 1rem;
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(143, 26, 29, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.12), transparent 24%),
    linear-gradient(180deg, #fff, #f8fafc);
}

.auth-shell {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
  gap: 1.5rem;
  align-items: center;
}

.auth-hero {
  padding: 2rem;
}

.auth-hero__badge {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(143, 26, 29, 0.1);
  color: var(--usal-red);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-hero h1 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-hero p {
  margin: 0;
  max-width: 640px;
  color: var(--slate-600);
  font-size: 1.05rem;
  line-height: 1.7;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--slate-200);
  border-radius: 2rem;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.auth-card__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--slate-50);
}

.auth-tab {
  padding: 1rem 1rem 0.95rem;
  text-align: center;
  color: var(--slate-500);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid var(--slate-200);
}

.auth-tab.is-active {
  color: var(--usal-red);
  background: #fff;
  border-bottom-color: #fff;
}

.auth-card__content {
  padding: 1.6rem;
}

.auth-card__content h2 {
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
  font-weight: 900;
}

.auth-card__content > p {
  margin: 0 0 1.4rem;
  color: var(--slate-500);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--slate-700);
}

.auth-field input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  outline: none;
}

.auth-field input:focus {
  border-color: var(--usal-red);
  box-shadow: 0 0 0 4px rgba(143, 26, 29, 0.12);
}

.auth-field small {
  display: block;
  margin-top: 0.45rem;
  color: var(--slate-400);
  font-size: 0.75rem;
  line-height: 1.5;
}

.form-errors,
.field-errors {
  border-radius: 1rem;
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.8rem 0.95rem;
}

.form-errors p,
.field-errors p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.panel__stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.75rem;
  background: var(--usal-red);
}

.evaluation-head {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--slate-100);
  text-align: center;
}

.evaluation-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid #bbf7d0;
  background: var(--green-soft);
  color: var(--green-ink);
}

.markdown-output {
  color: var(--slate-600);
  font-size: 1rem;
  line-height: 1.8;
}

.markdown-output h3 {
  margin: 1.75rem 0 0.75rem;
  color: var(--usal-red);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.markdown-output p {
  margin: 0 0 0.85rem;
}

.markdown-output ul {
  margin: 0.8rem 0 0;
  padding-left: 1.3rem;
}

.markdown-output li {
  margin-bottom: 0.5rem;
  color: var(--slate-700);
}

.markdown-output strong {
  color: var(--slate-800);
}

.markdown-output li strong {
  color: var(--usal-red);
}

.evaluation-actions {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  margin-top: 2.2rem;
  border-top: 1px solid var(--slate-100);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {
  0% {
    opacity: 0.5;
  }

  75%,
  100% {
    transform: scale(2.05);
    opacity: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes pulse-text {
  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .dashboard-shell,
  .auth-shell,
  .assistant-shell {
    grid-template-columns: 1fr;
  }

  .assistant-shell {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .record-layout {
    grid-template-columns: 1fr;
  }

  .history-sidebar {
    position: static;
  }

  .assistant-sidebar {
    position: static;
  }

  .record-summary {
    position: static;
  }

  .record-message {
    max-width: 100%;
  }

  .feature-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .interview-layout {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }

  .interview-transcript {
    margin: 0 1rem 1rem;
    max-height: 340px;
  }

  .hero-card__content,
  .panel--config,
  .panel--evaluation {
    padding: 1.5rem;
  }
}

@media (max-width: 760px) {
  .topbar__inner {
    min-height: auto;
    padding: 0.9rem 1rem;
  }

  .topbar__right {
    gap: 0.6rem;
  }

  .stepper {
    display: none;
  }

  .app-nav {
    display: none;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .interview-toolbar {
    padding: 0.85rem;
  }

  .toolbar-actions {
    gap: 0.55rem;
  }

  .live-pill {
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .send-btn {
    right: 0;
  }

  .inline-field {
    grid-template-columns: 1fr;
  }

  .user-chip {
    padding-left: 0.8rem;
  }

  .user-chip__name {
    max-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .record-header h2 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .record-header__tags {
    gap: 0.45rem;
  }

  .record-header__tags span,
  .record-pill-row span {
    font-size: 0.74rem;
  }
}

@media (max-width: 520px) {
  .dashboard-shell {
    padding: 0.85rem;
  }

  .assistant-shell {
    padding: 0.85rem;
  }

  .record-shell {
    padding: 0.85rem;
  }

  .hero-card {
    border-radius: 1.7rem;
  }

  .hero-mark {
    width: 4.3rem;
    height: 4.3rem;
  }

  .btn--hero,
  .btn--full {
    width: 100%;
  }

  .mode-tabs {
    flex-direction: column;
  }

  .panel--evaluation,
  .panel--config {
    padding: 1.2rem;
  }

  .subtitle-box p {
    font-size: 1.2rem;
  }

  .interview-stage {
    padding: 6.2rem 1rem 1.5rem;
  }

  .record-breakdown {
    grid-template-columns: 1fr;
  }

  .auth-card__content,
  .auth-hero {
    padding: 1.2rem;
  }

  .user-chip {
    gap: 0.5rem;
    padding-right: 0.35rem;
  }

  .user-chip__logout {
    padding: 0.5rem 0.75rem;
  }

  .assistant-toolbar,
  .assistant-compose__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .assistant-filter {
    min-width: 0;
  }

  .record-header {
    margin-bottom: 1.1rem;
  }

  .record-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .record-header__tags {
    flex-direction: column;
    align-items: flex-start;
  }

  .record-header__tags span {
    width: 100%;
    justify-content: flex-start;
  }

  .record-panel,
  .record-summary {
    padding: 1.2rem;
  }

  .record-message {
    padding: 0.9rem;
  }

  .history-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.85rem;
  }

  .history-card__score {
    min-height: 80px;
  }

  .history-card__score-value {
    font-size: 1.42rem;
  }

  .history-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.38rem;
    margin-bottom: 0.48rem;
  }

  .history-card__body h4 {
    font-size: 0.96rem;
  }
}
