
:root {
  --bg: #090a0c;
  --bg-soft: #0e1013;
  --panel: rgba(20, 22, 25, .78);
  --panel-solid: #121417;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.15);
  --text: #f4f1e9;
  --muted: #94969b;
  --gold: #d8ad58;
  --gold-light: #f0cc7d;
  --gold-dim: rgba(216,173,88,.13);
  --green: #76c893;
  --red: #e27d7d;
  --radius: 24px;
  --shadow: 0 30px 90px rgba(0,0,0,.36);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -10%, rgba(216,173,88,.08), transparent 32rem),
    radial-gradient(circle at 100% 35%, rgba(216,173,88,.04), transparent 35rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--gold);
  color: #111;
}

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(100px);
  opacity: .12;
  z-index: -1;
}

.ambient-one {
  width: 22rem;
  height: 22rem;
  background: var(--gold);
  top: -12rem;
  left: -8rem;
}

.ambient-two {
  width: 18rem;
  height: 18rem;
  background: #805f28;
  right: -10rem;
  top: 45%;
}

.site-header {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216,173,88,.55);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 13px;
  letter-spacing: .18em;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .18em;
}

.anon-badge,
.survey-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  color: #b9bbb8;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(118,200,147,.08);
}

.container {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 105px 0 80px;
  max-width: 820px;
}

.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow span {
  width: 35px;
  height: 1px;
  background: var(--gold);
}

.hero h1,
.success-page h1,
.login-intro h1,
.dashboard-header h1 {
  margin: 22px 0;
  font-size: clamp(54px, 8vw, 94px);
  line-height: .92;
  letter-spacing: -.055em;
  font-weight: 760;
}

.hero h1 em,
.success-page h1 em,
.login-intro h1 em,
.dashboard-header h1 em {
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-copy {
  max-width: 620px;
  margin: 30px 0;
  color: #a8a9ac;
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 45px;
}

.hero-meta div:not(.meta-separator) {
  display: flex;
  flex-direction: column;
}

.hero-meta strong {
  font-size: 21px;
  color: var(--text);
}

.hero-meta span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.meta-separator {
  width: 1px;
  height: 35px;
  background: var(--line-strong);
}

.glass-panel,
.question-card,
.stat-card,
.dashboard-section {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), transparent 45%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.glass-panel {
  padding: 46px;
}

.panel-number {
  position: absolute;
  right: 35px;
  top: 25px;
  color: rgba(255,255,255,.045);
  font-size: 74px;
  font-weight: 800;
  line-height: 1;
}

.panel-heading,
.section-title-row,
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}

.glass-panel h2,
.dashboard-section h2,
.submit-zone h2 {
  margin: 8px 0 0;
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -.035em;
}

.panel-description {
  color: var(--muted);
  max-width: 650px;
  line-height: 1.7;
  margin: 18px 0 28px;
}

.panel-description strong {
  color: #d6d5d0;
}

.secure-chip,
.scale-badge {
  border: 1px solid var(--line-strong);
  padding: 8px 11px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
  white-space: nowrap;
}

.input-shell {
  min-height: 60px;
  border: 1px solid var(--line-strong);
  background: rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  border-radius: 13px;
  transition: .2s ease;
}

.input-shell:focus-within {
  border-color: rgba(216,173,88,.7);
  box-shadow: 0 0 0 4px rgba(216,173,88,.08);
}

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 17px 18px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
}

.code-shell input {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}

.input-icon {
  padding-left: 19px;
  color: var(--gold);
  font-weight: 700;
}

.privacy-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.privacy-note strong {
  color: #c8c8c5;
}

.shield {
  color: var(--gold);
}

.progress-wrap {
  position: sticky;
  top: 15px;
  z-index: 20;
  margin: 40px 0;
  padding: 17px 20px;
  background: rgba(12,13,15,.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(15px);
  box-shadow: 0 15px 40px rgba(0,0,0,.28);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--muted);
}

.progress-info strong {
  color: var(--gold-light);
}

.progress-track,
.result-track,
.mini-track {
  overflow: hidden;
  height: 3px;
  background: rgba(255,255,255,.07);
  border-radius: 20px;
}

