:root {
  color-scheme: light;
  --bg: #f7f2e8;
  --surface: #ffffff;
  --surface-2: #f3eadf;
  --text: #20242a;
  --muted: #716a60;
  --line: #ded2c2;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --rose: #be3455;
  --amber: #b86716;
  --violet: #6251c9;
  --shadow: 0 18px 45px rgba(76, 58, 41, 0.1);
  --soft-shadow: 0 10px 28px rgba(76, 58, 41, 0.07);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.34), rgba(255, 251, 244, 0.62) 48%, rgba(255, 251, 244, 0.84)),
    url("assets/site-background.png?v=3") center top / cover fixed no-repeat,
    var(--bg);
  color: var(--text);
}

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

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(222, 210, 194, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.1;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.inline-actions,
.row-actions,
.export-actions,
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.layout {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 71px);
}

.sidebar {
  padding: 24px 16px;
  border-right: 1px solid rgba(222, 210, 194, 0.82);
  background: rgba(255, 252, 246, 0.78);
  backdrop-filter: blur(14px);
}

.sidebar button {
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.content {
  padding: clamp(18px, 4vw, 44px);
}

.public-home {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px) 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.page-hero {
  position: relative;
  min-height: 190px;
  align-items: center;
  border: 1px solid rgba(222, 210, 194, 0.9);
  border-radius: 8px;
  overflow: hidden;
  padding: 28px clamp(245px, 34vw, 410px) 28px 28px;
  background-color: rgba(255, 255, 255, 0.88);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 255, 255, 0.95) 48%, rgba(255, 255, 255, 0.28) 100%),
    var(--hero-image);
  background-repeat: no-repeat;
  background-position: center, right -8px center;
  background-size: cover, clamp(260px, 32vw, 420px) auto;
  box-shadow: var(--soft-shadow);
}

.hero-auth {
  --hero-image: url("assets/hero-auth-pro.png?v=2");
}

.hero-dashboard {
  --hero-image: url("assets/hero-catalog.png?v=2");
}

.hero-builder {
  --hero-image: url("assets/hero-builder-pro.png?v=2");
}

.hero-results {
  --hero-image: url("assets/hero-analytics.png?v=2");
}

.hero-themes {
  --hero-image: url("assets/hero-themes-pro.png?v=2");
}

.hero-admin {
  --hero-image: url("assets/hero-admin-pro.png?v=2");
}

.hero-respond {
  --hero-image: url("assets/hero-response-pro.png?v=2");
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: 0;
}

.section-head p {
  max-width: 680px;
  color: var(--muted);
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #efe6db;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  background: #e6d8c9;
  box-shadow: 0 10px 18px rgba(31, 41, 55, 0.08);
}

.btn.primary {
  background: linear-gradient(135deg, var(--teal), #159182);
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.22);
}

.btn.primary:hover {
  background: var(--teal-dark);
}

.btn.danger {
  background: #f9e7ec;
  color: var(--rose);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.btn.active {
  background: #d9ece9;
  color: var(--teal-dark);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--teal);
}

.btn.icon {
  width: 40px;
  padding: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.panel-header h3 {
  margin: 0;
  font-size: 18px;
}

.panel-body {
  padding: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 253, 0.96)),
    var(--surface);
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  color: #26313d;
}

.survey-list {
  display: grid;
  gap: 12px;
}

.public-survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
  gap: 14px;
  align-items: stretch;
}

.public-survey-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  min-height: 218px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.survey-widget {
  min-height: 342px;
}

.public-survey-card:hover {
  transform: translateY(-2px);
  border-color: #cdbca8;
  box-shadow: var(--soft-shadow);
}

