/* Email Kitchen — Clean, modern recipe design inspired by Recipy */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --olive-leaf: #606c38;
  --black-forest: #283618;
  --cornsilk: #fefae0;
  --sunlit-clay: #dda15e;
  --copperwood: #bc6c25;

  --bg: #ffffff;
  --card-bg: var(--cornsilk);
  --text: var(--black-forest);
  --text-muted: #6b705c;
  --text-light: #8a8b7d;
  --border: #e9edc9;
  --border-light: #f4f1de;
  --accent: var(--copperwood);
  --accent-hover: #a55d1f;
  --accent-light: #fef3e6;
  --dark: var(--black-forest);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(40, 54, 24, 0.08);
  --shadow-hover: 0 8px 30px rgba(40, 54, 24, 0.12);
  --transition: all 0.2s ease;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.muted { color: var(--text-muted); font-size: 0.9rem; }

/* === Header === */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 32px;
  background: var(--black-forest);
  border-bottom: 1px solid rgba(254, 250, 224, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cornsilk);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}

.logo:hover { color: var(--sunlit-clay); text-decoration: none; }

.logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--olive-leaf) 0%, var(--black-forest) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cornsilk);
  flex-shrink: 0;
}

.logo-badge span:last-child {
  color: var(--sunlit-clay);
  margin-left: -1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(254, 250, 224, 0.7);
  text-decoration: none;
  border-radius: 999px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--cornsilk);
  background: rgba(254, 250, 224, 0.1);
  text-decoration: none;
}

.nav-link.active {
  color: var(--cornsilk);
  background: var(--copperwood);
  font-weight: 600;
}

.nav-email {
  color: rgba(254, 250, 224, 0.6);
  font-size: 0.85rem;
  padding: 0 12px;
  border-left: 1px solid rgba(254, 250, 224, 0.2);
  margin-left: 8px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout { display: inline; }

.btn-link {
  background: none;
  border: none;
  color: rgba(254, 250, 224, 0.7);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 18px;
  border-radius: 999px;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--cornsilk);
  background: rgba(254, 250, 224, 0.1);
}

/* === Footer === */
.site-footer {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.btn-small { padding: 8px 18px; font-size: 0.9rem; }

/* === Landing === */
.landing {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  letter-spacing: -0.02em;
}

.cta-box {
  background: var(--black-forest);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--copperwood);
  border-radius: 0 0 4px 4px;
}

.cta-label {
  font-size: 0.9rem;
  color: rgba(254, 250, 224, 0.6);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.cta-email {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sunlit-clay);
  margin-bottom: 12px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.cta-sub {
  color: rgba(254, 250, 224, 0.7);
  font-size: 0.95rem;
}

/* How it works - three dark cards */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.step-card {
  background: var(--black-forest);
  color: var(--cornsilk);
  border-radius: var(--radius);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--copperwood);
}

.step-card.step-1::before { background: var(--olive-leaf); }
.step-card.step-2::before { background: var(--sunlit-clay); }
.step-card.step-3::before { background: var(--copperwood); }

.step-number {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(254, 250, 224, 0.15);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--cornsilk);
}

.step-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(254, 250, 224, 0.8);
  margin: 0;
}

.step-card strong {
  color: var(--sunlit-clay);
  font-weight: 600;
}

/* Login section */
.login-section {
  background: var(--olive-leaf);
  border-radius: var(--radius);
  padding: 40px;
}

.login-section h2 {
  font-size: 1.15rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  color: var(--cornsilk);
}

.login-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.login-input {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  font-size: 1rem;
  padding: 14px 18px;
  border: 1.5px solid rgba(254, 250, 224, 0.3);
  border-radius: 999px;
  background: rgba(40, 54, 24, 0.3);
  color: var(--cornsilk);
  outline: none;
  transition: var(--transition);
}

.login-input:focus {
  border-color: var(--sunlit-clay);
  background: rgba(40, 54, 24, 0.5);
}

.login-input::placeholder { color: rgba(254, 250, 224, 0.5); }

.error-msg {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

/* === Check Email === */
.check-email {
  max-width: 480px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.check-email-box {
  background: var(--black-forest);
  border-radius: var(--radius);
  padding: 56px 40px;
  position: relative;
}

.check-email-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--copperwood);
  border-radius: 0 0 4px 4px;
}

.check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(254, 250, 224, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}

.check-email h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--cornsilk);
}

.check-email p {
  color: rgba(254, 250, 224, 0.9);
  font-size: 1rem;
}

.check-email strong {
  color: var(--sunlit-clay);
}

.check-email .muted {
  margin: 16px 0 32px;
  color: rgba(254, 250, 224, 0.6);
}

/* === Cookbook === */
.cookbook {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

.cookbook-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cookbook-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

/* Category filter - folksonomy tags */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  width: 100%;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

/* Recipe grid */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Recipe cards - image first */
.recipe-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.recipe-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}