.progress-fill,
.result-fill,
.mini-track div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #9e7434, var(--gold-light));
  transition: width .4s cubic-bezier(.2,.8,.2,1);
}

.questions {
  display: grid;
  gap: 20px;
}

.question-card {
  min-width: 0;
  margin: 0;
  padding: 38px 42px 34px;
  transition: border-color .25s ease, transform .25s ease;
}

.question-card.completed {
  border-color: rgba(216,173,88,.3);
}

.question-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.question-number {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

.question-state {
  color: #67696e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.question-card.completed .question-state {
  color: var(--green);
}

.question-card legend {
  display: block;
  float: left;
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 730;
  letter-spacing: -.035em;
}

.question-card legend + * {
  clear: both;
}

.question-prompt {
  padding-top: 8px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
}

.rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.score {
  cursor: pointer;
  position: relative;
}

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

.score span {
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  color: #b6b6b3;
  transition: .18s ease;
}

.score strong {
  font-size: 19px;
}

.score:hover span {
  border-color: rgba(216,173,88,.42);
  background: var(--gold-dim);
  transform: translateY(-2px);
}

.score input:checked + span {
  background: var(--gold);
  border-color: var(--gold);
  color: #111;
  box-shadow: 0 8px 30px rgba(216,173,88,.17);
  transform: translateY(-2px);
}

.score input:focus-visible + span {
  outline: 3px solid rgba(240,204,125,.5);
  outline-offset: 3px;
}

.scale {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: #66686d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

.observations-panel {
  margin-top: 40px;
}

.textarea-shell {
  position: relative;
}

textarea {
  resize: vertical;
  width: 100%;
  min-height: 180px;
  padding: 20px;
  padding-bottom: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: none;
  background: rgba(0,0,0,.18);
  color: var(--text);
  line-height: 1.65;
  transition: .2s ease;
}

textarea:focus {
  border-color: rgba(216,173,88,.7);
  box-shadow: 0 0 0 4px rgba(216,173,88,.08);
}

.char-counter {
  position: absolute;
  bottom: 15px;
  right: 17px;
  color: #62646a;
  font-size: 9px;
  letter-spacing: .1em;
}

.submit-zone {
  padding: 80px 0 35px;
  text-align: center;
  max-width: 680px;
  margin: auto;
}

.submit-copy p,
.submit-privacy {
  color: var(--muted);
}

.submit-button {
  width: 100%;
  min-height: 72px;
  margin-top: 25px;
  padding: 0 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--gold);
  color: #111;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
  transition: .2s ease;
}

.submit-button:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(216,173,88,.16);
}

.submit-button:active {
  transform: translateY(0);
}

.arrow {
  font-size: 24px;
  font-weight: 400;
}

.submit-privacy {
  font-size: 11px;
  margin-top: 16px;
}

.alert {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin: 25px 0;
  padding: 18px;
  border: 1px solid rgba(226,125,125,.25);
  border-radius: 12px;
  background: rgba(226,125,125,.07);
}

.alert-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #111;
  font-weight: 900;
}

.alert strong {
  font-size: 13px;
}

.alert p {
  margin: 3px 0 0;
  color: #c6a6a6;
  font-size: 12px;
}

.closed-panel {
  margin: 80px auto;
  max-width: 700px;
  text-align: center;
}

.closed-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-size: 28px;
}

.success-page {
  max-width: 760px;
  margin: auto;
  padding: 100px 0 70px;
  text-align: center;
}

.success-orbit {
  width: 100px;
  height: 100px;
  margin: 0 auto 42px;
  position: relative;
  display: grid;
  place-items: center;
}

.success-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(216,173,88,.35);
  border-radius: 50%;
  animation: successPulse 2.4s ease-in-out infinite;
}

.success-check {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  font-size: 30px;
}

.success-page h1 {
  font-size: clamp(52px, 8vw, 82px);
}

.success-copy {
  color: var(--muted);
  font-size: 17px;
}

.success-details {
  margin: 50px auto;
  max-width: 620px;
  text-align: left;
  border-top: 1px solid var(--line);
}

