:root {
  color-scheme: light;
  --bg: #eef8ff;
  --surface: #ffffff;
  --surface-soft: #f6fbff;
  --surface-blue: #f0f7ff;
  --text: #152238;
  --muted: #8293ad;
  --line: #dbe9ff;
  --line-strong: #b9d4ff;
  --primary: #2f6df6;
  --primary-dark: #1f55d8;
  --primary-soft: #eaf2ff;
  --violet: #8f5cf6;
  --orange: #ff7a18;
  --shadow: 0 18px 50px rgba(49, 111, 246, 0.11);
  --shadow-soft: 0 10px 28px rgba(49, 111, 246, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(135deg, #ffffff 0%, #f4fbff 36%, #eaf8ff 70%, #e1f8fb 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.app-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(219, 233, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  min-height: 60px;
  position: sticky;
  top: 0;
  z-index: 20;
}

@supports (backdrop-filter: blur(14px)) {
  .app-header {
    backdrop-filter: blur(14px);
  }
}

.nav-inner {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 60px;
  min-width: 0;
  width: min(1180px, calc(100% - 36px));
}

.brand {
  align-items: center;
  color: var(--primary);
  display: inline-flex;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  height: 34px;
  width: 34px;
}

.brand span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.brand strong {
  font-size: 18px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand small {
  color: #6f86a6;
  font-size: 12px;
  line-height: 1.1;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 34px;
  justify-content: center;
}

.site-nav a {
  color: #334563;
  font-size: 14px;
  font-weight: 700;
  min-height: 60px;
  padding: 20px 2px 16px;
  position: relative;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--primary);
}

.site-nav a.is-active::after {
  background: var(--orange);
  bottom: -1px;
  content: "";
  height: 2px;
  left: -18px;
  position: absolute;
  right: -18px;
}

.header-actions,
.dialog-actions,
.preview-actions {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.primary-button,
.ghost-button,
.icon-button,
.text-button,
.chip-button,
.primary-link {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0;
  min-width: 0;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.primary-button,
.primary-link {
  background: linear-gradient(135deg, #2f6df6, #3e84ff);
  border-color: #2f6df6;
  box-shadow: 0 10px 22px rgba(47, 109, 246, 0.23);
  color: #fff;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
}

.primary-button:hover,
.primary-link:hover {
  background: linear-gradient(135deg, #245dde, #2f6df6);
  box-shadow: 0 13px 28px rgba(47, 109, 246, 0.28);
  transform: translateY(-1px);
}

.ghost-button {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--text);
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
}

.ghost-button:hover,
.icon-button:hover,
.chip-button:hover {
  background: var(--primary-soft);
  border-color: #8bb7ff;
  box-shadow: var(--shadow-soft);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.ghost-button.compact {
  min-height: 36px;
}

.icon-button {
  aspect-ratio: 1;
  background: #fff;
  border-color: var(--line-strong);
  color: #273b58;
  flex: 0 0 auto;
  height: 36px;
  padding: 0;
}

.icon-button.is-active,
.chip-button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.text-button {
  background: transparent;
  color: var(--primary);
  gap: 6px;
  min-height: 34px;
  padding: 0 4px;
}

.text-button:hover {
  color: var(--orange);
}

.chip-button {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--primary);
  min-height: 34px;
  padding: 0 14px;
}

button svg,
a svg {
  height: 17px;
  width: 17px;
}

.hero-section {
  margin: 0 auto;
  max-width: 960px;
  padding: 62px 0 28px;
  text-align: center;
  width: min(960px, calc(100% - 36px));
}

.hero-section h1 {
  background: linear-gradient(90deg, #3e7cff 0%, #8460ff 52%, #c65de8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: clamp(34px, 4.4vw, 46px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.hero-section p {
  color: #8aa0bc;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.app-shell {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 233, 255, 0.96);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.86fr);
  margin: 0 auto 72px;
  max-width: 1180px;
  overflow: hidden;
  width: min(1180px, calc(100% - 36px));
}

.mode-strip {
  align-items: center;
  background: rgba(248, 252, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  grid-column: 1 / -1;
  justify-content: space-between;
  min-width: 0;
  padding: 16px 18px;
}

.tool-panel,
.list-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.editor-panel {
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto auto auto auto 460px;
  min-width: 0;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
}

.panel-heading,
.preview-heading,
.list-heading,
.dialog-heading {
  align-items: center;
  background: rgba(250, 253, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
}

.panel-heading h1,
.preview-heading h2,
.list-heading h2,
.dialog-heading h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

.panel-heading p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 0;
}

.visibility-toggle {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #31517d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
}

.visibility-toggle input {
  accent-color: var(--primary);
  height: 14px;
  margin: 0;
  width: 14px;
}

.meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.56fr);
  padding: 18px 18px 0;
}

.starter-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 18px 18px;
}

label {
  display: grid;
  gap: 7px;
}

label span,
.code-label {
  color: #647996;
  font-size: 12px;
  font-weight: 900;
}

input,
textarea {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  outline: none;
}

input {
  background: #fff;
  height: 40px;
  padding: 0 12px;
}

input::placeholder {
  color: #9aabc1;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.12);
}

.template-tabs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.template-tabs .chip-button {
  gap: 7px;
}

.code-toolbar {
  align-items: center;
  background: var(--surface-blue);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 10px 18px;
}

.code-label {
  padding: 0;
}

.code-badge {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
}

textarea {
  background: #fff;
  border: 0;
  border-radius: 0;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  height: 100%;
  line-height: 1.58;
  min-height: 0;
  padding: 18px;
  resize: none;
  scrollbar-color: #9ab9ef #f4f9ff;
  scrollbar-width: thin;
  width: 100%;
}

textarea::selection {
  background: rgba(47, 109, 246, 0.18);
}

.preview-heading {
  min-height: 67px;
}

.preview-stage {
  align-items: flex-start;
  background:
    linear-gradient(90deg, rgba(47, 109, 246, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 109, 246, 0.05) 1px, transparent 1px),
    #f4faff;
  background-size: 22px 22px;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.preview-stage iframe {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(49, 111, 246, 0.14);
  display: block;
  height: 100%;
  min-height: 520px;
  transition: width 180ms ease, box-shadow 180ms ease;
  width: 100%;
}

.preview-stage.is-mobile {
  align-items: center;
}

.preview-stage.is-mobile iframe {
  height: min(720px, 100%);
  width: min(390px, 100%);
}

.feature-band,
.pages-band {
  margin: 0 auto;
  max-width: 980px;
  padding: 0 0 72px;
  width: min(980px, calc(100% - 36px));
}

.content-shell {
  margin: 0 auto;
  max-width: 1080px;
  padding: 54px 0 80px;
  width: min(1080px, calc(100% - 36px));
}

.deploy-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 54px 0 80px;
  width: min(1180px, calc(100% - 36px));
}

.content-hero {
  margin: 0 auto 30px;
  max-width: 760px;
  text-align: center;
}

.content-hero p {
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 12px;
}

.content-hero h1 {
  background: linear-gradient(90deg, #3e7cff 0%, #8460ff 52%, #c65de8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 14px;
}

.content-hero span {
  color: #8aa0bc;
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(219, 233, 255, 0.96);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(47, 109, 246, 0.06);
  display: grid;
  gap: 8px;
  min-height: 116px;
  place-items: center;
  text-align: center;
}

.stat-card strong {
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 233, 255, 0.96);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.content-toolbar {
  align-items: center;
  background: rgba(248, 252, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px;
}

.content-toolbar h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 6px;
}

.content-toolbar p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.content-controls {
  align-items: center;
  display: flex;
  gap: 10px;
}

.search-box {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-width: 240px;
  padding: 0 11px;
}

.search-box svg {
  color: #7d92b0;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.search-box input {
  border: 0;
  box-shadow: none;
  height: 38px;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.search-box input:focus {
  box-shadow: none;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.content-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.content-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.content-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.content-card-main {
  min-width: 0;
}

.status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 24px;
  margin-bottom: 10px;
  padding: 0 10px;
}

.status-pill.is-public {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-pill.is-hidden {
  background: #fff3dc;
  color: #a75a00;
}

.status-pill.is-missing {
  background: #f1f5f9;
  color: #758398;
}

.content-card h3 {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}

.content-card-main > p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.content-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 12px;
}

.content-meta span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.content-meta svg {
  height: 14px;
  width: 14px;
}

.content-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.content-card-actions a,
.content-card-actions button {
  font-size: 13px;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
}

.danger-button:hover {
  background: #fff1ef;
  border-color: #ffb5aa;
  color: #c43a2d;
}

.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.deploy-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.62fr);
}

.deploy-form {
  display: grid;
  gap: 16px;
}

.deploy-panel,
.deploy-console-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 233, 255, 0.96);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(47, 109, 246, 0.06);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.deploy-panel-heading {
  align-items: center;
  display: flex;
  gap: 12px;
}

.deploy-panel-heading > svg {
  background: var(--primary-soft);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--primary);
  flex: 0 0 auto;
  height: 38px;
  padding: 9px;
  width: 38px;
}

.deploy-panel-heading h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 4px;
}

.deploy-panel-heading p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

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

.deploy-textarea {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  height: 122px;
  min-height: 122px;
  padding: 12px;
  resize: vertical;
}

.deploy-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.deploy-console-panel {
  position: sticky;
  top: 80px;
}

.deploy-console-panel pre {
  background: #0e1b2d;
  border-radius: 8px;
  color: #d8e7ff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-height: 620px;
  min-height: 420px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.section-heading {
  margin: 0 auto 26px;
  text-align: center;
}

.section-heading h2 {
  color: var(--text);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 12px;
}

.section-heading p {
  color: #8aa0bc;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.list-panel,
.page-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(219, 233, 255, 0.96);
  border-radius: 8px;
}

.feature-card {
  align-items: center;
  box-shadow: 0 10px 28px rgba(47, 109, 246, 0.06);
  display: grid;
  min-height: 160px;
  padding: 24px 18px;
  text-align: center;
}

.feature-card svg {
  color: var(--primary);
  height: 32px;
  margin: 0 auto 14px;
  width: 32px;
}

.feature-card h3 {
  color: var(--text);
  font-size: 16px;
  margin: 0 0 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

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

.list-panel {
  box-shadow: 0 10px 28px rgba(47, 109, 246, 0.06);
  overflow: hidden;
}

.page-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.page-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.page-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.page-card h3 {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.page-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-actions a,
.page-actions button {
  font-size: 13px;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
}

.page-actions svg {
  height: 15px;
  width: 15px;
}

.empty-state {
  background: var(--surface-blue);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 18px;
  text-align: center;
}

.share-dialog {
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(24, 45, 76, 0.24);
  max-width: min(520px, calc(100vw - 28px));
  padding: 0;
  width: 520px;
}

.share-dialog::backdrop {
  background: rgba(21, 34, 56, 0.36);
}

.share-dialog form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.share-dialog .dialog-heading {
  background: transparent;
  border-bottom: 0;
  padding: 0;
}

.share-dialog input {
  width: 100%;
}

.toast {
  background: #152238;
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 18px 40px rgba(21, 34, 56, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  left: 50%;
  max-width: min(520px, calc(100vw - 28px));
  opacity: 0;
  padding: 11px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 40;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .app-shell {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 980px) {
  .nav-inner {
    grid-template-columns: auto auto;
  }

  .site-nav {
    display: none;
  }

  .app-shell,
  .pages-layout {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    grid-template-rows: auto auto auto auto 430px;
  }

  .preview-panel {
    min-height: 600px;
  }

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

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

  .content-toolbar,
  .content-card {
    grid-template-columns: 1fr;
  }

  .content-card-actions {
    justify-content: flex-start;
  }

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

  .deploy-console-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding: 12px 0;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .header-actions button {
    width: 100%;
  }

  .header-actions .primary-button span,
  .header-actions .ghost-button span {
    display: none;
  }

  .hero-section {
    padding-top: 44px;
  }

  .meta-grid,
  .starter-row {
    grid-template-columns: 1fr;
  }

  .template-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mode-strip {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .chip-button {
    padding: 0 8px;
  }

  .panel-heading,
  .preview-heading,
  .list-heading {
    align-items: flex-start;
  }

  .preview-stage {
    padding: 12px;
  }

  .preview-stage iframe {
    min-height: 500px;
  }

  .content-controls {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-box {
    min-width: 0;
  }

  .filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .deploy-actions {
    display: grid;
  }
}

@media (max-width: 520px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-section h1 {
    font-size: 30px;
  }

  .mode-strip .template-tabs {
    grid-template-columns: 1fr;
  }

  .mode-strip .chip-button,
  .mode-strip .ghost-button {
    width: 100%;
  }

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

  .content-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-card-actions a,
  .content-card-actions button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .primary-button span,
  .ghost-button span {
    display: none;
  }

  .primary-button,
  .ghost-button {
    min-width: 42px;
    padding: 0 10px;
  }

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

  .page-actions a,
  .page-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
