/* Milliliter.info - Kitchen Powder Blue (1950s) */

:root {
  --blue: #6ba3be;
  --blue-dark: #3d7a95;
  --blue-pale: #e8f1f5;
  --red: #c44536;
  --red-light: #fce8e5;
  --cream: #fefbf3;
  --warm: #f5efe3;
  --ink: #2b2b2b;
  --ink-mid: #5c5c5c;
  --ink-light: #8a8a8a;
  --white: #ffffff;
  --border: #d5dde0;
  --radius: 10px;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); }

/* Skip Link */
.skip-link { position: absolute; top: -100%; left: 0; background: var(--red); color: #fff; padding: 12px 24px; font-weight: 600; z-index: 200; }
.skip-link:focus { top: 0; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Header */
header { background: var(--white); border-bottom: 3px solid var(--blue); }
.header-inner { max-width: 920px; margin: 0 auto; padding: 0.75rem 24px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-img { height: 100px; width: auto; }
.logo-text { font-family: var(--font-head); font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.logo-text em { color: var(--red); font-style: normal; }
nav { display: flex; gap: 1.25rem; }
nav a { font-size: 0.82rem; font-weight: 600; color: var(--ink-mid); transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--red); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 4px; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: 0.2s; }

/* Hero */
.hero { background: var(--blue); padding: 2.25rem 24px 2.75rem; text-align: center; position: relative; }
.ribbon { display: inline-block; background: var(--red); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; padding: 0.3rem 1.75rem; margin-bottom: 0.65rem; position: relative; }
.ribbon::before, .ribbon::after { content: ''; position: absolute; bottom: -5px; width: 0; height: 0; border-style: solid; }
.ribbon::before { left: 0; border-width: 5px 0 0 7px; border-color: #8b2d22 transparent transparent transparent; }
.ribbon::after { right: 0; border-width: 5px 7px 0 0; border-color: #8b2d22 transparent transparent transparent; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; color: var(--white); line-height: 1.2; }
.hero-sub { color: rgba(255,255,255,.6); font-size: 0.88rem; margin-top: 0.35rem; }

/* 28. Breadcrumb - Retro Pfeil-Kette */
.breadcrumb { max-width: 920px; margin: 0 auto; padding: 0.6rem 24px; font-size: 0.75rem; color: var(--ink-light); display: flex; align-items: center; gap: 0; }
.breadcrumb a { color: var(--ink-mid); background: var(--blue-pale); padding: 0.2rem 0.6rem 0.2rem 0.75rem; position: relative; margin-right: 0.35rem; border-radius: 2px; transition: background 0.15s; }
.breadcrumb a::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); border: 5px solid transparent; border-left: 6px solid var(--blue-pale); transition: border-color 0.15s; }
.breadcrumb a:hover { background: var(--blue); color: var(--white); }
.breadcrumb a:hover::after { border-left-color: var(--blue); }
.breadcrumb .sep { display: none; }
.breadcrumb .current { padding: 0.2rem 0.5rem; color: var(--ink-mid); font-weight: 600; }

/* Answer Box */
.answer { max-width: 920px; margin: -1.25rem auto 0; padding: 0 24px; position: relative; z-index: 2; }
.answer-card { background: var(--white); border-radius: var(--radius); padding: 1.75rem; display: flex; align-items: center; gap: 1.75rem; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.answer-visual { width: 70px; height: 90px; border: 3px solid var(--blue); border-radius: 3px 3px 6px 6px; position: relative; background: linear-gradient(to top, var(--blue-pale) 40%, transparent 40%); flex-shrink: 0; }
.answer-visual::after { content: attr(data-ml); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-head); font-size: 1.1rem; font-weight: 900; color: var(--blue-dark); text-align: center; }
.answer-text h2 { font-size: 1.6rem; font-weight: 900; line-height: 1.2; }
.answer-text h2 em { color: var(--red); font-style: normal; }
.answer-text p { color: var(--ink-mid); font-size: 0.88rem; margin-top: 0.25rem; }

/* Calculator */
.calc { max-width: 920px; margin: 1.75rem auto; padding: 0 24px; }
.calc-box { background: var(--warm); border: 2px dashed var(--blue); border-radius: var(--radius); padding: 1.25rem 1.5rem; text-align: center; }
.calc-row { display: flex; gap: 0.75rem; align-items: end; justify-content: center; margin-bottom: 0.75rem; }
.calc-field label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-dark); display: block; margin-bottom: 0.2rem; }
.calc-field input[type="number"] { width: 140px; padding: 0.55rem; font-size: 1.1rem; font-family: var(--font-head); font-weight: 700; border: 2px solid var(--blue); border-radius: 6px; text-align: center; background: var(--white); transition: border-color 0.2s; }
.calc-field input[type="number"]:focus { outline: none; border-color: var(--red); }
.calc-eq { font-family: var(--font-head); font-size: 1.1rem; color: var(--blue-dark); padding-bottom: 0.35rem; }
.calc-slider { width: 100%; max-width: 360px; margin: 0 auto; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: var(--blue-pale); outline: none; cursor: pointer; }
.calc-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); border: 3px solid var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; transition: background 0.15s; }
.calc-slider::-webkit-slider-thumb:hover { background: var(--red); }
.calc-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); border: 3px solid var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; }
.calc-result { font-family: var(--font-head); font-size: clamp(2.5rem, 8vw, 3.5rem); font-weight: 900; color: var(--ink); line-height: 1; margin-top: 0.5rem; transition: color 0.15s; }
.calc-result em { font-style: normal; color: var(--red); font-size: 0.4em; vertical-align: baseline; }
.calc-result.counting { color: var(--blue-dark); }

