:root {
  color: #202124;
  background: #f8f9fa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; }

main {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

header {
  border-bottom: 1px solid #dfe1e5;
  padding-bottom: 28px;
}

.product-name,
.section-label {
  color: #5f6368;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 8px;
}

h1,
h2,
h3 { color: #202124; }

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
}

h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.32;
  margin: 0;
}

h3 {
  font-size: 0.9375rem;
  font-weight: 650;
  margin: 28px 0 8px;
}

.lede {
  color: #5f6368;
  line-height: 1.55;
  margin: 12px 0 0;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1.25fr auto;
  gap: 12px;
  align-items: end;
  margin: 24px 0 0;
}

label {
  color: #3c4043;
  display: grid;
  font-size: 0.8125rem;
  font-weight: 600;
  gap: 6px;
}

input {
  appearance: none;
  background: #fff;
  border: 1px solid #bdc1c6;
  border-radius: 4px;
  color: #202124;
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
}

input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 1px #1a73e8;
  outline: 0;
}

button {
  appearance: none;
  background: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 40px;
  padding: 8px 14px;
}

button:hover { background: #1765cc; border-color: #1765cc; }
button:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
button:disabled { cursor: wait; opacity: 0.65; }

#generate {
  background: #fff;
  border-color: #bdc1c6;
  color: #1a73e8;
}

#generate:hover { background: #f1f3f4; border-color: #9aa0a6; }

.action-note {
  color: #5f6368;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin: 10px 0 0;
}

#status {
  color: #5f6368;
  font-size: 0.875rem;
  margin: 14px 0 0;
  min-height: 21px;
}

#status.error { color: #b3261e; }

.card {
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 6px;
  margin-top: 24px;
  padding: 24px;
}

.hidden { display: none; }

.card-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.badge {
  background: #f1f3f4;
  border-radius: 999px;
  color: #3c4043;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 9px;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge.medium { background: #fef7e0; color: #795c00; }
.badge.high { background: #e6f4ea; color: #137333; }

.muted {
  color: #5f6368;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 8px 0 0;
}

#script-source { font-size: 0.8125rem; }

dl {
  border-top: 1px solid #e8eaed;
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 22px 0;
}

dt,
dd {
  border-bottom: 1px solid #e8eaed;
  font-size: 0.875rem;
  margin: 0;
  padding: 11px 0;
}

dd { color: #3c4043; font-weight: 600; }

ul,
ol { line-height: 1.55; margin: 8px 0 0; padding-left: 22px; }
li { margin: 0 0 8px; }
#setup, #check { line-height: 1.55; margin: 0; }

@media (max-width: 640px) {
  main { padding-top: 32px; }
  .controls { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .card-heading { display: block; }
  .badge { display: inline-block; margin-top: 12px; }
}