.public-survey-thumb {
  min-height: 0;
  aspect-ratio: var(--survey-header-ratio, 3 / 1);
  border-bottom: 1px solid rgba(222, 210, 194, 0.9);
  background-color: var(--survey-bg, #fbf4e8);
  background-image: var(--survey-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--survey-header-fit, contain);
}

.public-survey-content {
  padding: 16px 16px 0;
}

.public-survey-card > .btn {
  justify-self: start;
  margin: 16px;
}

.public-survey-card h3 {
  margin: 14px 0 8px;
  font-size: 20px;
}

.public-survey-card p {
  margin: 0;
  color: var(--muted);
}

.public-topic-filter {
  display: grid;
  grid-template-columns: minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 0;
  border-top: 1px solid rgba(222, 210, 194, 0.92);
  border-bottom: 1px solid rgba(222, 210, 194, 0.92);
}

.public-topic-filter h3,
.public-topic-filter p,
.public-widget-head h3 {
  margin: 0;
}

.public-topic-filter p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.topic-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  cursor: pointer;
  padding: 8px 10px 8px 12px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.topic-chip:hover {
  transform: translateY(-1px);
  border-color: #cdbca8;
  box-shadow: var(--soft-shadow);
}

.topic-chip.active {
  border-color: rgba(15, 118, 110, 0.34);
  background: #e4f3ef;
  color: var(--teal-dark);
  font-weight: 800;
}

.topic-chip strong {
  display: grid;
  min-width: 28px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #31524e;
  font-size: 13px;
}

.public-widget-section {
  display: grid;
  gap: 14px;
}

.public-widget-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.survey-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08), transparent 32%),
    var(--surface);
  padding: 16px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.survey-card:hover {
  transform: translateY(-2px);
  border-color: #cdbca8;
  box-shadow: var(--soft-shadow);
}

.survey-card h3,
.survey-card p {
  margin: 0;
}

.survey-card h3 {
  font-size: 18px;
}

.survey-card p {
  color: var(--muted);
  margin-top: 6px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #efe8dc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.live {
  background: #dff2ec;
  color: #0c684c;
}

.badge.link {
  background: #f0e6ee;
  color: #76526f;
}

.badge.draft {
  background: #fff1d8;
  color: var(--amber);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.switch {
  color: #3a424b;
  font-weight: 700;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.media-field {
  padding: 12px;
  border: 1px solid rgba(222, 210, 194, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbf6ef);
}

.media-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.media-controls label {
  display: grid;
  gap: 7px;
}

.media-preview {
  position: relative;
  min-height: 118px;
  border: 1px solid rgba(222, 210, 194, 0.95);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    var(--media-preview-image) center / cover no-repeat,
    #f3eadf;
}

.media-preview.header-preview {
  min-height: 0;
  aspect-ratio: var(--survey-header-ratio, 3 / 1);
  background-size: var(--survey-header-fit, contain);
}

.media-preview span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.12);
}

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcfd);
  padding: 14px;
}

.question-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto;
  gap: 10px;
  align-items: end;
}

.question-title-field {
  grid-column: 1 / -1;
}

.question-title-field textarea {
  min-height: 72px;
  resize: vertical;
}

.question-comment-field {
  grid-column: 1 / -1;
}

.question-comment-field textarea {
  min-height: 64px;
  resize: vertical;
}

.question-item .options-field {
  margin-top: 12px;
}

.question-size-field {
  max-width: 280px;
  margin-top: 12px;
}

.preview-form {
  display: grid;
  gap: 14px;
}