/* Table */
.table-wrap { max-width: 920px; margin: 2rem auto; padding: 0 24px; }
.section-title { font-size: 1.1rem; font-weight: 900; margin-bottom: 0.65rem; }
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.03); }
th { background: var(--blue); color: var(--white); padding: 0.5rem 0.75rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; text-align: left; }
td { padding: 0.45rem 0.75rem; font-size: 0.88rem; border-bottom: 1px solid var(--blue-pale); }
tr:hover { background: var(--blue-pale); }

/* Content */
.content { max-width: 680px; margin: 2rem auto; padding: 0 24px; }
.content h2 { font-size: 1.1rem; font-weight: 900; margin: 1.75rem 0 0.5rem; }
.content p { font-size: 0.92rem; line-height: 1.7; color: var(--ink-mid); margin-bottom: 0.85rem; }
.content ul, .content ol { margin: 0 0 0.85rem 1.5rem; color: var(--ink-mid); font-size: 0.92rem; }
.content li { margin-bottom: 0.3rem; }
.content a { color: var(--red); font-weight: 600; }
.content strong { color: var(--ink); }

/* 7. Hint Box - Briefmarken-Zackenrand */
.hint { background: var(--warm); padding: 1rem 1.15rem; margin: 1.25rem 0; display: flex; gap: 0.65rem; align-items: flex-start; border: none; border-radius: 0; position: relative; filter: drop-shadow(0 1px 2px rgba(0,0,0,.06)); }
.hint::before { content: ''; position: absolute; inset: -6px; background: var(--warm); mask: radial-gradient(circle 4px at 4px 4px, transparent 3.5px, #000 4px) -4px -4px / 8px 8px; -webkit-mask: radial-gradient(circle 4px at 4px 4px, transparent 3.5px, #000 4px) -4px -4px / 8px 8px; z-index: -1; }
.hint-icon { font-size: 1.1rem; flex-shrink: 0; }
.hint p { margin: 0; font-size: 0.85rem; color: var(--ink-mid); }
.hint strong { color: var(--ink); }

/* Tip Box - Briefmarken-Zackenrand */
.tip-red { background: var(--blue-pale); padding: 1rem 1.15rem; margin: 1.25rem 0; position: relative; border: none; border-radius: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.06)); }
.tip-red::before { content: ''; position: absolute; inset: -6px; background: var(--blue-pale); mask: radial-gradient(circle 4px at 4px 4px, transparent 3.5px, #000 4px) -4px -4px / 8px 8px; -webkit-mask: radial-gradient(circle 4px at 4px 4px, transparent 3.5px, #000 4px) -4px -4px / 8px 8px; z-index: -1; }
.tip-red strong { color: var(--blue-dark); display: block; margin-bottom: 0.15rem; font-size: 0.88rem; }
.tip-red p { margin: 0; font-size: 0.85rem; color: var(--ink-mid); }

/* 25. Kochbuch-Zitat */
.retro-quote { position: relative; margin: 1.5rem 0; padding: 1rem 1.25rem 1rem 3rem; background: var(--warm); border-left: 3px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-head); font-size: 0.95rem; font-style: italic; color: var(--ink-mid); line-height: 1.6; }
.retro-quote::before { content: '\201E'; position: absolute; left: 0.75rem; top: 0.5rem; font-size: 2.2rem; color: var(--blue); font-style: normal; line-height: 1; opacity: 0.5; }
.retro-quote cite { display: block; font-family: var(--font-body); font-size: 0.72rem; font-style: normal; color: var(--ink-light); margin-top: 0.4rem; }

/* 26. Omas Geheimtipp */
.oma-tipp { position: relative; background: var(--white); border: 2px solid var(--warm); border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem; margin: 1.5rem 0; }
.oma-tipp::before { content: '✿ Omas Geheimtipp'; position: absolute; top: -0.7rem; left: 1rem; background: var(--cream); padding: 0 0.5rem; font-family: var(--font-head); font-size: 0.72rem; font-weight: 700; color: var(--red); letter-spacing: 0.05em; }
.oma-tipp p { margin: 0; font-size: 0.88rem; color: var(--ink-mid); line-height: 1.6; }

/* 18. Geprägte Antwort-Zahl */
.answer-text h2 { text-shadow: 1px 1px 0 rgba(0,0,0,.08); }
.answer-text h2 em { text-shadow: 1px 1px 0 rgba(196,69,54,.15); }

/* Related */
.related { max-width: 920px; margin: 2rem auto; padding: 0 24px; }
.related-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.related-pill { background: var(--white); border: 2px solid var(--blue); border-radius: 50px; padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; }
.related-pill:hover { background: var(--blue); color: var(--white); }
.related-pill strong { color: var(--red); margin-right: 0.2rem; }

/* 31. Footer mit Zickzack-Bordüre */
footer { text-align: center; padding: 1.75rem 24px 1.5rem; font-size: 0.78rem; color: var(--ink-mid); margin-top: 2.5rem; position: relative; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: repeating-linear-gradient(90deg, var(--blue-pale) 0px, var(--blue-pale) 12px, transparent 12px, transparent 24px), repeating-linear-gradient(90deg, transparent 0px, transparent 12px, var(--blue-pale) 12px, var(--blue-pale) 24px); background-size: 24px 6px, 24px 6px; background-position: 0 0, 12px 6px; background-repeat: repeat-x; }
footer a { color: var(--blue-dark); }
.footer-credit { font-size: 0.68rem; color: var(--ink-light); margin-top: 0.25rem; }
.footer-slogan { font-family: var(--font-head); font-style: italic; color: var(--blue); font-size: 0.82rem; margin-bottom: 0.35rem; }

/* 29. Scroll-to-Top Messbecher */
.scroll-top { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90; width: 44px; height: 52px; border: 2px solid var(--blue); border-radius: 3px 3px 8px 8px; background: var(--white); cursor: pointer; opacity: 0; transform: translateY(20px); transition: opacity 0.3s, transform 0.3s, background 0.2s; pointer-events: none; overflow: hidden; }
.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: var(--blue-pale); transition: height 0.3s; }
.scroll-top::after { content: '▲'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.7rem; color: var(--blue-dark); z-index: 1; font-weight: 700; }
.scroll-top:hover { border-color: var(--red); }
.scroll-top:hover::before { height: 80%; background: var(--red-light); }
.scroll-top:hover::after { color: var(--red); }

/* Legal */
.legal { max-width: 680px; margin: 0 auto; padding: 2rem 24px; }
.legal h2 { font-size: 1rem; margin: 1.5rem 0 0.4rem; }
.legal p { font-size: 0.88rem; color: var(--ink-mid); margin-bottom: 0.6rem; }
.legal ul { margin: 0.25rem 0 0.75rem 1.5rem; font-size: 0.88rem; color: var(--ink-mid); }
.legal a { color: var(--red); }

/* Responsive */
@media (max-width: 768px) {
  nav { position: fixed; top: 56px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem; border-bottom: 2px solid var(--blue); transform: translateY(-110%); opacity: 0; transition: transform 0.3s, opacity 0.3s; pointer-events: none; gap: 0.4rem; }
  nav.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  nav a { padding: 0.5rem 0; font-size: 0.95rem; }
  .nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  .answer-card { flex-direction: column; text-align: center; }
  .calc-box { flex-direction: column; align-items: stretch; }
  .calc-field input { width: 100%; }
}
