:root {
  --rss-primary: #f78c09;          /* RSS orange (from logo background) */
  --rss-primary-dark: #d97606;     /* darker hover state */
  --rss-accent: #122e7a;           /* RSS navy (from "Safe!" wordmark) */
  --rss-accent-light: #1f3f9c;
  --rss-bg: #fdfaf3;               /* warm off-white that plays with the orange */
  --rss-surface: #ffffff;
  --rss-text: #1a1a1a;
  --rss-muted: #5a5a5a;
  --rss-border: #ece6d8;
  --rss-success: #2a9d4f;
  --rss-shadow: 0 2px 8px rgba(18, 46, 122, 0.08);
  --rss-shadow-lg: 0 8px 24px rgba(18, 46, 122, 0.14);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--rss-bg);
  color: var(--rss-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--rss-border);
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  color: var(--rss-accent);
}
.logo-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: block;
  flex-shrink: 0;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--rss-accent);
  letter-spacing: -0.01em;
}
.logo-sub {
  font-size: 12px;
  color: var(--rss-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.tagline {
  font-size: 13px;
  color: var(--rss-muted);
  font-style: italic;
  text-align: right;
  max-width: 220px;
}
@media (max-width: 600px) {
  .tagline { display: none; }
}

/* Landing */
.hero {
  text-align: center;
  padding: 24px 0 40px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--rss-accent);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero h1 .accent {
  color: var(--rss-primary);
  font-style: italic;
}
.hero p {
  font-size: 17px;
  color: var(--rss-muted);
  max-width: 640px;
  margin: 0 auto;
}
/* Subhead: each sentence on its own line */
.hero p.subhead span {
  display: block;
}
.hero p.subhead span + span {
  margin-top: 6px;
}
@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
/* When only one template is active, center the card at a natural width
   instead of stretching it across the full row. */
.template-grid.single {
  grid-template-columns: minmax(280px, 360px);
  justify-content: center;
}
.template-card {
  background: var(--rss-surface);
  border: 2px solid var(--rss-border);
  border-radius: 16px;
  padding: 28px 24px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: left;
  font-family: inherit;
}
.template-card:hover, .template-card:focus {
  transform: translateY(-3px);
  box-shadow: var(--rss-shadow-lg);
  border-color: var(--rss-primary);
  outline: none;
}
.template-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(247, 140, 9, 0.12);
  color: var(--rss-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
}
/* Image icon (e.g. Coney) — drop the tinted square, let the illustration breathe */
.template-icon--img {
  background: transparent;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
}
.template-icon--img .icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.template-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--rss-accent);
  letter-spacing: -0.01em;
}
.template-card p {
  margin: 0 0 16px;
  color: var(--rss-muted);
  font-size: 14px;
}
.template-card .pick-btn {
  font-weight: 700;
  color: var(--rss-primary);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Form view */
.form-view {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 800px) {
  .form-view {
    grid-template-columns: 1fr;
  }
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rss-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.back-link:hover {
  color: var(--rss-primary);
}

.form-panel, .preview-panel {
  background: var(--rss-surface);
  border: 1px solid var(--rss-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--rss-shadow);
}
.form-panel h2, .preview-panel h2 {
  font-family: var(--font-display);
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--rss-accent);
  letter-spacing: -0.01em;
}
.panel-sub {
  margin: 0 0 20px;
  color: var(--rss-muted);
  font-size: 14px;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--rss-accent);
}
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--rss-border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--rss-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--rss-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(247, 140, 9, 0.15);
}

.optin {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--rss-muted);
  margin: 20px 0 8px;
  cursor: pointer;
}
.optin input {
  margin: 2px 0 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Preview */
.preview-subject {
  font-weight: 600;
  font-size: 14px;
  padding: 12px 14px;
  background: var(--rss-bg);
  border-radius: 10px;
  margin-bottom: 12px;
  color: var(--rss-accent);
  border-left: 4px solid var(--rss-primary);
}
.preview-body {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.65;
  padding: 18px;
  background: var(--rss-bg);
  border-radius: 10px;
  border: 1px solid var(--rss-border);
  max-height: 480px;
  overflow-y: auto;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: #2a2a2a;
}

/* Action buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.btn {
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--rss-primary);
  color: white;
  box-shadow: 0 2px 0 var(--rss-primary-dark);
}
.btn-primary:hover {
  background: var(--rss-primary-dark);
  box-shadow: 0 1px 0 var(--rss-primary-dark);
}
.btn-secondary {
  background: white;
  color: var(--rss-accent);
  border: 1.5px solid var(--rss-border);
}
.btn-secondary:hover {
  border-color: var(--rss-accent);
  background: var(--rss-bg);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Paste hint — revealed after "Open in Email" copies the letter to the clipboard */
.email-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--rss-accent);
  background: rgba(247, 140, 9, 0.08);
  border-left: 3px solid var(--rss-primary);
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
}

/* "Now what?" — revealed after the parent emails / copies / downloads */
.next-steps {
  margin-top: 20px;
  padding: 18px 20px;
  background: rgba(247, 140, 9, 0.08);
  border: 1px solid var(--rss-border);
  border-left: 4px solid var(--rss-primary);
  border-radius: 10px;
}
.next-steps h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--rss-accent);
  letter-spacing: -0.01em;
}
.next-steps p {
  margin: 0;
  font-size: 14px;
  color: var(--rss-muted);
  line-height: 1.55;
}
.next-steps a {
  color: var(--rss-primary);
  font-weight: 600;
  text-decoration: none;
}
.next-steps a:hover {
  text-decoration: underline;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--rss-accent);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--rss-shadow-lg);
  transition: transform 0.25s ease;
  z-index: 100;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

footer {
  text-align: center;
  padding: 40px 0 24px;
  color: var(--rss-muted);
  font-size: 13px;
}
footer a {
  color: var(--rss-primary);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
/* Orange call-to-action button above the footer text */
.footer-cta {
  display: inline-block;
  background: var(--rss-primary);
  color: white !important;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 22px;
  box-shadow: 0 2px 0 var(--rss-primary-dark);
  transition: background 0.15s ease;
}
.footer-cta:hover {
  background: var(--rss-primary-dark);
  text-decoration: none !important;
}
.footer-line {
  margin: 0 0 14px;
}
/* Brand name in RSS navy */
footer a.brand {
  color: var(--rss-accent);
  font-weight: 700;
}
.footer-disclaimer {
  max-width: 720px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--rss-muted);
  opacity: 0.85;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}
/* Last deploy via CD: 2026-05-13 */