.preview-question {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.preview-question:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.preview-question p {
  margin: 0 0 8px;
  font-weight: 700;
}

.question-comment {
  display: block;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.preview-question > input,
.preview-question > textarea {
  width: 100%;
  min-height: 46px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.preview-question > textarea {
  min-height: 170px;
  resize: vertical;
}

.preview-question > input:focus,
.preview-question > textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.answer-input.text-answer-compact {
  max-width: 280px;
}

.answer-input.text-answer-medium {
  max-width: 520px;
}

.answer-input.text-answer-wide {
  max-width: 100%;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3d4650;
}

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

.rating-row label {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.rating-row input {
  position: absolute;
  opacity: 0;
}

.rating-row label:has(input:checked) {
  border-color: var(--teal);
  background: #e1f1ee;
  color: var(--teal-dark);
  font-weight: 800;
}

.response-page {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(18px, 6vw, 46px);
}

.response-page .panel {
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f5eee3;
  font-size: 13px;
}

td {
  color: #303841;
}

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.summary-item h4 {
  margin: 0 0 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(120px, 1fr) 42px;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
  color: #424b56;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #ece1d3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--violet);
}

.empty {
  padding: 28px;
  border: 1px dashed #ccbdaa;
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.06), rgba(229, 126, 96, 0.07)),
    rgba(255, 255, 255, 0.72);
}

.response-success {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.response-success strong {
  color: var(--text);
  font-size: 18px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  border-radius: 8px;
  background: #20242a;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.user-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: #fff;
  white-space: nowrap;
}

.auth-switch {
  margin-top: 14px;
}

.auth-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf6ef;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.auth-form {
  max-width: 460px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.link-button {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--teal-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 8px 4px;
}

.link-button:hover {
  text-decoration: underline;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.auth-help {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(98, 81, 201, 0.06)),
    #fff;
  padding: 16px;
}

.auth-help h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.auth-help p {
  margin: 0 0 14px;
  color: var(--muted);
}

.auth-help ol {
  margin: 0;
  padding-left: 20px;
  color: #3d4650;
}

.auth-help li + li {
  margin-top: 8px;
}

.reset-link-box {
  display: grid;
  gap: 8px;
  border: 1px solid #b7d8d1;
  border-radius: 8px;
  background: #eef8f5;
  padding: 12px;
  color: #21443d;
}

.reset-link-box a {
  overflow-wrap: anywhere;
  color: var(--teal-dark);
  font-weight: 700;
}

.themed {
  color: var(--theme-text);
  background-color: var(--theme-bg);
}

.response-page.themed {
  max-width: none;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.82)),
    url("assets/survey-background.png?v=2");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.response-page-inner {
  max-width: 920px;
  margin: 0 auto;
}

.respond-header {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid rgba(222, 210, 194, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    var(--theme-surface);
  box-shadow: var(--soft-shadow);
}

.survey-header-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--survey-header-ratio, 3 / 1);
  border: 1px solid rgba(222, 210, 194, 0.88);
  border-radius: 8px;
  object-fit: var(--survey-header-fit, contain);
  object-position: center;
  background: #f3eadf;
}

.respond-copy {
  display: grid;
  min-width: 0;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.respond-kicker {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--theme-primary);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.respond-copy h2 {
  max-width: 100%;
  margin: 0;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.respond-copy p {
  max-width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.themed .panel,
.themed-panel {
  background: var(--theme-surface);
  color: var(--theme-text);
}

.response-page.themed .themed-panel {
  border-color: rgba(222, 210, 194, 0.9);
  box-shadow: var(--soft-shadow);
}

.response-page .preview-question {
  border: 1px solid rgba(222, 210, 194, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
}

.response-page .preview-question:last-child {
  border-bottom: 1px solid rgba(222, 210, 194, 0.9);
  padding-bottom: 16px;
}

.themed .btn.primary,
.theme-preview .btn.primary {
  background: var(--theme-primary);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.theme-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--soft-shadow);
}

.theme-preview {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background-color: var(--theme-bg);
  color: var(--theme-text);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.theme-preview.small {
  display: grid;
  min-height: 150px;
  align-items: end;
}

.theme-preview-form {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  background: var(--theme-surface);
  color: var(--theme-text);
  padding: 14px;
}

.theme-preview-form strong {
  color: var(--theme-primary);
}

.color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .layout,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
  }

  .sidebar button {
    width: auto;
    margin: 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-topic-filter {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-head,
  .survey-card {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .page-hero {
    min-height: 0;
    padding: 20px 20px 116px;
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 58%, rgba(255, 255, 255, 0.36) 100%),
      var(--hero-image);
    background-position: center, right 10px bottom -18px;
    background-size: cover, 218px auto;
  }

  .respond-header {
    gap: 14px;
  }

  .respond-copy h2 {
    font-size: 24px;
  }

  .form-grid,
  .question-top,
  .media-controls,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .public-survey-grid {
    grid-template-columns: 1fr;
  }

  .topic-chip {
    flex: 1 1 calc(50% - 8px);
    justify-content: space-between;
  }

  .public-widget-head {
    align-items: flex-start;
  }

  .row-actions,
  .question-actions,
  .top-actions,
  .export-actions {
    width: 100%;
  }

  .row-actions .btn,
  .top-actions .btn,
  .export-actions .btn {
    flex: 1 1 auto;
  }

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