.success-detail {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.detail-icon {
  color: var(--gold);
}

.success-detail strong {
  font-size: 13px;
}

.success-detail p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.final-mark {
  color: #4f5155;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
}

.login-layout {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 70px;
  align-items: center;
}

.login-intro p {
  color: var(--muted);
}

.login-panel {
  padding: 42px;
}

.login-lock {
  color: var(--gold);
  font-size: 30px;
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.login-button {
  margin-top: 25px;
}

.dashboard {
  padding: 80px 0;
}

.dashboard-header {
  align-items: center;
}

.dashboard-header h1 {
  margin-bottom: 0;
  font-size: clamp(48px, 7vw, 78px);
}

.ghost-button {
  padding: 13px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.ghost-button:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.28);
}

.survey-status {
  margin: 35px 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 30px;
  width: fit-content;
}

.survey-status.is-closed .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(226,125,125,.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.stat-card {
  min-height: 200px;
  padding: 27px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.stat-index {
  position: absolute;
  top: 23px;
  right: 23px;
  color: #55575b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}

.stat-card > strong {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -.05em;
}

.stat-card > strong small {
  color: var(--muted);
  font-size: .35em;
  letter-spacing: 0;
}

.stat-card > span:last-of-type {
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.stat-card.featured {
  border-color: rgba(216,173,88,.28);
}

.mini-track {
  margin-top: 20px;
}

.dashboard-section {
  margin-top: 20px;
  padding: 40px;
}

.result-list {
  margin-top: 35px;
}

.result-item {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.result-main {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 13px;
}

.result-index {
  color: #5f6165;
  font-size: 9px;
  font-weight: 800;
}

.result-label {
  font-size: 14px;
}

.result-score {
  color: var(--gold-light);
  font-size: 19px;
  font-weight: 800;
}

.result-score small {
  color: var(--muted);
  font-size: 10px;
}

.result-track {
  margin-left: 60px;
}

.admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

.admin-actions form {
  margin: 0;
}

.control-button {
  width: 100%;
  min-height: 66px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #121417;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.control-button.close {
  border-color: rgba(226,125,125,.25);
}

.control-button.open {
  border-color: rgba(118,200,147,.25);
}

.control-button.export {
  border-color: rgba(216,173,88,.25);
}

.control-button:hover {
  border-color: rgba(216,173,88,.55);
}

.comments-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.comment-card {
  position: relative;
  min-width: 0;
  padding: 27px;
  background: rgba(0,0,0,.15);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.quote-mark {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 35px;
  line-height: 1;
}

.comment-card p {
  color: #c5c5c1;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.anonymous-label {
  color: #62646a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .15em;
}

.comment-count {
  min-width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-size: 11px;
}

.empty-state {
  padding: 55px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state > span {
  color: var(--gold);
  font-size: 25px;
}

.site-footer {
  width: min(1040px, calc(100% - 40px));
  margin: 30px auto 0;
  padding: 35px 0 50px;
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: #55575c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.footer-dot {
  color: var(--gold);
}

@keyframes successPulse {
  0%, 100% { transform: scale(1); opacity: .45; }
  50% { transform: scale(1.13); opacity: 1; }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 82px;
  }

  .container,
  .site-header,
  .site-footer {
    width: min(100% - 28px, 1040px);
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .brand-copy strong {
    font-size: 11px;
  }

  .anon-badge {
    font-size: 8px;
  }

  .hero {
    padding: 72px 0 55px;
  }

  .hero h1,
  .success-page h1,
  .login-intro h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .hero-meta {
    gap: 15px;
  }

  .glass-panel {
    padding: 30px 22px;
  }

  .panel-heading {
    display: block;
  }

  .secure-chip {
    display: inline-block;
    margin-top: 15px;
  }

  .panel-number {
    font-size: 55px;
    right: 20px;
  }

  .progress-wrap {
    top: 8px;
    margin: 24px 0;
  }

  .question-card {
    padding: 27px 20px 24px;
  }

  .rating {
    gap: 7px;
  }

  .score span {
    height: 59px;
  }

  .score:hover span {
    transform: none;
  }

  .score input:checked + span {
    transform: none;
  }

  .submit-zone {
    padding-top: 55px;
  }

  .login-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 70px 0;
  }

  .login-intro h1 {
    margin-bottom: 10px;
  }

  .dashboard {
    padding-top: 55px;
  }

  .dashboard-header {
    display: block;
  }

  .dashboard-header form {
    margin-top: 25px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 155px;
  }

  .dashboard-section {
    padding: 28px 20px;
  }

  .section-title-row {
    align-items: center;
  }

  .scale-badge {
    display: none;
  }

  .result-main {
    grid-template-columns: 30px 1fr auto;
  }

  .result-track {
    margin-left: 45px;
  }

  .admin-actions {
    grid-template-columns: 1fr;
  }

  .comments-grid {
    grid-template-columns: 1fr;
  }

  .success-page {
    padding-top: 75px;
  }

  .site-footer {
    flex-wrap: wrap;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .brand-copy {
    display: none;
  }

  .hero-meta {
    justify-content: space-between;
  }

  .hero-meta strong {
    font-size: 18px;
  }

  .question-card {
    padding-left: 15px;
    padding-right: 15px;
  }

  .rating {
    gap: 5px;
  }

  .score span {
    height: 54px;
  }
}

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


/* === GODMODE FINAL MOBILE + LOGO === */

/*
 * Blindaje global contra overflow horizontal.
 * min-width:0 es especialmente importante en elementos grid/flex.
 */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.container,
.site-header,
.site-footer,
.hero,
.glass-panel,
.question-card,
.questions,
.rating,
.dashboard,
.dashboard-section,
.stats-grid,
.comments-grid,
.admin-actions,
.result-list,
.result-item,
.result-main,
.login-layout,
.login-panel,
.success-page,
form,
fieldset {
  min-width: 0;
  max-width: 100%;
}

input,
textarea,
button,
select {
  max-width: 100%;
}

/* Logo */

.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(216,173,88,.55);
  box-shadow:
    0 0 0 4px rgba(216,173,88,.045),
    0 8px 30px rgba(0,0,0,.28);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}

.brand {
  min-width: 0;
}

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

/*
 * Textos largos: impedimos que una palabra/etiqueta pueda
 * ensanchar la pantalla.
 */

.question-card legend,
.result-label,
.comment-card p,
.panel-description,
.hero-copy,
.success-copy,
.submit-copy,
.privacy-note p {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* La categoría 3 ahora es bastante más larga. */

.question-card legend {
  line-height: 1.12;
}

/* -------------------------------------------------------
   TABLET
   ------------------------------------------------------- */

@media (max-width: 760px) {

  html,
  body {
    overflow-x: clip;
  }

  .site-header {
    width: calc(100% - 24px);
    min-height: 84px;
    gap: 10px;
  }

  .container,
  .site-footer {
    width: calc(100% - 24px);
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .brand-copy strong {
    white-space: nowrap;
  }

  .anon-badge {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero {
    width: 100%;
  }

  .hero h1,
  .success-page h1,
  .login-intro h1,
  .dashboard-header h1 {
    max-width: 100%;
    overflow-wrap: normal;
  }

  .glass-panel,
  .question-card,
  .dashboard-section,
  .stat-card,
  .comment-card {
    width: 100%;
  }

  /*
   * El rating siempre debe caber.
   */

  .rating {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .score {
    min-width: 0;
  }

  .score span {
    width: 100%;
    min-width: 0;
  }

  /*
   * Inputs: font-size >= 16px evita el zoom automático
   * de Safari/iPhone.
   */

  .input-shell input,
  textarea {
    font-size: 16px;
  }

  .code-shell input {
    letter-spacing: .07em;
  }

  .progress-wrap {
    width: 100%;
  }

  .result-main {
    width: 100%;
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .result-label {
    min-width: 0;
  }

  .result-score {
    white-space: nowrap;
  }

  .admin-actions,
  .stats-grid,
  .comments-grid {
    width: 100%;
  }

  .control-button {
    max-width: 100%;
  }
}

/* -------------------------------------------------------
   MÓVILES
   ------------------------------------------------------- */

@media (max-width: 520px) {

  :root {
    --radius: 18px;
  }

  .site-header,
  .container,
  .site-footer {
    width: calc(100% - 20px);
  }

  .site-header {
    min-height: 78px;
  }

  .brand-logo {
    width: 45px;
    height: 45px;
    flex-basis: 45px;
  }

  .brand-copy strong {
    font-size: 9px;
    letter-spacing: .12em;
  }

  .brand-copy small {
    font-size: 7px;
    letter-spacing: .12em;
  }

  .anon-badge {
    gap: 6px;
    font-size: 7px;
    letter-spacing: .11em;
  }

  .status-dot {
    width: 6px;
    height: 6px;
  }

  .hero {
    padding-top: 58px;
    padding-bottom: 45px;
  }

  .hero h1 {
    font-size: clamp(43px, 14.5vw, 65px);
    letter-spacing: -.05em;
  }

  .hero-copy {
    width: 100%;
  }

  .hero-meta {
    width: 100%;
    gap: 8px;
    justify-content: space-between;
  }

  .hero-meta div:not(.meta-separator) {
    min-width: 0;
  }

  .hero-meta strong {
    font-size: 17px;
  }

  .hero-meta span {
    font-size: 7px;
    letter-spacing: .08em;
  }

  .meta-separator {
    height: 30px;
  }

  .glass-panel {
    padding: 27px 17px;
  }

  .panel-number {
    right: 15px;
    top: 18px;
  }

  .glass-panel h2,
  .dashboard-section h2,
  .submit-zone h2 {
    font-size: 25px;
  }

  .code-shell {
    width: 100%;
  }

  .code-shell input {
    padding-left: 12px;
    padding-right: 10px;
    letter-spacing: .04em;
  }

  .input-icon {
    padding-left: 14px;
  }

  .progress-wrap {
    padding: 14px 15px;
  }

  .question-card {
    padding: 25px 14px 22px;
  }

  .question-card legend {
    font-size: clamp(23px, 7vw, 30px);
  }

  .question-prompt {
    font-size: 12px;
  }

  .rating {
    gap: 5px;
  }

  .score span {
    height: 55px;
    border-radius: 10px;
  }

  .score strong {
    font-size: 17px;
  }

  .scale {
    font-size: 7px;
    letter-spacing: .08em;
  }

  .observations-panel {
    margin-top: 25px;
  }

  textarea {
    min-height: 165px;
  }

  .submit-zone {
    width: 100%;
  }

  .submit-button {
    min-height: 66px;
    padding-left: 17px;
    padding-right: 17px;
    letter-spacing: .1em;
  }

  .dashboard {
    width: 100%;
  }

  .dashboard-header h1 {
    font-size: clamp(43px, 14vw, 65px);
  }

  .dashboard-section {
    padding: 25px 15px;
  }

  .stat-card {
    padding: 22px;
  }

  .result-main {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .result-label {
    font-size: 12px;
    line-height: 1.35;
  }

  .result-score {
    font-size: 17px;
  }

  .result-track {
    margin-left: 32px;
  }

  .comment-card {
    padding: 22px 18px;
  }

  .login-layout {
    width: 100%;
  }

  .login-panel {
    padding: 28px 18px;
  }

  .success-page {
    width: 100%;
  }
}

/* -------------------------------------------------------
   MÓVILES MUY PEQUEÑOS
   320px / 360px
   ------------------------------------------------------- */

@media (max-width: 380px) {

  .site-header,
  .container,
  .site-footer {
    width: calc(100% - 16px);
  }

  .brand-logo {
    width: 43px;
    height: 43px;
    flex-basis: 43px;
  }

  .brand-copy {
    display: flex;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 8px;
  }

  .anon-badge {
    font-size: 6px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-meta span {
    font-size: 6.5px;
  }

  .glass-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .question-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  .rating {
    gap: 4px;
  }

  .score span {
    height: 51px;
  }

  .score strong {
    font-size: 16px;
  }

  .submit-button {
    font-size: 9px;
  }
}

