:root {
  --bg: oklch(97% 0.006 70);
  --ink: oklch(18% 0.005 0);
  --ink-muted: oklch(48% 0.02 60);
  --ink-faint: oklch(62% 0.01 60);
  --rule: oklch(85% 0.01 60);
  --accent: oklch(38% 0.12 20);
  --accent-tint: oklch(93% 0.03 30);
  --letter-tint: oklch(90% 0.02 30);
  --warning-bg: oklch(93% 0.06 90);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--ink);
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 46px 24px 60px;
}

/* ---- Auth strip (login/register/logout) ---- */

.auth-strip {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.auth-strip a,
.auth-strip button {
  color: var(--ink-muted);
  text-decoration: none;
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.auth-strip a:hover,
.auth-strip button:hover {
  color: var(--accent);
}

.auth-strip .auth-user {
  color: var(--ink);
}

/* ---- Auth pages (registrace / přihlášení) ---- */

.auth-page {
  max-width: 380px;
  margin: 60px auto;
}

.auth-page h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 34px;
  text-align: center;
  margin: 0 0 8px;
}

.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.auth-form input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 8px 2px;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
}

.auth-form input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.auth-error {
  background: var(--warning-bg);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
}

.auth-submit {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 11px 18px;
  cursor: pointer;
  margin-top: 6px;
}

.auth-submit:hover {
  opacity: 0.9;
}

.auth-resend {
  margin-top: -6px;
}

.auth-submit-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.auth-note {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.6;
}

.auth-note strong {
  color: var(--ink);
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 22px;
}

/* ---- Masthead (index) ---- */

.masthead {
  text-align: center;
  margin-bottom: 8px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 56px;
  color: var(--ink);
  margin: 4px 0 6px;
}

.sub-kicker {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 30px;
}

/* ---- Filters ---- */

.filters {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  font-size: 13px;
  color: var(--ink-muted);
}

.filters input,
.filters select,
.filters button {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 6px 2px;
}

.filters input {
  border-bottom-color: var(--ink);
  min-width: 220px;
}

.filters input::placeholder {
  color: var(--ink-muted);
}

.filters button {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.filters .reset-link {
  font-size: 13px;
  text-decoration: none;
  color: var(--ink-muted);
}

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

/* ---- Recipe list, grouped by letter ---- */

.letter-row {
  display: flex;
  gap: 44px;
  margin-top: 26px;
}

.letter-row:first-of-type {
  margin-top: 0;
}

.letter {
  flex: 0 0 60px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 96px;
  line-height: 1;
  color: var(--letter-tint);
}

.letter-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recipe-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.recipe-line-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 21px;
  color: var(--ink);
  flex: 1;
}

.recipe-line-meta {
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-muted);
  white-space: nowrap;
}

.recipe-line-type {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.empty {
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
  margin-top: 40px;
}

/* ---- Detail page ---- */

.detail-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 40px;
}

.detail-nav a {
  text-decoration: none;
}

.detail-nav .sep {
  margin: 0 6px;
}

.detail-actions {
  display: flex;
  gap: 20px;
}

.action-btn {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  cursor: pointer;
  text-decoration: none;
}

.action-btn-primary {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.detail-kicker {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.detail-title {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 60px;
  color: var(--ink);
  line-height: 1.05;
  margin: 0;
}

.detail-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--ink-muted);
  margin-top: 12px;
}

.detail-author {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 12px 0 8px;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px auto 40px;
  width: 220px;
}

.ornament span {
  flex: 1;
  height: 1px;
  background: var(--accent);
}

.ornament i {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--accent);
  display: inline-block;
}

.warning {
  background: var(--warning-bg);
  padding: 12px 16px;
  border-radius: 4px;
  margin: 0 0 30px;
  font-size: 14px;
  text-align: center;
}

.detail-body {
  display: flex;
  gap: 64px;
}

.ingredients-col {
  flex: 0 0 240px;
  border-right: 1px solid var(--rule);
  padding-right: 40px;
}

.ingredients-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 18px;
}

.ingredients-col h2 {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  margin: 0;
}

.reset-checklist {
  font: inherit;
  font-family: "Work Sans", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  display: none;
}

.reset-checklist.is-visible {
  display: inline;
}

.reset-checklist:hover {
  color: var(--accent);
}

.ingredients-col h3 {
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 22px 0 10px;
}

.quantity-multiplier {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
}

.multiplier-btn {
  font: inherit;
  font-family: "Work Sans", sans-serif;
  font-size: 13px;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--ink-muted);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}

.multiplier-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.multiplier-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.instructions-col {
  flex: 1;
  min-width: 0;
}

.instructions-col h2 {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 18px;
}

.instructions {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  white-space: pre-wrap;
  max-width: 480px;
}

.instructions.dropcap::first-letter {
  font-family: "Cormorant Garamond", serif;
  font-size: 58px;
  font-weight: 600;
  float: left;
  line-height: 0.8;
  padding-right: 8px;
  padding-top: 4px;
  color: var(--accent);
}

.detail-footer {
  margin-top: 34px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* ---- Ingredient checklist ---- */

.ingredient-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ingredient-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.4;
}

.ingredient-checklist input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  border: 1.5px solid var(--ink-faint);
  background: transparent;
  position: relative;
  cursor: pointer;
}

.ingredient-checklist input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.ingredient-checklist input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}

.ingredient-checklist li.is-checked span {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.alt-sep {
  list-style: none;
  margin-left: 25px;
  color: var(--ink-muted);
  font-style: italic;
  font-size: 13px;
}

/* ---- Responsive ---- */

@media (max-width: 700px) {
  .page {
    padding: 32px 18px 48px;
  }

  .site-title {
    font-size: 42px;
  }

  .letter-row {
    gap: 18px;
  }

  .letter {
    flex: 0 0 40px;
    font-size: 52px;
  }

  .detail-title {
    font-size: 42px;
  }

  .detail-body {
    flex-direction: column;
    gap: 32px;
  }

  .ingredients-col {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding-right: 0;
    padding-bottom: 28px;
  }

  .instructions {
    max-width: none;
  }
}

/* ---- Print ---- */

@media print {
  .auth-strip,
  .detail-nav,
  .warning,
  .reset-checklist {
    display: none !important;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .detail-body {
    gap: 40px;
  }

  .ingredient-checklist input[type="checkbox"] {
    border-color: #333;
  }
}
