:root {
  --bg: #eef4f7;
  --panel: #ffffff;
  --panel-soft: #f6fbff;
  --text: #102030;
  --muted: #577086;
  --border: #c9dae6;
  --accent: #0ea5e9;
  --accent-dark: #0369a1;
  --accent-soft: #e0f2fe;
  --shadow: 0 18px 48px rgba(10, 29, 48, 0.08);
  --radius: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.08), transparent 38%),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
}

.builder-shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 28px auto 44px;
}

.builder-header {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.builder-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: Arial, sans-serif;
}

.brand-link,
.tools-link {
  text-decoration: none;
  font-weight: 700;
}

.tools-link {
  color: var(--accent-dark);
}

.hero-card,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(201, 218, 230, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card {
  padding: 30px 32px;
}

.eyebrow,
.panel-kicker,
.formula-label {
  margin: 0 0 10px;
  font-family: Arial, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.hero-card h1,
.panel-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  line-height: 1.02;
}

.panel-head h2 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.hero-copy,
.panel-intro,
.guide-copy,
.formula-card p {
  margin: 14px 0 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.04rem;
}

.app-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  margin-bottom: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-body {
  padding: 24px 28px 28px;
}

.field,
.field-row {
  display: grid;
  gap: 10px;
}

.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label span {
  font-family: Arial, sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 112px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(14, 165, 233, 0.22);
  border-color: var(--accent);
}

.slug-row,
.preset-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.preset-button {
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.primary-button,
.ghost-button {
  padding: 12px 16px;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.24);
}

.ghost-button {
  background: var(--panel-soft);
  color: var(--accent-dark);
  border-color: rgba(14, 165, 233, 0.24);
}

.preset-button {
  padding: 10px 14px;
  background: #fff;
  border-color: var(--border);
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.preset-button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.primary-button:hover,
.ghost-button:hover,
.preset-button:hover {
  transform: translateY(-1px);
}

.formula-card {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--panel-soft);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.formula-card.emphasis {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
}

.formula-card code,
.guide-copy code {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-dark);
  font-family: "Courier New", monospace;
  font-size: 0.92em;
}

.preset-list {
  display: grid;
  gap: 14px;
}

.preset-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
}

.preset-meta {
  display: grid;
  gap: 6px;
}

.preset-meta h3 {
  margin: 0;
  font-size: 1.08rem;
}

.preset-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-family: Arial, sans-serif;
  color: var(--muted);
  font-size: 0.84rem;
}

.preset-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid rgba(201, 218, 230, 0.9);
}

.preset-url {
  word-break: break-all;
  color: var(--accent-dark);
  line-height: 1.5;
  font-size: 0.95rem;
}

.copy-button {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: #fff;
  color: var(--accent-dark);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.guide-copy ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .app-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .builder-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .preset-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .builder-shell {
    width: min(100vw - 22px, 100%);
    margin: 12px auto 24px;
  }

  .hero-card,
  .panel-body,
  .panel-head {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-card h1 {
    font-size: 2rem;
  }
}