.recipe-card-image {
  height: 180px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.recipe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-card-image img {
  transform: scale(1.03);
}

.recipe-card-image.placeholder {
  background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon { font-size: 2.5rem; opacity: 0.25; }

/* Category pill on image */
.recipe-card .recipe-category {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255,255,255,0.95);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  backdrop-filter: blur(4px);
}

.recipe-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recipe-card .recipe-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  flex: 1;
}

.recipe-card .recipe-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.recipe-card .recipe-meta::before {
  content: "•";
  color: var(--border);
}

.recipe-card .recipe-source {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

.empty-state h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.cookbook-footer {
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  color: var(--text-muted);
}

/* === Recipe Detail === */
.recipe-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
  width: 100%;
  overflow-x: hidden;
}

@media (min-width: 480px) {
  .recipe-detail {
    padding: 32px 24px;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-link:hover { color: var(--accent); }

/* Recipe content styling */
.recipe-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  max-width: 100%;
  overflow-x: hidden;
}

@media (min-width: 480px) {
  .recipe-content {
    padding: 32px;
  }
}

.recipe-content * {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.recipe-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.recipe-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.recipe-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.recipe-content ul,
.recipe-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.recipe-content li {
  margin-bottom: 8px;
}

.recipe-content p {
  margin-bottom: 16px;
  line-height: 1.6;
}

/* === FAQ === */
.faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
}

.faq h1 {
  font-size: 1.75rem;
  margin-bottom: 32px;
  font-weight: 700;
}

.faq-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.faq-section:last-of-type { border-bottom: none; }

.faq-section h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.faq-section p {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.faq-section ul,
.faq-section ol {
  margin-left: 24px;
  color: var(--text-muted);
}

.faq-section li { margin-bottom: 8px; }

.faq-footer {
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* === Add Recipe === */
.add-recipe {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
}

.add-recipe h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.add-recipe .subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.recipe-form {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: 24px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  resize: vertical;
  min-height: 200px;
  outline: none;
  transition: var(--transition);
}

.form-group textarea:focus { border-color: var(--accent); }

.form-group .hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.btn-large {
  width: 100%;
  padding: 16px 28px;
  font-size: 1rem;
}

.success-msg {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.success-msg a { color: #166534; text-decoration: underline; }

.add-recipe-help {
  background: var(--black-forest);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}

.add-recipe-help::before {
  content: "";
  position: absolute;
  top: 0;
  left: 32px;
  width: 60px;
  height: 4px;
  background: var(--copperwood);
  border-radius: 0 0 4px 4px;
}

.add-recipe-help h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--cornsilk);
}

.add-recipe-help p {
  color: rgba(254, 250, 224, 0.85);
  margin-bottom: 16px;
  line-height: 1.6;
}

.add-recipe-help strong {
  color: var(--sunlit-clay);
}

.add-recipe-help ul {
  color: rgba(254, 250, 224, 0.75);
  margin: 0 0 16px 20px;
}

.add-recipe-help li { margin-bottom: 8px; }

.hamster-note {
  background: rgba(254, 250, 224, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0 0 0;
  color: rgba(254, 250, 224, 0.5);
  font-size: 0.85rem;
  font-style: italic;
}

.hamster-note strong { color: var(--accent); }

/* === Mobile === */
@media (max-width: 768px) {
  .site-header {
    padding: 8px 12px;
    flex-wrap: nowrap;
  }
  .logo img {
    width: 140px;
    height: auto;
  }
  .site-nav {
    gap: 4px;
    flex-shrink: 0;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
  .btn-link {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
  .nav-email { display: none; }

  .hero-title { font-size: 1.9rem; }

  .cookbook-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .recipe-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .recipe-card-image { height: 150px; }

  .cta-box,
  .login-section,
  .recipe-form,
  .recipe-content,
  .add-recipe-help {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .how-it-works {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto 48px;
  }
  .step-card {
    padding: 28px 24px;
  }
}

@media (max-width: 480px) {
  .recipe-grid { grid-template-columns: 1fr; }
  .recipe-card-image { height: 200px; }
  .search-box { padding: 12px 18px; }
  .login-form { flex-direction: column; }
  .login-input { width: 100%; }
  .hero-title { font-size: 1.6rem; }
  .cta-box { padding: 32px 24px; }
  .cta-email { font-size: 1.3rem; }
  .step-card { padding: 24px 20px; }
  .step-number { font-size: 2.5rem; }
  .step-card h3 { font-size: 1.1rem; }
  .step-card p { font-size: 0.9rem; }
}

/* Landing page dark section text colors */
.login-section .muted {
  color: rgba(254, 250, 224, 0.6);
}
/* === Mobile Hamburger Menu === */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cornsilk);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--black-forest);
  border-bottom: 1px solid rgba(254, 250, 224, 0.1);
  padding: 16px;
  flex-direction: column;
  gap: 8px;
  z-index: 99;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-link {
  display: block;
  padding: 12px 16px;
  color: var(--cornsilk);
  text-decoration: none;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.mobile-nav-link:hover {
  background: rgba(254, 250, 224, 0.1);
}

.mobile-nav-email {
  padding: 12px 16px;
  color: rgba(254, 250, 224, 0.6);
  font-size: 0.85rem;
  border-top: 1px solid rgba(254, 250, 224, 0.1);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .site-header {
    padding: 8px 16px;
  }
  .logo img {
    width: 160px;
    height: auto;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none !important;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* Delete recipe button */
.delete-recipe-form {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(40, 54, 24, 0.1);
  text-align: center;
}

.delete-recipe-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.delete-recipe-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.delete-recipe-btn:active {
  transform: translateY(0);
}

/* Recipe meta bar */
.recipe-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Recipe meta pills (prep/cook/yields badges) */
.recipe-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.recipe-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid var(--sunlit-clay);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--black-forest);
  white-space: nowrap;
}

.recipe-meta-pill strong {
  color: var(--black-forest);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 480px) {
  .recipe-meta-bar {
    gap: 16px;
    margin-bottom: 24px;
  }
}

/* Recipe tables (timing, steps) */
.recipe-content table {
  table-layout: fixed;
  width: 100%;
}

.recipe-content td,
.recipe-content th {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Desktop: side-by-side columns - use important to override inline styles */
.recipe-step-table td.step-instruction {
  width: 55% !important;
}

.recipe-step-table td.step-action {
  width: 45% !important;
}

/* Mobile: stack columns vertically */
@media (max-width: 480px) {
  .recipe-step-table tr {
    display: flex;
    flex-direction: column;
  }
  
  /* Override inline width:50% styles on mobile - must use !important */
  .recipe-step-table td.step-instruction,
  .recipe-step-table td.step-action {
    width: 100% !important;
    display: block;
  }
  
  .recipe-step-table td.step-instruction {
    border-bottom: 1px solid rgba(221, 161, 94, 0.3);
  }
  
  /* Timing table: minimal padding to fit */
  .recipe-content table.recipe-timing-table {
    font-size: 0.75rem !important;
    table-layout: fixed;
    width: 100% !important;
  }
  
  .recipe-content table.recipe-timing-table * {
    font-size: 0.75rem !important;
  }
  
  .recipe-content table.recipe-timing-table th,
  .recipe-content table.recipe-timing-table td {
    padding: 4px 2px !important;
    line-height: 1.2 !important;
  }
  
  .recipe-content table.recipe-timing-table th:first-child,
  .recipe-content table.recipe-timing-table td:first-child {
    width: 50% !important;
    padding-left: 6px !important;
  }
  
  .recipe-content table.recipe-timing-table th:nth-child(2),
  .recipe-content table.recipe-timing-table td:nth-child(2),
  .recipe-content table.recipe-timing-table th:nth-child(3),
  .recipe-content table.recipe-timing-table td:nth-child(3) {
    width: 25% !important;
    text-align: center !important;
    padding: 4px 2px !important;
  }
  
  /* Meta pills table - wrap cells on mobile */
  .recipe-content table[style*="border-spacing: 8px"] {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  
  .recipe-content table[style*="border-spacing: 8px"] tr {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }
  
  .recipe-content table[style*="border-spacing: 8px"] td {
    display: inline-block !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: unset !important;
    max-width: unset !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
    margin-bottom: 4px;
  }

} /* end @media (max-width: 480px) */

/* === Subscription === */
.nav-upgrade {
  color: var(--accent) !important;
  font-weight: 600;
}

.upgrade-locked-banner {
  background: #3b2f1e;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin: 2.5rem 0 1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}
.upgrade-locked-banner .upgrade-locked-title { color: #fff; }
.upgrade-locked-banner .upgrade-locked-body { color: rgba(255,255,255,0.7); }
.upgrade-locked-banner .upgrade-locked-btn-secondary { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.3); }
.upgrade-locked-banner .upgrade-locked-btn-secondary:hover { color: #fff; border-color: #fff; }
.upgrade-locked-icon { font-size: 2.25rem; margin-bottom: 0.75rem; line-height: 1; }
.upgrade-locked-title { font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0 0 0.6rem; }
.upgrade-locked-body {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 0 auto 1.75rem;
  line-height: 1.5;
}
.upgrade-locked-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.upgrade-locked-btn-primary { padding: 12px 28px; font-size: 1rem; }
.upgrade-locked-btn-secondary {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}
.upgrade-locked-btn-secondary:hover { color: var(--accent); border-color: var(--accent); }

.sub-status { padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.sub-free    { background: #f0f0f0; color: #555; }
.sub-active  { background: #e8f5e9; color: #2e7d32; }
.sub-gifted  { background: #e3f2fd; color: #1565c0; }
.sub-canceled { background: #fce4ec; color: #b71c1c; }
.sub-past_due { background: #fff3e0; color: #e65100; }
