:root {
  --bg: #f5f5f5;
  --surface: #fff;
  --surface-hover: #e8e8e8;
  --text-primary: #1a1a1a;
  --text-heading: #111;
  --text-secondary: #333;
  --text-tertiary: #444;
  --text-muted: #444;
  --text-dim: #555;
  --text-faint: #666;
  --text-label: #111;
  --border: #e4e4e7;
  --border-input: #d1d1d6;
  --border-card-hover: #cbd5e1;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-disabled: #93b4f5;
  --blue-bg: #eef2ff;
  --badge-bg: #f4f4f5;
  --error: #dc2626;
  --success-border: #bbf7d0;
  --success-bg: #f0fdf4;
  --success-text: #166534;
  --callout-bg: #f0f4f8;
  --callout-border: #94a3b8;
  --callout-text: #334155;
  --callout-code-bg: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-focus: 0 0 0 3px rgba(37,99,235,0.1);
  --shadow-error: 0 0 0 3px rgba(220,38,38,0.1);
  --shadow-blue: 0 1px 6px rgba(37,99,235,0.3);
  --shadow-step: 0 2px 8px rgba(37,99,235,0.2);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 0.5px solid var(--border);
}

.site-nav-logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.site-nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 1.5rem;
}

.site-nav-link:hover {
  color: var(--text-primary);
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.header {
  margin-bottom: 36px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--badge-bg);
  padding: 3px 8px 3px 6px;
  border-radius: 5px;
}

.gw-badge {
  color: var(--blue);
  background: var(--blue-bg);
}

.header-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.header h1 {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.description {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.callout {
  background: var(--callout-bg);
  border-left: 3px solid var(--callout-border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--callout-text);
  line-height: 1.6;
}

.callout p {
  margin-bottom: 6px;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout ul {
  margin: 0 0 6px 18px;
  padding: 0;
}

.callout li {
  margin-bottom: 2px;
}

.callout code {
  font-size: 15px;
  background: var(--callout-code-bg);
  padding: 1px 5px;
  border-radius: 3px;
}

.field {
  margin-bottom: 20px;
}

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

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

.field-row input {
  flex: 1;
}

.guide-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: underline;
  margin-bottom: 6px;
}

.guide-link:hover {
  color: var(--blue);
}

label {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-label);
  margin-bottom: 2px;
}

.optional {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-faint);
  margin-left: 6px;
}

input[type="text"],
input[type="email"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-color: var(--blue);
  box-shadow: var(--shadow-focus);
}

input[type="text"].input-error,
input[type="email"].input-error {
  border-color: var(--error);
}

input[type="text"].input-error:focus,
input[type="email"].input-error:focus {
  box-shadow: var(--shadow-error);
}

.error {
  font-size: 15px;
  color: var(--error);
  margin-top: 4px;
}

.badge-optional {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface-hover);
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.password-gate {
  max-width: 420px;
  margin: 80px auto;
  text-align: center;
}

.password-gate h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-heading);
}

.password-gate p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.password-gate input[type="password"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 17px;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 12px;
  text-align: center;
}

.password-gate input[type="password"]:focus {
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}

.password-gate button {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.password-gate button:hover {
  background: var(--blue-hover);
}

.error-text {
  color: var(--error);
  font-weight: 500;
  margin-top: 16px;
}

.btn-download {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  margin-top: 24px;
}

.btn-download:hover:not(:disabled) {
  background: var(--blue-hover);
  box-shadow: var(--shadow-blue);
}

.btn-download:disabled {
  background: var(--blue-disabled);
  cursor: not-allowed;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.btn-group .btn-download {
  margin-top: 0;
}

.btn-download-outline {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--blue);
  background: transparent;
  border: 2px solid var(--blue);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-download-outline:hover:not(:disabled) {
  background: var(--blue-bg);
}

.btn-download-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.success-panel {
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 20px;
  font-size: 16px;
  color: var(--success-text);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .container {
    padding: 24px 16px 48px;
  }

  .section {
    padding: 16px;
  }
}

/* Landing page */

.landing {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 24px;
}

.hero {
  text-align: center;
  padding: 16px 0 28px;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.02em;
}

.hero-headline {
  font-size: 32px;
  font-weight: 750;
  color: var(--text-heading);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-subheadline {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 480px;
  margin: 0 auto 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.4;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: 1px solid var(--blue);
}

.btn-primary:hover {
  background: var(--blue-hover);
  box-shadow: var(--shadow-blue);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-bg);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 15px;
  border-radius: 6px;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.step {
  text-align: center;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: var(--shadow-step);
}

.step-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.step-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.templates-section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.template-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-card-hover);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
  flex: 1;
}

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

.footer {
  border-top: 1px solid var(--border);
  padding: 16px 0 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .landing {
    padding: 24px 16px 32px;
  }

  .hero {
    padding: 24px 0 40px;
  }

  .hero-headline {
    font-size: 30px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .btn {
    text-align: center;
    justify-content: center;
  }
}

/* Guide pages */
.guide-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.guide-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.guide-content h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  line-height: 1.3;
}

.guide-content h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-top: 8px;
}

.guide-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 8px;
}

.guide-content p {
  margin: 12px 0;
}

.guide-content strong {
  color: var(--text-primary);
}

.guide-content a {
  color: var(--blue);
  text-decoration: underline;
}

.guide-content a:hover {
  color: var(--blue-hover);
}

.guide-content code {
  font-family: monospace;
  font-size: 14px;
  background: var(--surface-hover);
  padding: 2px 6px;
  border-radius: 4px;
  border: 0.5px solid var(--border);
}

.guide-content pre {
  background: var(--surface-hover);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}

.guide-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
}

.guide-content ol,
.guide-content ul {
  padding-left: 1.5rem;
  margin: 12px 0;
}

.guide-content li {
  margin: 6px 0;
}

.guide-content hr {
  border: none;
  border-top: 0.5px solid var(--border);
  margin: 24px 0;
}

.guide-content img {
  width: 100%;
  border-radius: 6px;
  border: 0.5px solid var(--border);
  margin: 16px 0;
}

.guide-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 8px 16px;
  margin: 16px 0;
  background: var(--blue-bg);
  border-radius: 0 6px 6px 0;
  color: var(--text-primary);
}

/* Guide index page */
.guides-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.guide-entry {
  display: block;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guide-entry:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}



/* Landing page guides section */
.guides-section {
  max-width: 860px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.section-header {
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-header p {
  font-size: 14px;
  color: var(--text-dim);
}

.guide-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.guide-list li {
  border-bottom: 0.5px solid var(--border);
}

.guide-list li:last-child {
  border-bottom: none;
}

.guide-list-link {
  display: block;
  padding: 0.875rem 1.25rem;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.1s;
}

.guide-list-link:hover {
  background: var(--surface-hover);
}
