:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #5e6d79;
  --line: #d9e1e7;
  --surface: #ffffff;
  --soft: #f3f6f8;
  --navy: #173f5f;
  --navy-dark: #102f48;
  --teal: #167b77;
  --teal-soft: #e7f5f2;
  --danger: #aa2e25;
  --danger-soft: #fff0ef;
  --success: #26734d;
  --success-soft: #ebf7f0;
  --shadow: 0 14px 40px rgba(23, 63, 95, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(22, 123, 119, 0.09), transparent 28rem),
    #f7f9fa;
}

button, input { font: inherit; }
a { color: inherit; }

.site-header {
  height: 68px;
  padding: 0 max(24px, calc((100vw - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--navy-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: var(--teal);
}

.docs-link {
  color: #dce7ee;
  font-size: 14px;
  text-underline-offset: 4px;
}

main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.hero { padding: 72px 0 42px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 670px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.template-banner, .workspace {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.template-banner {
  padding: 24px 26px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--navy);
  background: var(--teal-soft);
  font-weight: 800;
}

.template-copy h2, .section-heading h2 { margin-bottom: 5px; font-size: 20px; }
.template-copy p, .section-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.button {
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:focus-visible, .tab:focus-visible, .file-field:focus-within .file-picker { outline: 3px solid rgba(22, 123, 119, 0.25); outline-offset: 2px; }
.button-secondary { border-color: #b9c9d3; color: var(--navy); background: #fff; }
.button-secondary:hover { border-color: var(--navy); }
.button-primary { min-width: 260px; color: #fff; background: var(--navy); }
.button-primary:hover { background: var(--navy-dark); }
.button:disabled { cursor: wait; opacity: 0.75; transform: none; }

.workspace { margin-top: 24px; overflow: hidden; }
.section-heading { padding: 26px; display: flex; align-items: center; gap: 18px; }
.tabs { padding: 0 26px; display: flex; gap: 30px; border-bottom: 1px solid var(--line); }
.tab {
  margin-bottom: -1px;
  padding: 15px 2px 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.tab.is-active { border-bottom-color: var(--teal); color: var(--navy); }
.panel { padding: 30px 26px 32px; }
.panel-intro { max-width: 760px; margin-bottom: 24px; }
.panel-intro h3 { margin-bottom: 7px; font-size: 19px; }
.panel-intro p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.generator-form { max-width: 920px; }
.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.file-field { display: block; margin-bottom: 22px; }
.file-label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 700; }
.file-label strong { margin-left: 5px; color: var(--teal); font-size: 12px; }
.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.file-picker {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid #bfcbd4;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.choose-text { align-self: stretch; padding: 0 16px; display: flex; align-items: center; border-right: 1px solid var(--line); color: var(--navy); background: var(--soft); font-weight: 700; }
.file-name { padding: 0 16px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.file-field small { display: block; margin-top: 7px; color: var(--muted); }
.form-status { min-height: 22px; margin-top: 14px; font-size: 14px; }
.form-status.is-error, .form-status.is-success { width: fit-content; padding: 9px 12px; border-radius: 7px; }
.form-status.is-error { color: var(--danger); background: var(--danger-soft); }
.form-status.is-success { color: var(--success); background: var(--success-soft); }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  margin: 22px 0 64px;
  padding: 17px 20px;
  display: flex;
  gap: 13px;
  border: 1px solid #bdded9;
  border-radius: 10px;
  color: #345e5b;
  background: #eff9f7;
}
.notice > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-weight: 800; }
.notice p { margin: 0; font-size: 14px; line-height: 1.6; }
footer { padding: 22px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; text-align: center; font-size: 13px; }

@media (max-width: 720px) {
  .site-header { padding: 0 20px; }
  main { width: min(100% - 28px, 1080px); }
  .hero { padding: 48px 0 30px; }
  .template-banner { grid-template-columns: auto 1fr; }
  .template-banner .button { grid-column: 1 / -1; }
  .file-grid { grid-template-columns: 1fr; gap: 0; }
  .button-primary { width: 100%; }
  .tabs { gap: 18px; overflow-x: auto; }
  .tab { white-space: nowrap; }
}
