/* Cup to Grams: bold, practical kitchen reference. No decorative hairlines. */
:root {
  --ink: #24372c; --muted: #435247; --green: #244d3a;
  --mint: #eaf0e5; --paper: #fff; --orange: #f0d5a1;
  font-family: 'Source Sans 3', Arial, sans-serif;
}
.controls, .result-panel, .intro > *, .article-hero > *, .reading-grid > * { min-width: 0; }
.article a { overflow-wrap: anywhere; }
body { font-size: 1.5rem; line-height: 1.55; font-weight: 600; }
p { color: var(--ink); }
a { color: var(--green); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #a85020; outline-offset: 4px;
}
h1, h2, h3 { color: var(--ink); letter-spacing: -.025em; line-height: 1.2; font-weight: 700; }
h1 { font-family: 'Source Sans 3', Arial, sans-serif; font-size: clamp(3rem, 5.6vw, 4.75rem); line-height: 1.04; }
h2 { font-family: 'Source Sans 3', Arial, sans-serif; font-size: 2.625rem; }
h3 { font-family: 'Source Sans 3', Arial, sans-serif; font-size: 1.75rem; }
.wrap { width: min(1380px, calc(100% - 80px)); }
header, .section, .converter, .result-panel, .formula, .popular, .recipe-shell,
.empty, th, td, .guide-link, .tips details, .source-note, .footer-small,
.callout, .credit-row, .ad-banner, .intro-aside { border: 0; box-shadow: none; }
header { background: white; }
.nav { min-height: 112px; gap: 30px; }
.brand { flex-shrink: 0; line-height: 0; }
.brand img { width: 320px; height: auto; display: block; }
.nav-links { gap: 28px; }
.nav-links a { font-size: 1.375rem; font-weight: 700; }
.eyebrow { font-size: 1.25rem; letter-spacing: 0; text-transform: none; }
.intro { grid-template-columns: 1.15fr 1fr; gap: 60px; padding: 42px 0; }
.intro h1 { max-width: 700px; margin-bottom: 22px; }
.intro .lede { font-size: 1.625rem; line-height: 1.45; max-width: 640px; margin: 0; }
.food-photo { margin: 0; min-width: 0; }
.food-photo img { width: 100%; height: auto; display: block; object-fit: cover; border-radius: 0; }
.hero-photo img { aspect-ratio: 2 / 1; }
.food-photo figcaption { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 12px; font-size: 1.125rem; line-height: 1.5; }
.food-photo figcaption a { white-space: nowrap; }
.converter { grid-template-columns: 1.15fr 1fr; gap: 32px; border-radius: 0; background: transparent; }
.controls { padding: 36px; background: #edf1ea; border-radius: 10px; }
.controls-top { margin-bottom: 24px; display: block; }
.controls-top h2 { font-size: 2.125rem; font-weight: 700; }
label { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
input, select { border: 0; border-radius: 4px; background-color: white; min-height: 58px; padding: 12px 16px; font-size: 1.5rem; font-weight: 600; }
select { padding-right: 42px; }
.form-row { gap: 22px; margin-top: 22px; }
.amount-wrap input { font-size: 1.875rem; padding-right: 75px; }
.amount-wrap span { font-size: 1.25rem; top: 13px; right: 16px; }
.quick { gap: 9px; margin-top: 14px; }
.quick button { border: 0; border-radius: 4px; background: #d1dec8; font-size: 1.375rem; font-weight: 600; min-width: 54px; min-height: 50px; }
.quick button:hover { background: #bdcfb3; }
.hint, .fine, .basis, .status, .error { font-size: 1.25rem; line-height: 1.55; }
.hint { margin-top: 14px; }
.result-panel { background: var(--green); color: white; padding: 40px; border-radius: 10px; }
.result-label { font-size: 1.5rem; font-weight: 600; margin-bottom: 20px; }
.result-panel p { color: white; }
.result-number { gap: 16px; }
.result-number output { font: 700 7rem/1 'Source Sans 3', Arial, sans-serif; color: white; }
.result-number span { font: 700 2rem/1.3 'Source Sans 3', Arial, sans-serif; }
.result-caption { font-size: 1.5rem; margin-top: 14px; }
.formula { font: 600 1.375rem/1.5 'Source Sans 3', Arial, sans-serif; color: white; padding: 0; margin-bottom: 26px; }
.primary, .secondary, .text-button { border: 0; border-radius: 4px; font-size: 1.375rem; font-weight: 700; padding: 12px 20px; min-height: 52px; text-decoration: none; }
.primary { display: inline-block; background: var(--green); color: white; }
.secondary { background: #d1dec8; color: var(--ink); }
.result-panel .primary { background: #f0d5a1; color: #24372b; }
.result-panel .secondary { background: #426d54; color: white; }
.result-panel .text-button { color: white; padding: 8px 0; }
.text-button:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.result-panel .fine { margin-top: 24px; color: #eef3eb; }
.result-panel .status { color: white; }
.status:empty { min-height: 0; margin: 0; }
.basis { margin: 18px 0 0; max-width: none; }
.basis a { white-space: normal; }
.popular { font-size: 1.25rem; gap: 12px 22px; margin-top: 28px; }
.popular button { font-size: 1.375rem; font-weight: 700; background: #edf1ea; border-radius: 6px; text-decoration: none; padding: 8px 18px; min-height: 48px; }
.popular button:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.section { padding: 54px 0; }
.section-head { align-items: start; gap: 24px; margin-bottom: 28px; }
.section-head p { font-size: 1.25rem; max-width: 760px; }
.recipe-shell { background: #edf1ea; border-radius: 10px; padding: 32px; }
.empty { background: transparent; border-radius: 0; text-align: left; padding: 18px 0; margin: 0; font-size: 1.375rem; }
.scale-line { margin-bottom: 18px; }
.scale-input input { width: 108px; }
.table-scroll { border: 0; border-radius: 0; overflow-x: auto; }
table { font-size: 1.25rem; }
th, td { font-size: inherit; padding: 19px 20px; letter-spacing: 0; text-transform: none; white-space: nowrap; }
th { font-weight: 700; }
thead { background: var(--green); }
thead th { color: white; }
tbody th { color: var(--ink); }
tbody tr:nth-child(odd) { background: #edf2e8; }
tbody tr:nth-child(even) { background: white; }
tbody tr:hover { background: #e2ebda; }
caption { text-align: left; font-size: 1.125rem; padding-bottom: 18px; }
.grid3 { gap: 32px; }
.guide-card { min-width: 0; }
.guide-link { padding: 0; }
.guide-link:hover { text-decoration: none; }
.guide-link:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; }
.guide-link > img { display: block; width: 100%; height: 260px; object-fit: cover; }
.guide-copy { padding-top: 24px; }
.guide-link h3 { font-size: 1.875rem; margin: 0 0 12px; }
.guide-link p { font-size: 1.375rem; font-weight: 600; margin-bottom: 12px; }
.guide-link .guide-weight { font-weight: 600; }
.image-credit { display: inline-block; font-size: 1.125rem; margin-top: 6px; }
.more-guides { background: transparent; padding: 0; margin-top: 48px; }
.more-guides h3 { margin-bottom: 14px; }
.more-guides p { max-width: 780px; }
.more-guides nav { display: flex; flex-wrap: wrap; gap: 18px 34px; }
.tips { gap: 64px; }
.tips details { background: transparent; padding: 14px 0; margin: 8px 0; border-radius: 0; }
.tips summary { font-size: 1.375rem; font-weight: 600; }
.tips details p, .source-note p { font-size: 1.25rem; }
.source-note { background: #eaf0e5; border-radius: 0; padding: 32px; align-self: start; }
.source-note h3 { font-size: 1.875rem; }
footer.wrap { width: 100%; padding: 48px max(32px, calc((100% - 1380px)/2)) 32px; margin-top: 36px; background: #eaf0e5; }
.footer-top { gap: 60px; }
.footer-top .brand img { width: 300px; }
.footer-top p { font-size: 1.25rem; max-width: 480px; }
.footer-links { flex-wrap: wrap; gap: 18px 28px; font-size: 1.25rem; max-width: 550px; }
.footer-small { font-size: 1.125rem; padding: 0; margin-top: 28px; }
.article { max-width: 900px; margin: 44px auto 72px; font-size: 1.5rem; }
.article h1 { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 24px; }
.article h2 { font-size: 2.125rem; margin: 44px 0 20px; }
.article h3 { font-size: 1.75rem; }
.article p { line-height: 1.65; }
.article li { margin-bottom: 14px; }
.article .lead { font-size: 1.5rem; line-height: 1.55; }
.article .table-scroll { margin: 32px 0; }
.callout { background: #eaf0e5; border-radius: 0; padding: 30px; }
.big-reference { font: 700 2.625rem/1.2 'Source Sans 3', Arial, sans-serif; }
.ingredient-article { max-width: none; }
.article-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; margin-bottom: 36px; }
.article-hero .food-photo img { aspect-ratio: 1.5/1; }
.article-hero .lead { margin-bottom: 0; }
.article-body { max-width: 900px; margin: auto; }
.article-meta, .breadcrumb { font-size: 1.25rem; }
.article-meta { margin: 24px 0 32px; }
.conversion-answer { background: var(--green); color: white; padding: 32px; margin: 32px 0; }
.conversion-answer span { display: block; font-size: 1.25rem; }
.conversion-answer strong { display: block; font: 700 2.875rem/1.2 'Source Sans 3', Arial, sans-serif; margin: 14px 0 24px; }
.conversion-answer .primary { background: #f0d5a1; color: var(--ink); }
.guide-library { max-width: 1000px; }
.featured-reading { background: #eaf0e5; padding: 32px; margin: 38px 0 44px; }
.featured-reading h2 { margin-top: 0; }
.reading-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 56px; }
.reading-grid article { padding: 16px 0; }
.reading-grid h3 { font-size: 1.875rem; margin: 0 0 14px; }
.reading-grid p { font-size: 1.25rem; margin: 0; }
.reading-next { background: transparent; padding: 0; margin-top: 48px; }
.reading-next h2 { margin-bottom: 16px; }
.method-photo { margin: 32px 0; display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: center; }
.method-photo img { width: 200px; height: 240px; object-fit: contain; }
.credits { max-width: 1000px; }
.credit-row { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 32px 0; }
.credit-row > img { width: 260px; height: 240px; object-fit: cover; }
.credit-row h2 { margin-top: 0; }
.ad-banner { max-width: 1100px; margin: 40px auto; padding: 0; text-align: center; }
.ad-label { display: block; margin-bottom: 16px; font-size: 1.125rem; color: var(--muted); }
.ad-banner:has(ins[data-ad-status="unfilled"]) { display: none; }
[hidden] { display: none !important; }
@media (max-width: 1050px) {
  .nav { flex-wrap: wrap; padding: 24px 0; justify-content: center; gap: 24px; }
  .nav-links { justify-content: center; flex-wrap: wrap; }
  .intro { gap: 36px; }
  .controls, .result-panel { padding: 28px; }
  .form-row { gap: 16px; }
  .quick button { min-width: 48px; }
  .guide-link > img { height: 200px; }
  .guide-link h3 { font-size: 1.625rem; }
  .footer-top { display: block; }
  .footer-links { max-width: none; margin-top: 26px; }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .intro { grid-template-columns: 1fr; gap: 28px; padding: 24px 0 36px; }
  .intro h1 { max-width: 620px; }
  .intro .lede { max-width: 620px; }
  .hero-photo img { aspect-ratio: 2.2/1; }
  .converter { grid-template-columns: 1fr; gap: 20px; }
  .controls, .result-panel { padding: 32px; }
  .result-number output { font-size: 5rem; }
  .tips { grid-template-columns: 1fr; gap: 32px; }
  .grid3 { grid-template-columns: 1fr; gap: 36px; }
  .guide-link > img { height: auto; aspect-ratio: 1.8/1; }
  .guide-link h3 { font-size: 1.875rem; }
  .article-hero { grid-template-columns: 1fr; gap: 32px; }
  .article-hero .food-photo img { aspect-ratio: 1.8/1; }
  .section-head { flex-direction: column; gap: 18px; }
  .reading-grid { grid-template-columns: 1fr; gap: 22px; }
  .credit-row { grid-template-columns: 1fr; gap: 22px; }
  .credit-row > img { width: 100%; height: auto; max-height: 360px; }
}
@media (max-width: 500px) {
  body { font-size: 1.375rem; }
  .wrap { width: calc(100% - 32px); }
  .brand img { width: 290px; max-width: 100%; }
  .nav { gap: 22px; padding: 22px 0; }
  .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; width: 100%; text-align: center; }
  .nav-links a { font-size: 1.375rem; padding: 4px 0; }
  .intro h1 { font-size: 3rem; }
  .intro .lede { font-size: 1.375rem; }
  .intro { padding-top: 18px; }
  .controls, .result-panel { padding: 26px 22px; }
  .controls-top h2 { font-size: 1.75rem; }
  .form-row { grid-template-columns: 1fr; gap: 20px; }
  .quick { gap: 8px; }
  .quick button { min-width: 44px; padding: 4px 8px; }
  .result-number output { font-size: 5.75rem; }
  .result-number span { font-size: 1.75rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions > * { flex: auto; white-space: normal; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 2rem; }
  .recipe-shell, .source-note, .featured-reading, .conversion-answer, .callout { padding: 24px; }
  .scale-line { flex-wrap: wrap; gap: 20px; }
  .scale-input { flex-direction: column; align-items: start; gap: 8px; }
  th, td { padding: 16px; font-size: 1.25rem; }
  .article { font-size: 1.375rem; margin: 28px auto 50px; }
  .article h1 { font-size: 2.5rem; }
  .article h2 { font-size: 1.875rem; }
  .article .lead { font-size: 1.375rem; }
  .conversion-answer strong { font-size: 2.125rem; }
  .method-photo { grid-template-columns: 1fr; gap: 20px; }
  .method-photo img { width: 100%; height: 240px; }
  footer.wrap { padding: 36px 20px 28px; }
  .footer-top .brand img { width: 290px; max-width: 100%; }
  .footer-links { gap: 18px 26px; }
}

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 22px 0; }
.masthead .brand img { width: 350px; }
.masthead p { font-size: 1.375rem; margin: 0; color: var(--ink); }
.main-nav { background: var(--green); }
.main-nav .nav-links { display: flex; align-items: center; justify-content: flex-start; gap: 0; }
.main-nav a { display: block; color: white; font-size: 1.375rem; font-weight: 700; padding: 16px 30px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #153b2a; text-decoration: none; }
.main-nav a:focus-visible { outline-color: #f0d5a1; outline-offset: -5px; }
.main-nav a:first-child { margin-left: -30px; }
@media (max-width: 800px) {
 .masthead p { display: none; }
 .masthead { justify-content: center; padding: 18px 0; }
 .main-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; text-align: center; }
 .main-nav a { font-size: 1.25rem; padding: 13px 8px; }
 .main-nav a:first-child { margin: 0; }
 .hero-photo img { aspect-ratio: 2.6 / 1; }
 .intro { padding: 30px 0; }
 .intro .lede { font-size: 1.375rem; }
 .controls, .result-panel { padding: 28px; }
}
@media (max-width: 500px) {
 .masthead .brand img { width: min(330px, 100%); }
 .controls, .result-panel { padding: 24px 20px; }
 .controls-top h2 { font-size: 1.875rem; }
 .result-label { font-size: 1.5rem; }
 .quick { gap: 7px; }
 .quick button { min-width: 42px; padding: 4px 7px; }
 .form-row { margin-top: 20px; }
}

@media print {
  body, .article { font-size: 11pt; }
  .wrap { width: 100%; }
  .food-photo, .guide-card, .ad-banner, #privacy-choices, .more-guides { display: none !important; }
  .intro, .article-hero, .reading-grid { display: block; }
  .intro h1, .article h1 { font-size: 26pt; }
  .intro { padding: 0; }
  .result-panel, .conversion-answer, .recipe-shell, .callout, .source-note { background: white; color: black; }
  .result-panel p, .result-label, .formula, .result-number output, .result-panel .fine { color: black; }
  .result-number output { font-size: 36pt; }
  .article, .article-body { max-width: none; margin: 0; }
  .section { padding: 20px 0; }
  .hint, .basis, .fine, .article-meta { font-size: 10pt; }
  table, th, td { font-size: 10pt; }
  thead { background: #eee; }
  thead th { color: black; }
  .conversion-answer .primary { display: none; }
}
