:root {
  --bg: #0b132b;
  --card: #ffffff;
  --accent: #e63946;
  --secondary: #1d3557;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #1d3557, #0b132b);
  color: #111;
}

.site-header {
  text-align: center;
  padding: 32px 16px;
  color: #fff;
}

.site-header h1 {
  margin: 0;
  font-size: 2.2rem;
}

.tagline {
  margin-top: 8px;
  opacity: 0.85;
}

.recipe-card {
  background: var(--card);
  max-width: 720px;
  margin: 24px auto;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.recipe-card h2 {
  margin-top: 0;
  color: var(--secondary);
}

.recipe-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  margin: 16px 0;
}

.meta {
  display: flex;
  gap: 16px;
  font-weight: 600;
  margin-bottom: 24px;
}

h3 {
  color: var(--secondary);
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: 4px;
}

ul, ol {
  padding-left: 20px;
}

li {
  margin: 8px 0;
}

.notes {
  background: #f8f9fa;
  border-left: 6px solid var(--accent);
  padding: 16px;
  border-radius: 8px;
}

.site-footer {
  text-align: center;
  color: #ccc;
  padding: 16px;
  font-size: 0.9rem;
}

.tile-image {
  width: 140px;
  height: 92px;
  object-fit: cover;
  border-radius: 10px;
}

@media (max-width: 520px) {
  .tile-image {
    width: 100%;
    height: 160px;
  }
}

/* --- Timed method: less bunched, more readable --- */
.timed-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.timed-steps li {
  background: #f8f9fa;
  border: 1px solid rgba(29,53,87,0.12);
  border-left: 6px solid rgba(230,57,70,0.65);
  border-radius: 12px;
  padding: 14px 14px 12px;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.t {
  display: inline-block;
  font-weight: 900;
  color: var(--secondary);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(29,53,87,0.08);
  min-width: 96px;
  text-align: center;
}

.step-title {
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.15;
}

.step-body {
  margin: 0;
}

.step-body p {
  margin: 0 0 10px;
}

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

/* --- Why? disclosure --- */
.why {
  margin-top: 10px;
  background: #ffffff;
  border: 1px dashed rgba(29,53,87,0.18);
  border-radius: 10px;
  padding: 10px 12px;
}

.why summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--secondary);
  user-select: none;
}

.why summary::marker {
  color: rgba(230,57,70,0.9);
}

.why p {
  margin: 10px 0 0;
  opacity: 0.9;
}

/* =========================
   Ingredients table styling
   ========================= */

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 24px;
}

.ingredients {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  overflow: hidden;
  font-size: 0.95rem;
}

.ingredients thead th {
  background: linear-gradient(
    to bottom,
    rgba(29,53,87,0.08),
    rgba(29,53,87,0.02)
  );
  color: var(--secondary);
  font-weight: 900;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 2px solid rgba(230,57,70,0.6);
}

.ingredients tbody td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(29,53,87,0.10);
}

/* Remove final border */
.ingredients tbody tr:last-child td {
  border-bottom: none;
}

/* Qty column */
.ingredients td:first-child {
  font-weight: 900;
  white-space: nowrap;
  color: rgba(29,53,87,0.95);
  font-variant-numeric: tabular-nums;
}

/* Ingredient name column */
.ingredients td:nth-child(2) {
  font-weight: 700;
}

/* Notes column */
.ingredients td:last-child {
  color: rgba(0,0,0,0.75);
  font-size: 0.9rem;
}

/* Row hover – subtle, not wanky */
.ingredients tbody tr:hover {
  background: rgba(29,53,87,0.04);
}

/* Mobile tightening */
@media (max-width: 520px) {
  .ingredients thead th,
  .ingredients tbody td {
    padding: 10px 10px;
  }
}

.disclaimer {
  border-left-color: rgba(29,53,87,0.6);
  background: rgba(29,53,87,0.04);
}

/* =========================
   Back / breadcrumb link
   ========================= */

.breadcrumb {
  margin-bottom: 16px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 14px;
  border-radius: 999px;

  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;

  color: var(--secondary);
  background: rgba(29,53,87,0.06);
  border: 1px solid rgba(29,53,87,0.15);

  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.home-link:hover {
  background: rgba(29,53,87,0.12);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  transform: translateX(-2px);
}

.home-link:active {
  transform: translateX(-1px) scale(0.98);
}

/* optional: tone it down on very small screens */
@media (max-width: 520px) {
  .breadcrumb {
    margin-bottom: 12px;
  }
}

/* =========================
   Recipe list (homepage)
   ========================= */

.recipe-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.recipe-tile {
  display: block;
  text-decoration: none;
  color: inherit;
}

.recipe-tile-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;

  border: 1px solid rgba(29,53,87,0.12);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.recipe-tile:hover .recipe-tile-content {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
  border-color: rgba(230,57,70,0.6);
}

.recipe-tile h3 {
  margin: 0 0 6px 0;
  color: var(--secondary);
}

.recipe-tile .subtitle {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

.recipe-tile .meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.75;
}

/* Grid layout when you have more recipes */
@media (min-width: 640px) {
  .recipe-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* =========================
   Recipe tile thumbnails
   ========================= */

.recipe-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.recipe-tile-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.recipe-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ensure card + image behave as one unit */
.recipe-tile-content {
  border-radius: 0 0 16px 16px;
}

/* Hover: subtle image presence change */
.recipe-tile:hover img {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}
