:root { color-scheme: light; --ink: #172624; --muted: #52615f; --line: #d9e3df; --green: #0f766e; --pale: #edf7f4; --gold: #ad7b17; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font-family: 'Hiragino Kaku Gothic ProN', Meiryo, system-ui, sans-serif; line-height: 1.85; letter-spacing: 0; }
a { color: var(--green); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #bd8015; outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -100px; background: white; padding: 8px; z-index: 2; }
.skip:focus { top: 8px; }
.resource-header { border-bottom: 1px solid var(--line); }
.resource-header > div { max-width: 1160px; padding: 18px 24px; margin: auto; display: flex; align-items: center; gap: 24px; justify-content: space-between; }
.resource-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; white-space: nowrap; }
.resource-header nav { display: flex; gap: 10px 24px; flex-wrap: wrap; font-size: 14px; }
.resource-header nav a { text-decoration: none; }
.resource-main { max-width: 1112px; margin: 0 auto; padding: 26px 24px 60px; }
.breadcrumbs { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.eyebrow { color: var(--green); font-size: 14px; font-weight: 700; margin: 0 0 10px; }
h1 { font-size: 36px; line-height: 1.5; margin: 0 0 18px; max-width: 920px; }
h2 { font-size: 24px; line-height: 1.55; margin: 0 0 16px; }
h3 { font-size: 19px; line-height: 1.6; margin: 24px 0 10px; }
p { margin: 0 0 16px; }
.intro { font-size: 17px; max-width: 800px; }
.byline, .caption, .note { color: var(--muted); font-size: 14px; }
.byline { margin: 20px 0 26px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 770px) 220px; gap: 48px; align-items: start; }
.article-layout article { min-width: 0; }
.toc { padding: 18px 0; border-top: 3px solid var(--green); position: sticky; top: 24px; font-size: 14px; }
.toc ol { padding-left: 20px; margin-bottom: 0; }
.toc li { margin-bottom: 12px; }
article section, .tool-notes section { padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.answer { border-left: 4px solid var(--green); padding: 16px 20px; background: var(--pale); margin-bottom: 28px; }
.formula { font-weight: 700; font-size: 18px; padding: 16px 0; border-bottom: 2px solid var(--line); overflow-wrap: anywhere; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 20px 0; }
.data-table th, .data-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: #f3f6f5; font-weight: 700; }
.data-table caption { text-align: left; font-weight: 700; margin-bottom: 10px; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.article-photo { margin: 24px 0; }
.article-photo img { width: 100%; max-height: 290px; object-fit: cover; }
.article-photo a img { max-height: none; object-fit: contain; }
.action { display: inline-flex; justify-content: center; align-items: center; background: var(--green); color: #fff; text-decoration: none; padding: 11px 18px; border: 1px solid var(--green); border-radius: 6px; font-weight: 700; line-height: 1.6; }
.subtle { background: #fff; color: var(--green); }
.related { border-top: 3px solid var(--green); margin-top: 24px; padding-top: 24px; }
.related ul { padding-left: 20px; }
.resource-footer { background: #f3f6f5; padding: 30px 24px; font-size: 14px; }
.resource-footer > div { max-width: 1064px; margin: auto; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.resource-footer nav { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.tool-intro { margin-bottom: 24px; }
.calculator { border: 1px solid var(--line); border-radius: 8px; padding: 22px; background: #fff; }
.tool-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-top h2 { font-size: 20px; margin: 0; }
.tool-actions { display: flex; gap: 12px; }
.quiet-button { border: 1px solid var(--line); border-radius: 5px; color: var(--green); background: #fff; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.quiet-button:hover { background: var(--pale); }
.ingredient { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr .75fr 1fr 36px; gap: 12px; align-items: end; padding: 14px 0; border-top: 1px solid var(--line); }
label { font-size: 13px; color: var(--muted); display: grid; gap: 5px; min-width: 0; }
input, select { border: 1px solid #aabdb5; border-radius: 5px; background: #fff; color: var(--ink); padding: 8px 9px; width: 100%; min-width: 0; min-height: 42px; font-size: 16px; }
.row-result { display: grid; font-size: 12px; color: var(--muted); min-width: 0; }
.row-result output { color: var(--ink); font-size: 15px; font-weight: 700; min-height: 42px; padding-top: 9px; overflow-wrap: anywhere; }
.remove-row { width: 36px; height: 42px; padding: 0; font-size: 24px; border: 0; background: transparent; cursor: pointer; color: #94502b; }
button:disabled { opacity: .4; cursor: default; }
.settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 24px 0 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.error { color: #a02d22; font-size: 14px; min-height: 26px; margin: 10px 0; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; background: var(--pale); padding: 20px; border-top: 3px solid var(--green); }
.results div { min-width: 0; }
.results dt { font-size: 14px; color: var(--muted); }
.results dd { font-size: 26px; font-weight: 800; margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-extra { display: flex; gap: 16px 30px; flex-wrap: wrap; margin: 16px 0 8px; font-size: 14px; }
.tool-notes { max-width: 800px; margin: 34px auto 0; }
code { background: #f3f6f5; padding: 3px 5px; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .resource-header > div { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 18px; }
  .resource-main { padding: 22px 18px 40px; }
  h1 { font-size: 27px; } h2 { font-size: 22px; }
  .article-layout { display: flex; flex-direction: column; gap: 24px; }
  .article-layout .toc { order: -1; position: static; width: 100%; }
  .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .calculator { padding: 16px; }
  .ingredient { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 18px 0; }
  .ingredient > label:first-child { grid-column: 1 / 3; }
  .ingredient > label:nth-child(2) { grid-column: 3; }
  .row-result { grid-column: 1 / 3; }
  .remove-row { justify-self: end; }
  .settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .results { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .results div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid #cde0d8; padding-bottom: 8px; }
  .results dd { font-size: 23px; }
  .data-table { font-size: 14px; } .data-table td, .data-table th { padding: 10px 6px; }
}
@media print {
  .resource-header, .resource-footer, .tool-actions, .remove-row, #add-ingredient, .related { display: none; }
  .resource-main { max-width: none; padding: 0; }
  .calculator { border: 0; }
  .ingredient { break-inside: avoid; }
}
