:root {
  --excel: #107c41;
  --excel-dark: #075c2f;
  --excel-deep: #063f25;
  --excel-soft: #e8f3ec;
  --mint: #cfe8d8;
  --ink: #17221c;
  --muted: #5c6861;
  --line: #d8e0db;
  --paper: #ffffff;
  --canvas: #f5f7f5;
  --warning: #9a5a00;
  --warning-soft: #fff4df;
  --max: 1180px;
  --reading: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.keep-word { white-space: nowrap; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  text-wrap: pretty;
  line-break: strict;
  overflow-wrap: normal;
  word-break: normal;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #47a86f; outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; background: #fff; color: var(--excel-dark); border: 2px solid var(--excel); }
.skip-link:focus { top: 12px; }
.site-shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.narrow { max-width: 920px; }
.section-label { margin: 0 0 10px; color: var(--excel); font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.section-label.light { color: #c9efd7; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--excel); color: #fff; }
.button.primary:hover { background: var(--excel-dark); }
.button.secondary { background: #fff; color: var(--excel-dark); border-color: #9ab9a5; }
.button.secondary:hover { border-color: var(--excel); background: var(--excel-soft); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; height: 80px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-grid; min-width: 0; align-items: center; gap: 0; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: 300px; max-width: 100%; height: auto; }
.brand-tagline { margin: -1px 0 0 51px; color: var(--muted); font-size: .64rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: 10px;
  background: url("../images/hyoukeisan-mark.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 5px 14px rgba(4, 57, 39, 0.18);
}
.brand > span:last-child { display: grid; line-height: 1.25; }
.brand strong { font-size: 1rem; letter-spacing: .02em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.site-nav { display: flex; align-items: stretch; align-self: stretch; }
.site-nav a { display: flex; align-items: center; padding: 0 13px; color: #334039; border-bottom: 4px solid transparent; font-size: .88rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover { color: var(--excel); background: #f7faf8; }
.site-nav a.is-current { color: #fff; background: var(--excel); border-bottom-color: var(--excel-deep); box-shadow: inset 0 1px rgba(255,255,255,.16); }
.site-nav a.is-current:hover { color: #fff; background: var(--excel-dark); }
.header-current-page { display: none; min-width: 0; flex-direction: column; margin-left: auto; line-height: 1.15; text-align: right; }
.header-current-page small { color: var(--muted); font-size: .58rem; font-weight: 700; letter-spacing: .04em; }
.header-current-page strong { margin-top: 3px; color: var(--excel-dark); font-size: .78rem; }
.menu-button { display: none; border: 1px solid var(--line); background: #fff; padding: 7px 11px; border-radius: 3px; color: var(--excel-dark); font-weight: 700; }

/* Home */
.home-hero { padding: 82px 0 68px; background: var(--canvas); border-bottom: 1px solid var(--line); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 84px; align-items: center; }
.hero-copy h1 { margin: 0; max-width: 760px; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1.14; letter-spacing: -.045em; text-wrap: balance; }
.hero-copy h1 em { display: inline-block; color: var(--excel); font-style: normal; white-space: nowrap; }
.hero-lead { max-width: 720px; margin: 26px 0 0; color: #46534c; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-facts { display: flex; gap: 0; margin: 46px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hero-facts li { display: flex; align-items: baseline; gap: 8px; min-width: 150px; padding: 18px 28px 0 0; }
.hero-facts li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.hero-facts strong { color: var(--excel-dark); font-size: 1.8rem; font-family: Arial, sans-serif; line-height: 1; }
.hero-facts span { color: var(--muted); font-size: .78rem; }
.hero-workflow { padding: 30px; background: #fff; border-top: 5px solid var(--excel); box-shadow: 0 18px 48px rgba(20, 52, 34, .1); }
.hero-workflow > p { margin: 0 0 22px; color: var(--muted); font-family: Arial, sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .12em; }
.hero-workflow ol { margin: 0; padding: 0; list-style: none; }
.hero-workflow li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.hero-workflow li > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--excel-soft); color: var(--excel-dark); font-family: Arial, sans-serif; font-size: .84rem; font-weight: 800; }
.hero-workflow li div { display: grid; line-height: 1.4; }
.hero-workflow li small { margin-top: 3px; color: var(--muted); }
.hero-workflow > a { display: inline-block; margin-top: 20px; color: var(--excel-dark); font-weight: 700; text-decoration: none; }
.quick-start { background: var(--excel-deep); color: #fff; }
.quick-start-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.quick-start-grid a { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; align-items: center; padding: 24px 28px; color: #fff; text-decoration: none; border-left: 1px solid rgba(255,255,255,.18); }
.quick-start-grid a:last-child { border-right: 1px solid rgba(255,255,255,.18); }
.quick-start-grid a:hover { background: #0a5430; }
.quick-start-grid span { display: grid; grid-row: 1 / 3; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(197, 238, 213, .56); border-radius: 16px; background: rgba(255,255,255,.08); color: #d7f3e2; font-family: Arial, sans-serif; font-size: 1.05rem; font-weight: 800; box-shadow: inset 0 1px rgba(255,255,255,.12); }
.quick-start-grid strong { line-height: 1.4; }
.quick-start-grid small { color: #bbd5c5; }
.content-section { padding: 88px 0; }
.muted-section { background: var(--canvas); border-block: 1px solid var(--line); }
.section-heading { margin-bottom: 38px; }
.section-heading.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 70px; align-items: end; }
.section-heading h2, .two-column h2, .asset-downloads h2 { margin: 0; font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.3; letter-spacing: -.03em; }
.section-heading > p { margin: 0; color: var(--muted); }
.chapter-list { border-top: 2px solid var(--ink); }
.chapter-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 130px 24px; gap: 20px; align-items: center; padding: 22px 10px; border-bottom: 1px solid var(--line); text-decoration: none; }
.chapter-row:hover { background: var(--excel-soft); }
.chapter-row-number { color: var(--excel); font-family: Arial, sans-serif; font-size: .85rem; font-weight: 800; }
.chapter-row-copy { display: grid; gap: 4px; }
.chapter-row-copy strong { font-size: 1.08rem; }
.chapter-row-copy small { color: var(--muted); font-size: .83rem; }
.chapter-row-meta { color: var(--muted); font-size: .78rem; }
.chapter-row-arrow { color: var(--excel); font-size: 1.25rem; }
.chapter-row.is-complete .chapter-row-number::after { content: " ✓"; }
.two-column { display: grid; grid-template-columns: minmax(0, .88fr) minmax(460px, 1.12fr); gap: 80px; align-items: center; }
.lead-text { color: var(--muted); font-size: 1.03rem; }
.principle-list { margin: 28px 0 0; border-top: 1px solid var(--line); }
.principle-list div { display: grid; grid-template-columns: 70px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.principle-list dt { color: var(--excel); font-weight: 800; }
.principle-list dd { margin: 0; }
.project-list { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line); }
.project-item { min-width: 0; padding: 24px 22px; border-left: 1px solid var(--line); }
.project-item:last-child { border-right: 1px solid var(--line); }
.project-item > span { color: var(--excel); font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; }
.project-item h3 { min-height: 3.2em; margin: 10px 0; font-size: 1rem; line-height: 1.55; }
.project-item p { color: var(--muted); font-size: .83rem; }
.project-item small { display: block; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--excel-dark); font-weight: 700; }
.center-link { margin: 30px 0 0; text-align: center; }
.center-link a { color: var(--excel-dark); font-weight: 700; text-decoration: none; }
.reference-banner { padding: 70px 0; background: var(--excel-deep); color: #fff; }
.reference-banner-inner { display: grid; grid-template-columns: 1fr 470px; gap: 80px; align-items: center; }
.reference-banner h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.3; }
.reference-banner p { color: #cee3d6; }
.reference-search { padding: 24px; background: #fff; color: var(--ink); }
.reference-search label { display: block; margin-bottom: 9px; font-weight: 700; }
.reference-search div { display: grid; grid-template-columns: minmax(0, 1fr) 88px; align-items: stretch; }
.reference-search input, .reference-search button { box-sizing: border-box; height: 48px; margin: 0; border-radius: 0; }
.reference-search input { min-width: 0; border: 1px solid #9ca7a0; border-right: 0; padding: 0 13px; outline: 0; box-shadow: none; appearance: none; }
.reference-search input:focus { border-color: #6e7972; outline: 0; box-shadow: none; }
.reference-search button { width: auto; border: 1px solid var(--excel); background: var(--excel); color: #fff; font-weight: 700; }
.reference-search small { display: block; margin-top: 8px; color: var(--muted); }

/* Footer */
.site-footer { padding: 38px 0 28px; background: #0e1913; color: #c4cdc7; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { color: #fff; }
.footer-brand small { color: #9eaaa2; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner nav a, .footer-inner > a { color: #dce4df; text-decoration: none; font-size: .82rem; }
.footer-brand-copy { display: grid; line-height: 1.35; }
.footer-brand-copy strong { color: #fff; font-size: .95rem; }
.footer-brand-copy small { color: #aebbb2; font-size: .68rem; }
.footer-legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.footer-legal strong { display: block; color: #fff; font-size: .78rem; }
.footer-legal p { margin: 7px 0 0; color: #aebbb2; font-size: .72rem; line-height: 1.65; }
.function-campaign { margin: 12px 0 0 !important; color: #dce8f1 !important; font-weight: 700; }

/* Lesson reader */
.reader-main { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); min-height: 100vh; background: var(--canvas); }
.reader-sidebar { position: relative; min-width: 0; align-self: stretch; border-right: 1px solid var(--line); background: #fff; }
.reader-sidebar-inner { position: sticky; z-index: 4; top: 96px; width: 100%; max-height: calc(100vh - 116px); overflow: auto; overscroll-behavior: contain; padding: 28px 24px 40px; background: #fff; }
.reader-sidebar h2 { margin: 0 0 18px; font-size: 1.25rem; }
.course-progress { margin-bottom: 20px; }
.course-progress > div { height: 5px; background: #e5ebe7; }
.course-progress > div span { display: block; width: 0; height: 100%; background: var(--excel); transition: width .2s ease; }
.course-progress small { display: block; margin-top: 6px; color: var(--muted); font-size: .72rem; }
#chapter-navigation { display: grid; border-top: 1px solid var(--line); }
#chapter-navigation a { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; padding: 12px 9px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
#chapter-navigation a:hover, #chapter-navigation a.is-current { background: var(--excel-soft); }
#chapter-navigation a.is-current { box-shadow: inset 3px 0 var(--excel); }
#chapter-navigation a > span { grid-row: 1 / 3; color: var(--excel); font-family: Arial, sans-serif; font-size: .72rem; font-weight: 800; }
#chapter-navigation strong { font-size: .82rem; line-height: 1.4; }
#chapter-navigation small { color: var(--muted); font-size: .68rem; }
#chapter-navigation a.is-complete > span::after { content: "✓"; display: block; }
.sidebar-download { display: block; margin-top: 20px; color: var(--excel-dark); font-size: .8rem; font-weight: 700; text-decoration: none; }
.lesson-article { width: min(calc(100% - 56px), var(--reading)); margin: 0 auto; padding: 70px 0 100px; }
.lesson-title { padding-bottom: 42px; border-bottom: 2px solid var(--ink); }
.chapter-opener { display: grid; grid-template-columns: 118px 1fr; gap: 28px 34px; align-items: center; scroll-margin-top: 104px; }
.chapter-kicker { display: flex; align-items: baseline; justify-content: center; gap: 5px; min-height: 142px; padding: 20px 8px; background: var(--excel); color: #fff; }
.chapter-kicker strong { font-family: Arial, sans-serif; font-size: 4.6rem; line-height: 1; }
.chapter-kicker span { font-weight: 800; }
.chapter-title-copy > p:first-child { margin: 0; color: var(--excel); font-family: Arial, sans-serif; font-size: .76rem; font-weight: 800; letter-spacing: .12em; }
.chapter-title-copy > p:first-child span { color: var(--muted); letter-spacing: 0; }
.chapter-title-copy h1 { margin: 10px 0 14px; font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.2; letter-spacing: -.04em; }
.chapter-title-copy > p:last-child { margin: 0; color: #46534c; font-size: 1.02rem; }
.chapter-summary { grid-column: 1 / -1; margin: 0; border-top: 1px solid var(--line); }
.lesson-title dl div { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.lesson-title dt { color: var(--excel-dark); font-weight: 800; }
.lesson-title dd { margin: 0; }
.lesson-downloads { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: -6px; }
.chapter-workbook-sheets { grid-column: 1 / -1; padding-top: 2px; }
.chapter-workbook-sheets > strong { display: block; margin-bottom: 7px; color: var(--excel-dark); font-size: .75rem; }
.workbook-sheet-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.workbook-sheet-list span { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border: 1px solid #c8dbcf; border-radius: 999px; background: #f5faf7; color: #25533a; font-size: .68rem; line-height: 1.35; }
.chapter-door-plan {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #b9d7c4;
  background: #fff;
}
.chapter-door-plan > div { min-width: 0; padding: 20px 22px; }
.chapter-door-plan > div + div { border-left: 1px solid #b9d7c4; background: var(--excel-soft); }
.chapter-door-plan p { margin: 0 0 10px; color: var(--excel-dark); font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.chapter-door-plan ol, .chapter-door-plan ul { display: grid; gap: 6px; margin: 0; padding-left: 1.35em; font-size: .82rem; }
.chapter-door-plan li { padding-left: .25em; }
.chapter-goals { margin: 44px 0 28px; background: #fff; border: 2px solid var(--excel); }
.chapter-goals > header { display: grid; grid-template-columns: 74px 1fr; gap: 18px; align-items: center; padding: 18px 22px; background: var(--excel-soft); border-bottom: 1px solid #b9d7c4; }
.chapter-goals > header > span { color: var(--excel); font-family: Arial, sans-serif; font-size: .73rem; font-weight: 800; letter-spacing: .12em; }
.chapter-goals h2 { margin: 0; font-size: 1.45rem; }
.chapter-goals header p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.chapter-goals ul { margin: 0; padding: 10px 22px 18px; list-style: none; }
.chapter-goals li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.chapter-goals li:last-child { border-bottom: 0; }
.chapter-goals li > span { color: var(--excel); font-size: 1.15rem; line-height: 1.5; }
.chapter-goals a { color: var(--ink); text-decoration: none; }
.chapter-goals a:hover { color: var(--excel-dark); text-decoration: underline; }
.unit-index { display: grid; margin: 28px 0; background: #fff; border-top: 2px solid var(--ink); }
.unit-index > div { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.unit-index > div strong { font-size: 1.05rem; }
.unit-index > div small { color: var(--muted); }
.unit-index a { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 10px 12px; color: #34433a; border-bottom: 1px solid var(--line); font-size: .84rem; text-decoration: none; }
.unit-index a:hover { background: var(--excel-soft); }
.unit-index a span { color: var(--excel); font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .06em; }
.unit-index a strong { margin: 0; }
.chapter-scope { margin: 28px 0 76px; padding: 18px 20px; background: #f9fbf9; border-left: 4px solid var(--excel); }
.chapter-scope > div { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.chapter-scope > div > strong { margin-right: 7px; font-size: .82rem; }
.chapter-scope span { padding: 3px 8px; background: var(--excel-soft); color: var(--excel-dark); font-size: .68rem; }
.chapter-scope p { margin: 12px 0 0; color: var(--muted); font-size: .72rem; }
.learning-unit { scroll-margin-top: 100px; margin: 0 0 88px; padding-top: 8px; }
.step-heading { display: grid; grid-template-columns: 94px 1fr; align-items: stretch; border-block: 2px solid var(--excel); }
.step-heading > div:first-child { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 13px 10px; background: var(--excel); color: #fff; }
.step-heading > div:first-child span { font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .06em; }
.step-heading > div:first-child strong { font-family: Arial, sans-serif; font-size: 1.8rem; line-height: 1; }
.step-heading > div:last-child { padding: 10px 18px; background: #fff; }
.step-heading p { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 700; }
.learning-unit h2 { margin: 0; font-size: 1.65rem; line-height: 1.4; }
.lesson-page-number { display: block; margin: 0 0 8px; color: #647168; font-family: Arial, sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-align: right; }
.chapter-page-number { margin: 0 0 4px; }
.unit-purpose { padding: 20px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.unit-purpose > strong { color: var(--excel-dark); font-size: .76rem; }
.unit-concept { margin: 6px 0 0; }
.reference-learning-block { margin-top: 14px; padding: 20px 18px; background: #fff; border: 1px solid var(--line); }
.reference-learning-block h3 { margin: 0 0 12px; font-size: 1rem; }
.reference-example-table-wrap { overflow-x: auto; }
.reference-example-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.reference-example-table th, .reference-example-table td { min-width: 125px; padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.reference-example-table thead th { background: var(--excel-deep); color: #fff; font-size: .74rem; }
.reference-example-table tbody th { color: var(--excel-dark); font-family: Consolas, monospace; }
.reference-example-table tbody tr:nth-child(even) { background: #f7faf8; }
.advanced-course-note { margin: 14px 0 0; padding: 14px 16px; background: var(--warning-soft); border-left: 4px solid #d8912e; color: #5f4b2d; }
.advanced-course-note strong { display: block; margin-bottom: 4px; color: var(--warning); font-size: .72rem; }
.advanced-course-note a { display: inline-block; margin-top: 8px; color: var(--excel-dark); font-weight: 800; text-underline-offset: 3px; }
.operation-brief {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 16px 18px;
  background: #f1f7f3;
  border-left: 4px solid var(--excel);
}
.operation-brief strong { color: var(--excel-dark); font-size: .8rem; }
.operation-brief p { margin: 0; font-size: .88rem; }
.operation-heading { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; margin: 34px 0 16px; }
.operation-heading span { display: grid; place-items: center; width: 34px; height: 34px; background: var(--excel); color: #fff; font-family: Arial, sans-serif; font-weight: 800; }
.operation-heading h3 { margin: 0; font-size: 1.08rem; }
.operation-heading p { margin: 2px 0 0; color: var(--muted); font-size: .76rem; }
.guided-procedure { display: grid; gap: 22px; }
.action-guide {
  overflow: hidden;
  background: #fff;
  border: 1px solid #b8c9be;
  box-shadow: 0 10px 28px rgba(11, 70, 40, .07);
}
.atomic-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 18px 22px 18px 64px;
  background: #f8fbf9;
  border-bottom: 1px solid var(--line);
}
.atomic-steps li { padding-left: 5px; font-size: .9rem; }
.atomic-steps li::marker { color: var(--excel); font-family: Arial, sans-serif; font-weight: 800; }

.chapter-deep-dive {
  margin: -36px 0 76px;
  padding: 34px;
  background: #fff;
  border-top: 5px solid var(--excel);
  box-shadow: 0 16px 40px rgba(20, 52, 34, .07);
}
.chapter-deep-dive > header { max-width: 760px; margin-bottom: 26px; }
.chapter-deep-dive > header h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.35; }
.chapter-deep-dive > header > p:last-child { margin: 12px 0 0; color: var(--muted); }
.term-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.term-card { min-width: 0; padding: 22px; border: 1px solid var(--line); }
.term-card > p:first-child { margin: 0; color: var(--excel); font-family: Arial, sans-serif; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.term-card h3 { margin: 3px 0 8px; font-size: 1.35rem; }
.term-card > strong { display: block; color: var(--excel-dark); font-size: .9rem; }
.term-card > p:not(:first-child) { margin: 10px 0; color: #3f4b44; font-size: .84rem; }
.term-card small { display: block; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); }
.compact-reference-list { margin: 22px 0 0; border-top: 1px solid var(--ink); }
.compact-reference-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 11px 8px; border-bottom: 1px solid var(--line); }
.compact-reference-list dt { color: var(--excel-dark); font-weight: 800; }
.compact-reference-list dt small { display: block; margin-top: 2px; color: var(--muted); font-size: .66rem; font-weight: 600; line-height: 1.4; }
.compact-reference-list dd { margin: 0; font-size: .84rem; }
.action-guide-heading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: stretch;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}
.action-guide-heading > span {
  display: grid;
  place-items: center;
  background: var(--excel-deep);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}
.action-guide-heading > div { display: grid; align-content: center; padding: 11px 17px; }
.action-guide-heading p { margin: 0; color: var(--excel); font-size: .67rem; font-weight: 800; }
.action-guide-heading h3 { margin: 2px 0 0; font-size: 1.08rem; line-height: 1.45; text-wrap: pretty; overflow-wrap: normal; word-break: normal; }
.annotated-shot { margin: 0; padding: 14px 14px 0; background: #edf3ef; }
.annotated-shot-frame {
  overflow: hidden;
  background: #fff;
  border: 1px solid #9fb2a5;
  box-shadow: 0 3px 10px rgba(17, 44, 29, .08);
}
.annotated-shot svg, .annotated-shot-frame > img { display: block; width: 100%; height: auto; max-height: 500px; object-fit: contain; background: #fff; }
.svg-click-target {
  fill: rgba(229, 23, 23, .06);
  stroke: #df1717;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.svg-click-arrow {
  fill: none;
  stroke: #df1717;
  stroke-width: 1.7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.svg-click-arrow + .svg-click-number { fill: #df1717; stroke: #fff; stroke-width: 3; vector-effect: non-scaling-stroke; }
.svg-click-number-text { fill: #fff; font-family: Arial, sans-serif; font-size: 17px; font-weight: 800; paint-order: stroke; stroke: #df1717; stroke-width: 1.5px; }
.annotated-shot marker path { fill: #df1717; }
.svg-screen-mask { vector-effect: non-scaling-stroke; }
.svg-screen-mask.is-privacy { fill: #f2f2f2; }
.svg-screen-mask.is-pointer.is-ribbon { fill: #f4f4f4; stroke: #e6e6e6; stroke-width: 1; }
.svg-screen-mask.is-pointer.is-status { fill: #f5f5f5; stroke: #e7e7e7; stroke-width: 1; }
.svg-screen-mask.is-pointer.is-sheet { fill: #fff; stroke: #e5e9e6; stroke-width: 1; }
.annotated-shot figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 9px 2px 11px;
  color: #48564e;
  font-size: .72rem;
  line-height: 1.55;
}
.annotated-shot figcaption strong { color: #b51616; }
.annotated-shot figcaption span { margin-left: auto; color: var(--muted); }
.action-details { margin: 0; padding: 5px 16px 16px; }
.action-details > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.action-details dt {
  padding: 11px 10px;
  color: var(--excel-dark);
  font-size: .72rem;
  font-weight: 800;
}
.action-details dd { margin: 0; padding: 11px 4px; color: #37443d; font-size: .86rem; line-height: 1.75; }
.action-details .action-confirm { margin-top: 5px; background: var(--excel-soft); border-top-color: #b9d7c4; }
.action-details .action-confirm dt { color: var(--excel-dark); }
.check-notes { margin: 22px 0 0; }
.check-notes div { display: grid; grid-template-columns: 72px 1fr; margin-top: 12px; border: 1px solid var(--line); }
.check-notes dt { display: grid; place-items: center; padding: 14px 8px; background: var(--excel); color: #fff; font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; }
.check-notes dd { display: grid; padding: 12px 16px; margin: 0; font-size: .82rem; }
.check-notes dd strong { color: var(--excel-dark); font-size: .72rem; }
.check-notes .point-note dt { background: #d58a23; }
.check-notes .point-note dd { background: var(--warning-soft); }
.check-notes .point-note dd strong { color: var(--warning); }
.exercise-section { scroll-margin-top: 100px; margin-top: 90px; padding-top: 38px; border-top: 5px solid var(--excel); }
.exercise-section h2 { margin: 0; font-size: 2rem; }
.exercise-table-wrap { margin-top: 24px; overflow-x: auto; }
.exercise-table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; font-size: .82rem; }
.exercise-table th, .exercise-table td { padding: 11px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.exercise-table thead th { background: var(--excel-deep); color: #fff; }
.exercise-table tbody td:first-child { color: var(--excel); font-family: Arial, sans-serif; font-weight: 800; text-align: center; }
.exercise-table tbody th { min-width: 145px; }
.completion-toggle { display: flex; align-items: center; gap: 14px; margin-top: 34px; padding: 18px; background: var(--excel-soft); border-left: 4px solid var(--excel); cursor: pointer; }
.completion-toggle input { width: 20px; height: 20px; accent-color: var(--excel); }
.completion-toggle span { display: grid; }
.completion-toggle small { color: var(--muted); }
.chapter-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 32px 0 48px; }
.chapter-pager a { display: grid; gap: 4px; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; color: var(--excel-dark); font-weight: 700; text-decoration: none; }
.chapter-pager a:last-child { text-align: right; }
.chapter-pager small { color: var(--muted); font-size: .68rem; font-weight: 700; }
.chapter-pager strong { font-size: .92rem; }
.reader-footer { padding-block: 24px; }

/* Materials */
.page-intro { padding: 72px 0; background: var(--excel-deep); color: #fff; }
.page-intro h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.18; letter-spacing: -.04em; }
.page-intro > .site-shell > p:not(.section-label) { max-width: 720px; color: #c8ddd0; }
.download-flow { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 30px 0 0; padding: 0; list-style: none; }
.download-flow li { display: flex; align-items: center; gap: 11px; color: #dce9e1; font-size: .88rem; }
.download-flow span { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #85ad94; border-radius: 50%; color: #c9efd7; font-family: Arial, sans-serif; font-size: .82rem; font-weight: 800; }
.download-list { border-top: 2px solid var(--ink); }
.download-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 22px 8px; border-bottom: 1px solid var(--line); }
.download-number { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--excel-soft); color: var(--excel-dark); font-family: Arial, sans-serif; font-size: 1rem; font-weight: 800; }
.download-row h2 { margin: 0 0 3px; font-size: 1.08rem; }
.download-row p { margin: 0; color: var(--muted); font-size: .82rem; }
.download-row small { color: var(--excel-dark); font-size: .7rem; }
.download-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 320px; }
.download-actions .button { min-height: 38px; padding: 6px 14px; font-size: .78rem; }
.download-actions > a:last-child { width: 100%; color: var(--excel-dark); font-size: .75rem; text-align: right; text-decoration: none; }
.project-download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-download { padding: 28px; background: #fff; border: 1px solid var(--line); }
.project-download > span { color: var(--excel); font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; }
.project-download h2 { margin: 8px 0; font-size: 1.25rem; }
.project-download p { color: var(--muted); }
.project-download dl { display: grid; grid-template-columns: 60px 1fr; margin: 18px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.project-download dt { font-weight: 800; }
.project-download dd { margin: 0; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tags span { padding: 3px 8px; background: var(--excel-soft); color: var(--excel-dark); font-size: .68rem; }
.project-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.project-actions span { color: var(--excel-dark); font-size: .78rem; font-weight: 700; }
.materials-zip-button { margin-top: 18px; }
.download-link-note { margin: 10px 0 0; font-size: .76rem; }
.download-link-note strong { color: #fff; }
.asset-downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px; }
.asset-downloads article + article { padding-left: 70px; border-left: 1px solid var(--line); }
.asset-downloads p:not(.section-label) { color: var(--muted); }

/* Function reference */
.function-hero { padding: 72px 0; background: var(--excel-deep); color: #fff; }
.function-hero-grid { display: grid; grid-template-columns: 1fr 440px; gap: 80px; align-items: end; }
.function-hero h1 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.15; letter-spacing: -.045em; }
.function-hero p:not(.section-label) { max-width: 720px; color: #c8ddd0; }
.function-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid #4f735d; }
.function-hero-stats div { padding: 20px 14px; border-left: 1px solid #4f735d; text-align: center; }
.function-hero-stats div:last-child { border-right: 1px solid #4f735d; }
.function-hero-stats strong { display: block; color: #fff; font-family: Arial, sans-serif; font-size: 1.8rem; }
.function-hero-stats span { color: #a9c9b5; font-size: .7rem; }
.syntax-section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.syntax-layout { display: grid; grid-template-columns: 280px 1fr; gap: 70px; align-items: center; }
.syntax-layout h2 { margin: 0; font-size: 1.7rem; }
.syntax-layout p { color: var(--muted); }
.syntax-example code { display: block; padding: 18px 22px; background: #122119; color: #fff; font-family: "Cascadia Mono", Consolas, monospace; font-size: clamp(1.3rem, 3vw, 2rem); }
.syntax-example code i { color: #fff; font-style: normal; }
.syntax-example code b { color: #73d39a; }
.syntax-example code em { color: #ffd27d; font-style: normal; }
.syntax-example dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.syntax-example dl div { padding: 10px 14px; border: 1px solid var(--line); border-top: 0; }
.syntax-example dt { color: var(--excel); font-family: Consolas, monospace; font-weight: 800; }
.syntax-example dd { margin: 2px 0 0; color: var(--muted); font-size: .7rem; }
.reference-explorer-section { padding: 80px 0; }
.reference-explorer-section kbd { padding: 1px 6px; border: 1px solid #abb7af; border-bottom-width: 2px; background: #fff; }
.filter-panel { position: sticky; top: 86px; z-index: 20; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px; padding: 16px; background: #f0f4f1; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(24, 55, 36, .08); }
.filter-panel label { display: block; margin-bottom: 5px; color: #4e5b53; font-size: .7rem; font-weight: 800; }
.search-field > div { position: relative; }
.filter-panel input, .filter-panel select { box-sizing: border-box; width: 100%; height: 44px; border: 1px solid #aeb9b2; background: #fff; padding: 0 11px; }
.search-field input { padding-right: 46px; appearance: none; }
.search-field input:focus, .search-field input:focus-visible { border-color: #6e7972; outline: 0; box-shadow: inset 0 0 0 1px #6e7972; }
.search-field .clear-search { position: absolute; top: 0; right: 0; display: none; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid #aeb9b2; border-left-color: #d2d9d4; border-radius: 0; background: #fff; color: #56625a; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.search-field .clear-search.is-visible { display: grid; place-items: center; }
.search-field .clear-search:hover { background: #f1f4f2; color: #18231d; }
.search-field .clear-search:focus, .search-field .clear-search:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px #6e7972; }
.quick-purpose { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 28px; }
.quick-purpose > span { margin-right: 8px; color: var(--muted); font-size: .75rem; font-weight: 700; }
.quick-purpose button { padding: 6px 12px; border: 1px solid #a8b9ae; border-radius: 999px; background: #fff; color: var(--excel-dark); font-size: .75rem; cursor: pointer; }
.quick-purpose button:hover { background: var(--excel-soft); }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.result-toolbar p { margin: 0; }
.result-toolbar strong { color: var(--excel); font-family: Arial, sans-serif; font-size: 1.3rem; }
.view-toggle { display: flex; }
.view-toggle button { padding: 5px 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .72rem; }
.view-toggle button.is-active { background: var(--excel); color: #fff; border-color: var(--excel); }
.function-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-left: 1px solid var(--line); }
.function-card { display: flex; flex-direction: column; min-height: 245px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.function-card-top { display: flex; justify-content: space-between; gap: 8px; min-height: 22px; }
.function-category, .function-version { color: var(--muted); font-size: .66rem; }
.function-version { color: var(--excel); font-weight: 700; }
.function-card h3 { margin: 18px 0 6px; color: var(--excel-dark); font-family: "Cascadia Mono", Consolas, monospace; font-size: 1.25rem; overflow-wrap: anywhere; }
.function-card > p { margin: 0; color: var(--muted); font-size: .8rem; }
.function-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; }
.detail-ready { color: var(--excel); font-size: .65rem; font-weight: 700; }
.function-card-bottom button { margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--excel-dark); font-size: .74rem; font-weight: 700; cursor: pointer; }
.function-grid.is-compact { display: block; border-top: 1px solid var(--line); }
.function-grid.is-compact .function-card { display: grid; grid-template-columns: 190px 1fr auto; align-items: center; min-height: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.function-grid.is-compact .function-card-top { display: none; }
.function-grid.is-compact .function-card h3 { margin: 0; }
.function-grid.is-compact .function-card-bottom { margin: 0; padding: 0; }
.function-grid.is-compact .detail-ready { display: none; }
.load-more-button { display: block; width: 100%; margin-top: 20px; padding: 12px; border: 1px solid #9aafa1; background: #fff; color: var(--excel-dark); font-weight: 700; cursor: pointer; }
.load-more-button[hidden] { display: none; }
.empty-state { padding: 50px; background: var(--canvas); text-align: center; }
.source-note { max-width: 900px; margin: 20px auto 0; color: var(--muted); font-size: .7rem; text-align: center; }
.starter-layout { display: grid; grid-template-columns: 360px 1fr; gap: 80px; align-items: center; }
.starter-layout h2 { margin: 0; font-size: 2rem; }
.starter-layout p:not(.section-label) { color: var(--muted); }
.starter-functions { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.starter-functions a { padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--excel-dark); font-family: Consolas, monospace; font-size: .82rem; font-weight: 700; text-decoration: none; }
.starter-functions a:hover { background: var(--excel-soft); }
.function-dialog { width: min(920px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.function-dialog::backdrop { background: rgba(4, 18, 10, .65); }
.dialog-shell { position: relative; }
.dialog-close { position: absolute; right: 16px; top: 16px; z-index: 2; width: 38px; height: 38px; border: 1px solid #61806d; background: transparent; color: #fff; font-size: 1.3rem; cursor: pointer; }
.dialog-header { padding: 32px 60px 28px 32px; background: var(--excel-deep); color: #fff; }
.dialog-header > div { display: flex; gap: 10px; }
.function-kind, .version-badge { color: #b8d6c3; font-size: .68rem; }
.dialog-header h2 { margin: 12px 0 5px; font-family: Consolas, monospace; font-size: 2.3rem; overflow-wrap: anywhere; }
.dialog-header p { margin: 0; color: #d4e4d9; }
.dialog-body { padding: 8px 32px 34px; }
.function-availability-note { margin: 24px 0 0; padding: 14px 16px; border-left: 4px solid #c27812; background: #fff5e5; color: #5f3a08; }
.function-availability-note[hidden] { display: none; }
.function-availability-note strong { display: block; margin-bottom: 4px; font-size: .78rem; }
.function-availability-note p { margin: 0; font-size: .8rem; line-height: 1.75; }
.function-availability-note.is-direct-only { border-left-color: var(--excel); background: var(--excel-soft); color: var(--excel-dark); }
.function-availability-note.is-connection, .function-availability-note.is-network, .function-availability-note.is-service { border-left-color: #1f6b9e; background: #edf6fb; color: #174a6c; }
.dialog-body section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.dialog-section-label { margin: 0 0 12px; color: var(--excel); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.practical-title { margin: 0 0 8px; color: var(--ink); font-size: 1.15rem; }
.usage-detail { margin: 16px 0 0; padding: 14px 16px; background: var(--excel-soft); border-left: 4px solid var(--excel); color: var(--excel-dark); }
.sample-table-wrap { margin-top: 16px; overflow-x: auto; }
.sample-data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.sample-data-table th, .sample-data-table td { min-width: 110px; padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-line; }
.sample-data-table th { background: var(--excel-deep); color: #fff; font-size: .74rem; letter-spacing: .03em; }
.sample-data-table tbody tr:nth-child(even) { background: #f7faf8; }
.formula-steps { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.formula-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.formula-steps li > span { display: grid; width: 30px; height: 30px; place-items: center; background: var(--excel); color: #fff; font-family: Consolas, monospace; font-size: .78rem; font-weight: 700; }
.formula-steps p { margin: 4px 0 0; }
.entry-method-intro { max-width: 72ch; margin: 0; }
.practical-formula-block { margin-top: 16px; }
.practical-formula-block[hidden] { display: none; }
.screen-example-callout { margin: 16px 0 4px; padding: 12px 14px; border: 1px solid #a9cbb6; background: #f2f8f4; }
.screen-example-callout strong { display: block; color: var(--excel-dark); font-size: .74rem; }
.screen-example-callout p { margin: 4px 0 0; font-size: .8rem; }
.screen-example-callout code { color: var(--excel-dark); font-weight: 800; overflow-wrap: anywhere; white-space: normal; word-break: break-word; }
.screen-example-result[hidden] { display: none; }
.screen-example-result b { color: var(--excel-dark); font-family: Consolas, monospace; }
.screen-example-download { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #c5dacc; }
.screen-example-download p { margin: 0; color: #405149; font-size: .78rem; }
.screen-example-download .button { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; font-size: .76rem; }
.entry-image-note { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.function-entry-method { margin-top: 24px; padding-top: 24px; border-top: 2px solid var(--ink); }
.function-entry-method > header { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.function-entry-method > header > span { display: grid; min-height: 32px; place-items: center; background: var(--excel-deep); color: #fff; font-size: .72rem; font-weight: 800; }
.function-entry-method h3 { margin: 0; font-size: 1.08rem; line-height: 1.45; }
.function-entry-method header p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.function-operation-shot { margin: 0 0 20px; border: 1px solid var(--line); background: #f5f7f5; }
.function-operation-shot > img { display: block; width: 100%; height: auto; }
.function-operation-shot.is-dialog-crop { width: min(100%, 760px); margin: 0 auto 20px; }
.function-operation-shot.is-menu-crop { width: min(100%, 340px); margin: 0 auto 20px; }
.function-shot-heading { margin: 0; padding: 9px 12px; border-bottom: 1px solid var(--line); background: #edf4ef; color: var(--excel-dark); font-size: .74rem; font-weight: 800; }
.function-sheet-name { margin: 0; padding: 7px 12px; border-bottom: 1px solid var(--line); background: #fff; color: #3d5547; font-size: .72rem; font-weight: 800; }
.function-sheet-name[hidden] { display: none; }
.function-operation-shot figcaption { padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .74rem; line-height: 1.7; }
.function-shot-slot[hidden] { display: none; }
.function-shot-slot .function-operation-shot:last-child { margin-bottom: 20px; }
.result-shot-slot { margin-top: 18px; }
.function-dialog-shot-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.function-dialog-shot-grid .function-operation-shot { height: auto; }
.function-dialog-shot-grid img { object-fit: contain; background: #fff; }
.function-entry-method[hidden] { display: none; }
.autosum-shot-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.autosum-shot-grid .function-operation-shot { height: 100%; }
.autosum-menu-shot { display: flex; flex-direction: column; }
.autosum-menu-shot img { display: block; width: auto; max-width: 100%; margin: auto; }
.formula-caption { margin: 0 0 7px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.code-copy-row { display: flex; background: #132019; color: #fff; }
.code-copy-row code { flex: 1; min-width: 0; padding: 14px; color: #d8f1e2; overflow-x: auto; }
.code-copy-row button { border: 0; border-left: 1px solid #50685a; background: transparent; color: #b8d6c3; padding: 0 14px; cursor: pointer; }
.result-preview { display: grid; grid-template-columns: 84px minmax(0, 1fr); margin-bottom: 14px; border: 2px solid var(--excel); }
.result-preview span { display: grid; min-height: 64px; place-items: center; background: var(--excel); color: #fff; font-size: .75rem; font-weight: 800; }
.result-preview strong { display: flex; align-items: center; padding: 12px 16px; color: var(--excel-dark); font-size: 1.3rem; line-height: 1.45; white-space: pre-line; }
#dialog-result-note { margin: 0; color: var(--ink); }
.example-description { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .82rem; }
.argument-list { border-top: 1px solid var(--line); margin-top: 14px; }
.argument-list > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.argument-list code { color: var(--excel-dark); font-weight: 700; }
.argument-list p { margin: 0; font-size: .8rem; }
.beginner-note { margin-top: 16px; padding: 14px 16px; background: var(--warning-soft); border-left: 4px solid #d8912e; }
.beginner-note strong { color: var(--warning); font-size: .75rem; }
.beginner-note p { margin: 5px 0 0; }
.dialog-links { display: flex; justify-content: space-between; gap: 18px; border-bottom: 0 !important; }
.dialog-links a { color: var(--excel-dark); font-weight: 700; text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: -70px; z-index: 100; transform: translateX(-50%); padding: 10px 18px; background: #111; color: #fff; font-size: .8rem; transition: bottom .2s ease; }
.toast.is-visible { bottom: 22px; }

/* Formula knowledge */
.knowledge-hero { padding: 74px 0 66px; background: linear-gradient(120deg, #0c4f2b, var(--excel-deep)); color: #fff; }
.knowledge-hero .section-label { color: #a9dec0; }
.knowledge-hero h1 { max-width: 900px; margin: 0; font-size: clamp(2.25rem, 5vw, 4.2rem); line-height: 1.18; letter-spacing: -.045em; }
.knowledge-hero p:last-child { max-width: 780px; margin: 22px 0 0; color: #d4e5da; font-size: 1.02rem; }
.knowledge-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 50px; align-items: start; }
.knowledge-local-nav { position: sticky; top: 100px; display: grid; background: #fff; border-top: 3px solid var(--excel); }
.knowledge-local-nav strong { padding: 15px 16px 10px; font-size: .8rem; }
.knowledge-local-nav a { padding: 10px 16px; color: #3f4b44; border-top: 1px solid var(--line); font-size: .76rem; text-decoration: none; }
.knowledge-local-nav a:hover { background: var(--excel-soft); color: var(--excel-dark); }
.knowledge-content { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.knowledge-section { min-width: 0; max-width: 100%; scroll-margin-top: 100px; padding: 38px 40px; background: #fff; border: 1px solid var(--line); }
.knowledge-section > header { max-width: 820px; margin-bottom: 24px; }
.knowledge-section > header h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.35; }
.knowledge-section > header p:last-child { margin: 12px 0 0; color: var(--muted); }
.knowledge-section > h3 { margin: 34px 0 14px; font-size: 1.18rem; }
.formula-anatomy { margin: 22px 0; border: 1px solid var(--line); }
.formula-anatomy > code { display: block; padding: 20px 24px; background: #122119; color: #d8f1e2; font-family: Consolas, monospace; font-size: clamp(1.4rem, 3vw, 2rem); }
.formula-anatomy dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.formula-anatomy dl div { padding: 12px 14px; border-right: 1px solid var(--line); }
.formula-anatomy dl div:last-child { border-right: 0; }
.formula-anatomy dt { color: var(--excel-dark); font-family: Consolas, monospace; font-weight: 800; }
.formula-anatomy dd { margin: 3px 0 0; color: var(--muted); font-size: .75rem; }
.reference-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.reference-type-grid article { padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--excel); }
.reference-type-grid span { color: var(--excel-dark); font-family: Consolas, monospace; font-size: 1.2rem; font-weight: 800; }
.reference-type-grid h3 { margin: 10px 0 5px; font-size: 1rem; }
.reference-type-grid p { margin: 0; color: var(--muted); font-size: .82rem; }
.reference-copy-example { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 12px; align-items: stretch; margin: 22px 0; }
.reference-copy-example > div { padding: 20px; background: #f4f8f5; border: 1px solid var(--line); }
.reference-copy-example span { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; }
.reference-copy-example code { display: block; margin: 8px 0; color: var(--excel-dark); font-family: Consolas, monospace; font-size: 1.2rem; font-weight: 800; }
.reference-copy-example p { margin: 0; font-size: .8rem; }
.reference-copy-example > b { display: grid; place-items: center; color: var(--excel); font-size: .76rem; text-align: center; }
.knowledge-screen-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 24px 0; }
.actual-excel-shot { min-width: 0; margin: 0; overflow: hidden; border: 1px solid #bcc9c1; background: #eef2ef; box-shadow: 0 8px 24px rgba(12, 63, 37, .08); }
.actual-excel-shot > img { display: block; width: 100%; height: auto; background: #f2f2f2; }
.actual-excel-shot.dialog-shot > img { width: min(100%, 720px); margin-inline: auto; aspect-ratio: auto; object-fit: contain; }
.knowledge-sheet-crop { position: relative; aspect-ratio: 2.2 / 1; overflow: hidden; background: #fff; }
.knowledge-sheet-crop img { display: block; width: 170%; max-width: none; height: auto; transform: translateY(-22.5%); }
.workflow-shot { grid-column: 1 / -1; }
.workflow-screen-crop { position: relative; aspect-ratio: 2.52 / 1; overflow: hidden; background: #fff; }
.workflow-screen-crop img { display: block; width: 100%; max-width: none; height: auto; transform: translateY(-24.13%); }
.workflow-screen-crop.formula-bar-only-crop { aspect-ratio: 15.5 / 1; }
.formula-bar-only-crop .formula-if-target { left: 15.35%; top: 11%; width: 4.15%; height: 31%; }
.formula-bar-only-crop .formula-if-badge { left: 18.75%; top: 3%; }
.screen-click-box { position: absolute; z-index: 2; border: 2px solid #d71920; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 0 4px rgba(215,25,32,.2); pointer-events: none; }
.screen-click-badge { position: absolute; z-index: 3; display: grid; width: 24px; height: 24px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #d71920; color: #fff; font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.28); pointer-events: none; }
.function-box-target { left: .55%; top: 1.55%; width: 7.15%; height: 5%; }
.function-box-badge { left: 6.15%; top: 1.25%; }
.formula-if-target { left: 15.35%; top: 1.35%; width: 2.75%; height: 5.1%; }
.formula-if-badge { left: 17.1%; top: .9%; }
.actual-excel-shot figcaption { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 13px; min-height: 0; padding: 16px 18px; border-top: 1px solid var(--line); background: #fff; }
.actual-excel-shot figcaption > span { display: grid; width: 30px; height: 30px; place-items: center; background: var(--excel); color: #fff; font-family: Arial, sans-serif; font-size: .76rem; font-weight: 800; }
.actual-excel-shot figcaption strong { display: block; font-size: .84rem; line-height: 1.5; }
.actual-excel-shot figcaption p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.65; }
.knowledge-screen-note { margin: -4px 0 18px; color: var(--muted); font-size: .82rem; }
.knowledge-practice-download { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0; padding: 20px 22px; background: var(--excel-soft); border-left: 4px solid var(--excel); }
.knowledge-practice-download strong { display: block; color: var(--excel-dark); }
.knowledge-practice-download p { margin: 4px 0 0; color: #405149; font-size: .82rem; }
.knowledge-practice-download .button { flex: 0 0 auto; }
.knowledge-result-table { margin-top: 26px; }
.knowledge-result-table > h3 { margin: 0 0 12px; font-size: 1.06rem; }
.knowledge-result-table code { color: var(--excel-dark); font-weight: 700; white-space: nowrap; }
.knowledge-steps { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: knowledge-step; border-top: 1px solid var(--ink); }
.knowledge-steps li { counter-increment: knowledge-step; position: relative; padding: 14px 12px 14px 52px; border-bottom: 1px solid var(--line); }
.knowledge-steps li::before { content: counter(knowledge-step); position: absolute; left: 7px; top: 12px; display: grid; width: 30px; height: 30px; place-items: center; background: var(--excel); color: #fff; font-family: Arial, sans-serif; font-weight: 800; }
.knowledge-steps strong { display: block; }
.knowledge-steps p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.knowledge-callout { margin: 22px 0 0; padding: 18px 20px; background: var(--excel-soft); border-left: 4px solid var(--excel); }
.knowledge-callout strong { display: block; margin-bottom: 5px; color: var(--excel-dark); }
.knowledge-callout p { margin: 0; }
.knowledge-callout.warning { background: var(--warning-soft); border-color: #d8912e; }
.knowledge-callout.warning strong { color: var(--warning); }
.mixed-reference-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mixed-reference-grid article { padding: 22px; border: 1px solid var(--line); }
.mixed-reference-grid code { color: var(--excel-dark); font-size: 1.5rem; font-weight: 800; }
.mixed-reference-grid h3 { margin: 10px 0 5px; }
.mixed-reference-grid p { color: var(--muted); }
.mixed-reference-grid small { display: block; padding-top: 10px; border-top: 1px solid var(--line); line-height: 1.8; }
.f4-cycle { margin-top: 20px; padding: 22px; background: #f4f8f5; }
.f4-cycle h3 { margin: 0 0 14px; }
.f4-cycle > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.f4-cycle code { padding: 8px 10px; background: #fff; border: 1px solid var(--line); color: var(--excel-dark); font-weight: 800; }
.f4-cycle p { margin: 14px 0 0; color: var(--muted); font-size: .82rem; }
.calculation-order { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.calculation-order div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 20px; border: 1px solid var(--line); }
.calculation-order code { color: var(--excel-dark); font-size: 1.15rem; font-weight: 800; }
.calculation-order strong { color: var(--excel); font-size: 1.5rem; }
.calculation-order p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .8rem; }
.nested-formula > code { display: block; padding: 18px 20px; background: #122119; color: #d8f1e2; font-family: Consolas, monospace; font-size: clamp(.95rem, 2.3vw, 1.35rem); overflow-wrap: anywhere; }
.nest-breakdown { display: grid; grid-template-columns: 1fr 50px 1fr; align-items: stretch; margin-top: 14px; }
.nest-breakdown article { padding: 18px; border: 1px solid var(--line); }
.nest-breakdown article > span { color: var(--excel); font-size: .7rem; font-weight: 800; }
.nest-breakdown article strong { display: block; margin: 7px 0; color: var(--excel-dark); font-family: Consolas, monospace; overflow-wrap: anywhere; }
.nest-breakdown article p { margin: 0; color: var(--muted); font-size: .8rem; }
.nest-breakdown > b { display: grid; place-items: center; color: var(--excel); font-size: 1.4rem; }
.nested-screen-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.nested-screen-grid .function-operation-shot { margin-bottom: 0; }

/* Book-style guide, table of contents and index */
.book-hero { padding: 74px 0 64px; background: var(--excel-deep); color: #fff; }
.book-hero .section-label { color: #a9dec0; }
.book-hero h1 { max-width: 880px; margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.2; letter-spacing: -.04em; }
.book-hero p:last-child { max-width: 780px; margin: 22px 0 0; color: #d4e5da; font-size: 1.02rem; }
.book-page { padding: 68px 0 96px; background: var(--canvas); }
.book-content { counter-reset: front-page; }
.guide-section { counter-increment: front-page; }
.guide-section::before {
  content: "PAGE 00-" counter(front-page, decimal-leading-zero);
  display: block;
  margin-bottom: 8px;
  color: #647168;
  font-family: Arial, sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-align: right;
}
.integrated-index::before {
  content: "PAGE INDEX";
  display: block;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto 8px;
  color: #647168;
  font-family: Arial, sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-align: right;
}
.book-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 50px; align-items: start; }
.book-local-nav { position: sticky; top: 100px; display: grid; background: #fff; border-top: 3px solid var(--excel); }
.book-local-nav strong { padding: 15px 16px 10px; font-size: .8rem; }
.book-local-nav a { padding: 9px 16px; color: #3f4b44; border-top: 1px solid var(--line); font-size: .76rem; text-decoration: none; }
.book-local-nav a:hover { background: var(--excel-soft); color: var(--excel-dark); }
.book-content { min-width: 0; display: grid; gap: 28px; }
.guide-section { scroll-margin-top: 100px; padding: 38px 40px; background: #fff; border: 1px solid var(--line); }
.guide-section > header { max-width: 780px; margin-bottom: 24px; }
.guide-section > header h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.35; }
.guide-section > header p { margin: 12px 0 0; color: var(--muted); }
.guide-section h3 { margin: 28px 0 8px; font-size: 1.2rem; }
.guide-section h4 { margin: 20px 0 5px; font-size: 1rem; }
.guide-section p { max-width: 82ch; }
.editorial-lead { padding: 22px 24px; border-left: 5px solid var(--excel); background: var(--excel-soft); font-size: 1.03rem; }
.book-steps { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: bookstep; border-top: 1px solid var(--ink); }
.book-steps li { counter-increment: bookstep; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.book-steps li::before { content: counter(bookstep); display: grid; place-items: center; width: 34px; height: 34px; background: var(--excel); color: #fff; font-family: Arial, sans-serif; font-weight: 800; }
.book-steps strong { display: block; margin-bottom: 3px; }
.book-steps p { margin: 0; color: var(--muted); font-size: .84rem; }
.notation-grid, .capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; gap: 14px; }
.notation-grid { counter-reset: notation-card; }
.capability-grid { counter-reset: capability-card; }
.notation-grid article, .capability-grid article { position: relative; min-width: 0; padding: 20px 62px 20px 20px; border: 1px solid var(--line); }
.notation-grid article { counter-increment: notation-card; display: grid; align-content: start; gap: 7px; }
.capability-grid article { counter-increment: capability-card; }
.notation-grid article::before, .capability-grid article::before { position: absolute; top: 15px; right: 15px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--excel-soft); color: var(--excel-dark); font-family: Arial, sans-serif; font-size: .72rem; font-weight: 800; }
.notation-grid article::before { content: counter(notation-card, decimal-leading-zero); }
.capability-grid article::before { content: counter(capability-card, decimal-leading-zero); }
.notation-grid code { display: block; min-width: 0; margin: 0; color: var(--excel-dark); font-weight: 800; overflow-wrap: anywhere; }
.notation-grid strong { display: block; min-width: 0; line-height: 1.45; }
.notation-grid p, .capability-grid p { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.capability-grid article { border-top: 4px solid var(--excel); }
.capability-grid h3 { margin: 0; font-size: 1.02rem; }
.capability-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 24px 0; }
.capability-flow div { position: relative; min-height: 86px; padding: 14px; background: var(--excel-soft); color: var(--excel-dark); font-weight: 800; text-align: center; }
.capability-flow div:not(:last-child)::after { content: "›"; position: absolute; top: 50%; right: -9px; z-index: 1; transform: translateY(-50%); color: var(--excel); font-size: 1.6rem; }
.excel-map { overflow: hidden; margin: 22px 0; border: 2px solid #34433a; background: #fff; }
.excel-map-title { padding: 7px 12px; background: #176b3a; color: #fff; font-size: .78rem; text-align: center; }
.excel-map-tabs { display: flex; gap: 18px; padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: .7rem; font-weight: 700; }
.excel-map-ribbon { min-height: 66px; padding: 12px; background: #f7f8f7; border-bottom: 1px solid #aeb9b2; color: #59655e; font-size: .76rem; }
.excel-map-formula { display: grid; grid-template-columns: 112px 1fr; border-bottom: 1px solid #aeb9b2; font-size: .74rem; }
.excel-map-formula span { padding: 7px 10px; border-right: 1px solid #aeb9b2; }
.excel-map-formula span:last-child { border-right: 0; }
.excel-map-grid { display: grid; grid-template-columns: 34px repeat(6, 1fr); grid-template-rows: 25px repeat(5, 34px); background: #d5ddd8; gap: 1px; }
.excel-map-grid span { display: grid; place-items: center; background: #fff; font-size: .68rem; }
.excel-map-grid span:nth-child(-n+7), .excel-map-grid span:nth-child(7n+1) { background: #f2f4f3; font-weight: 700; }
.excel-map-status { display: flex; justify-content: space-between; padding: 6px 12px; background: #f3f5f4; font-size: .68rem; }
.actual-excel-screen { margin: 24px 0 30px; }
.actual-excel-screen-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1426 / 735;
  border: 1px solid #839088;
  background: #fff;
  box-shadow: 0 10px 28px rgba(11, 70, 40, .12);
}
.actual-excel-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.actual-excel-screen figcaption { margin-top: 9px; color: var(--muted); font-size: .76rem; }
.screen-callout-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: screenpart;
  border-top: 1px solid var(--ink);
}
.screen-callout-key li {
  counter-increment: screenpart;
  display: grid;
  grid-template-columns: 28px minmax(110px, .42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
}
.screen-callout-key li::before {
  content: counter(screenpart);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #c91515;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: .68rem;
  font-weight: 800;
}
.screen-callout-key span { color: var(--muted); }
.screen-callout {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c91515;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 1px 5px rgba(0,0,0,.32);
}
.screen-callout.c1 { top: 1%; left: 28%; }
.screen-callout.c2 { top: 7%; left: 8%; }
.screen-callout.c3 { top: 16%; left: 54%; }
.screen-callout.c4 { top: 25%; left: 4%; }
.screen-callout.c5 { top: 25%; left: 34%; }
.screen-callout.c6 { top: 31%; left: 48%; }
.screen-callout.c7 { top: 49%; left: .4%; }
.screen-callout.c8 { top: 33.5%; left: 19.2%; }
.screen-callout.c9 { bottom: 2.2%; left: 21%; }
.screen-callout.c10 { bottom: 2.2%; right: 18%; }
.screen-privacy-cover {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  width: 13.5%;
  height: 8%;
  background: #f2f2f2;
  border-left: 1px solid #ddd;
}
.screen-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--ink); }
.screen-parts > div { padding: 12px 10px; border-bottom: 1px solid var(--line); }
.screen-parts > div:nth-child(odd) { border-right: 1px solid var(--line); }
.screen-parts dt { color: var(--excel-dark); font-weight: 800; }
.screen-parts dd { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.screen-elements-extra { counter-reset: screenextra 10; }
.screen-elements-extra { grid-template-rows: repeat(5, auto); grid-auto-flow: column; }
.screen-elements-extra > div { counter-increment: screenextra; position: relative; min-height: 68px; padding-left: 52px; }
.screen-elements-extra > div:nth-child(odd) { border-right: 0; }
.screen-elements-extra > div:nth-child(-n+5) { border-right: 1px solid var(--line); }
.screen-elements-extra > div::before { content: counter(screenextra); position: absolute; top: 13px; left: 10px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--excel-soft); color: var(--excel-dark); font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; }
.pointer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 12px; }
.pointer-grid { counter-reset: pointer-card; }
.pointer-card { counter-increment: pointer-card; position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 18px; align-items: center; min-width: 0; padding: 18px 52px 18px 18px; border: 1px solid var(--line); }
.pointer-card::before { content: counter(pointer-card, decimal-leading-zero); position: absolute; top: 14px; right: 14px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--excel-soft); color: var(--excel-dark); font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; }
.pointer-card h3 { margin: 0 0 3px; font-size: .96rem; }
.pointer-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.pointer-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid #d5ddd8;
  background-color: #f4f7f5;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 56px 56px;
}
.pointer-icon.arrow { background-image: url("../images/ui/cursors/arrow.svg"); }
.pointer-icon.select { background-image: url("../images/ui/cursors/select.svg"); }
.pointer-icon.fill { background-image: url("../images/ui/cursors/fill.svg"); }
.pointer-icon.text { background-image: url("../images/ui/cursors/text.svg"); }
.pointer-icon.move { background-image: url("../images/ui/cursors/move.svg"); }
.pointer-icon.resize-h { background-image: url("../images/ui/cursors/resize-h.svg"); }
.pointer-icon.resize-v { background-image: url("../images/ui/cursors/resize-v.svg"); }
.pointer-icon.hand { background-image: url("../images/ui/cursors/hand.svg"); }
.reader-nav-label {
  padding: 15px 9px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--excel-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.integrated-reader { scroll-margin-top: 76px; border-top: 8px solid var(--excel-deep); }
.integrated-index { scroll-margin-top: 76px; }
.integrated-index-heading { max-width: 760px; margin-bottom: 24px; }
.integrated-index-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
#objects { display: none; }
h1, h2, h3 { overflow-wrap: anywhere; text-wrap: balance; }
.ribbon-details { margin-top: 16px; border-top: 1px solid var(--ink); }
.ribbon-details details { border-bottom: 1px solid var(--line); }
.ribbon-details summary { padding: 15px 10px; color: var(--excel-dark); font-weight: 800; cursor: pointer; }
.command-list { margin: 0; padding: 0 12px 18px; }
.command-list > div { display: grid; grid-template-columns: minmax(150px, .32fr) minmax(0, 1fr); gap: 18px; padding: 9px 0; border-top: 1px solid #e6ebe8; }
.command-list dt { font-weight: 800; }
.command-list dd { margin: 0; color: var(--muted); font-size: .8rem; }
.layout-option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.layout-option-grid article { padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--excel); }
.layout-option-grid h3 { margin: 0 0 6px; font-size: .98rem; }
.layout-option-grid p { margin: 0; color: var(--muted); font-size: .8rem; }
.caution-box { margin-top: 20px; padding: 16px 18px; background: var(--warning-soft); border-left: 4px solid #d8912e; }
.caution-box strong { color: var(--warning); }
.caution-box p { margin: 4px 0 0; }
.contents-list { display: grid; gap: 18px; }
.contents-part { padding: 26px 30px; background: #fff; border-top: 4px solid var(--excel); }
.contents-part > header { display: grid; grid-template-columns: 92px 1fr; gap: 20px; align-items: baseline; border-bottom: 1px solid var(--ink); padding-bottom: 12px; }
.contents-part > header span { color: var(--excel); font-family: Arial, sans-serif; font-size: .75rem; font-weight: 800; }
.contents-part h2 { margin: 0; font-size: 1.45rem; }
.contents-part ol { margin: 12px 0 0; padding: 0; list-style: none; }
.contents-part li a { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 9px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.contents-part li a:hover { background: var(--excel-soft); }
.contents-part li span { color: var(--excel); font-family: Arial, sans-serif; font-size: .7rem; font-weight: 800; }
.index-toolbar { display: flex; gap: 10px; margin-bottom: 22px; padding: 18px; background: #fff; border: 1px solid var(--line); }
.index-toolbar label { font-weight: 800; }
.index-toolbar input { flex: 1; min-width: 0; padding: 8px 11px; border: 1px solid #9eaaa2; }
.index-groups { display: grid; gap: 16px; }
.index-group { padding: 24px 28px; background: #fff; border-top: 4px solid var(--excel); }
.index-group h2 { margin: 0 0 10px; color: var(--excel-dark); font-size: 1.5rem; }
.index-entry { display: grid; grid-template-columns: minmax(130px, .3fr) minmax(0, 1fr); gap: 18px; padding: 9px 2px; border-top: 1px solid var(--line); }
.index-entry a { color: var(--excel-dark); font-weight: 800; text-decoration: none; }
.index-entry a:hover { text-decoration: underline; }
.index-entry p { margin: 0; color: var(--muted); font-size: .8rem; }
.index-empty { padding: 30px; background: #fff; text-align: center; }

img.is-zoomable-image { cursor: zoom-in; }
img.is-zoomable-image:focus-visible { outline: 4px solid #d71920; outline-offset: 4px; }
html.is-image-lightbox-open { overflow: hidden; }
.image-lightbox { box-sizing: border-box; width: min(96vw, 1600px); max-width: none; height: 94vh; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 0; background: #101814; color: #fff; box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.image-lightbox::backdrop { background: rgba(3, 12, 7, .86); }
.image-lightbox-shell { display: grid; box-sizing: border-box; min-width: 0; max-width: 100%; height: 100%; grid-template-rows: auto minmax(0, 1fr); }
.image-lightbox-header { display: flex; box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 58px; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 12px 10px 20px; border-bottom: 1px solid rgba(255,255,255,.18); background: #17231d; }
.image-lightbox-caption { min-width: 0; margin: 0; overflow: hidden; color: #fff; font-size: .86rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox-close { flex: 0 0 auto; min-width: 88px; min-height: 38px; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.image-lightbox-close:hover, .image-lightbox-close:focus-visible { background: #fff; color: #17231d; }
.image-lightbox-stage { display: grid; box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 0; place-items: center; overflow: auto; padding: 18px; }
.image-lightbox-stage > img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(94vh - 96px); object-fit: contain; }
.image-lightbox-stage > .knowledge-sheet-crop,
.image-lightbox-stage > .workflow-screen-crop { box-sizing: border-box; min-width: 0; width: min(100%, 1500px); max-width: 100%; }
.image-lightbox-stage .is-zoomable-image { cursor: default; }
.image-lightbox-hint { color: #bfd0c5; font-size: .72rem; font-weight: 500; white-space: nowrap; }

@media (max-width: 1100px) {
  .site-header { height: 72px; }
  .header-inner { gap: 14px; }
  .brand-logo { width: 250px; }
  .brand-tagline { margin-left: 42px; font-size: .58rem; }
  .header-current-page { display: flex; }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 71px; left: 0; right: 0; height: auto; max-height: calc(100vh - 71px); overflow-y: auto; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 25px rgba(0,0,0,.1); }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 48px; padding: 0 20px; border-bottom: 1px solid var(--line); }
  .site-nav a.is-current { border-bottom-color: var(--excel-dark); }
}

@media (max-width: 980px) {
  .hero-layout, .reference-banner-inner, .function-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-workflow { max-width: 620px; }
  .section-heading.split, .two-column { grid-template-columns: 1fr; gap: 28px; }
  .project-list { grid-template-columns: repeat(2, 1fr); }
  .project-item { border-bottom: 1px solid var(--line); }
  .reader-main { grid-template-columns: 250px minmax(0, 1fr); }
  .filter-panel { grid-template-columns: 2fr 1fr; }
  .function-grid { grid-template-columns: repeat(2, 1fr); }
  .starter-layout { grid-template-columns: 1fr; gap: 36px; }
  .book-layout { grid-template-columns: 1fr; }
  .book-local-nav { position: static; grid-template-columns: repeat(3, 1fr); }
  .book-local-nav strong { grid-column: 1 / -1; }
  .term-card-grid { grid-template-columns: 1fr; }
  .knowledge-layout { grid-template-columns: minmax(0, 1fr); }
  .knowledge-local-nav { position: static; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .knowledge-local-nav a { min-width: 0; overflow-wrap: anywhere; }
  .knowledge-local-nav strong { grid-column: 1 / -1; }
  .nested-screen-grid, .knowledge-screen-grid { grid-template-columns: 1fr; }
  .actual-excel-shot figcaption { min-height: 0; }
}

@media (max-width: 760px) {
  .image-lightbox { inset: 0; width: 100%; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .image-lightbox-shell { width: 100%; max-width: 100vw; }
  .image-lightbox-header { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; padding-left: 14px; }
  .image-lightbox-hint { display: none; }
  .image-lightbox-close { min-width: 64px; }
  .image-lightbox-stage { width: 100%; padding: 10px; }
  .image-lightbox-stage > .knowledge-sheet-crop,
  .image-lightbox-stage > .workflow-screen-crop { width: 100%; max-width: 100%; }
  .site-shell { width: min(calc(100% - 28px), var(--max)); }
  .site-header { height: 64px; }
  .brand small { display: none; }
  .brand { gap: 0; }
  .brand-logo { width: 210px; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; }
  .header-current-page { display: flex; }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 63px; left: 0; right: 0; height: auto; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 25px rgba(0,0,0,.1); }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 48px; padding: 0 20px; border-bottom: 1px solid var(--line); }
  .site-nav a.is-current { border-bottom-color: var(--excel-dark); }
  .home-hero, .content-section { padding: 58px 0; }
  .hero-layout { grid-template-columns: 1fr; gap: 42px; }
  .hero-copy h1 { font-size: 2.45rem; }
  .hero-facts li { min-width: 0; padding-right: 14px; }
  .hero-facts li + li { padding-left: 14px; }
  .hero-facts strong { font-size: 1.4rem; }
  .quick-start-grid { grid-template-columns: 1fr; }
  .quick-start-grid a, .quick-start-grid a:last-child { border: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .section-heading.split { grid-template-columns: 1fr; gap: 15px; }
  .chapter-row { grid-template-columns: 42px 1fr 18px; gap: 12px; }
  .chapter-row-meta { display: none; }
  .two-column { grid-template-columns: 1fr; gap: 35px; }
  .project-list { grid-template-columns: 1fr; }
  .reference-banner-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner nav { flex-wrap: wrap; }
  .footer-legal { margin-top: 22px; }
  .reader-main { display: block; }
  .reader-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .reader-sidebar-inner { position: static; max-height: none; padding: 22px 14px; }
  #chapter-navigation { grid-template-columns: repeat(2, 1fr); }
  #chapter-navigation a { border-right: 1px solid var(--line); }
  .lesson-article { width: min(calc(100% - 28px), var(--reading)); padding-top: 45px; }
  .chapter-opener { grid-template-columns: 82px 1fr; gap: 22px 18px; }
  .chapter-kicker { min-height: 112px; }
  .chapter-kicker strong { font-size: 3.25rem; }
  .chapter-goals > header { grid-template-columns: 1fr; gap: 4px; }
  .chapter-door-plan { grid-template-columns: 1fr; }
  .chapter-door-plan > div + div { border-left: 0; border-top: 1px solid #b9d7c4; }
  .chapter-deep-dive { padding: 26px 22px; }
  .notation-grid, .capability-grid, .screen-parts, .pointer-grid { grid-template-columns: 1fr; }
  .notation-grid, .capability-grid { grid-template-rows: none; grid-auto-flow: row; }
  .pointer-grid { grid-template-rows: none; grid-auto-flow: row; }
  .screen-parts > div:nth-child(odd) { border-right: 0; }
  .screen-elements-extra { grid-template-rows: none; grid-auto-flow: row; }
  .screen-elements-extra > div:nth-child(-n+5) { border-right: 0; }
  .capability-flow { grid-template-columns: repeat(2, 1fr); }
  .layout-option-grid { grid-template-columns: 1fr; }
  .guide-section { padding: 28px 24px; }
  .command-list > div { grid-template-columns: 1fr; gap: 2px; }
  .contents-part { padding: 22px; }
  .index-entry { grid-template-columns: 1fr; gap: 3px; }
  .step-heading { grid-template-columns: 78px 1fr; }
  .annotated-shot figcaption span { width: 100%; margin-left: 0; }
  .action-details > div { grid-template-columns: 74px minmax(0, 1fr); }
  .unit-index { grid-template-columns: 1fr; }
  .download-row { grid-template-columns: 42px 1fr; }
  .download-actions { grid-column: 2; justify-content: flex-start; }
  .download-actions > a:last-child { text-align: left; }
  .project-download-grid, .asset-downloads { grid-template-columns: 1fr; }
  .chapter-pager { grid-template-columns: 1fr; }
  .chapter-pager a:last-child { text-align: left; }
  .asset-downloads article + article { padding: 30px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .screen-example-download { align-items: stretch; flex-direction: column; }
  .screen-example-download .button { width: 100%; }
  .function-hero-grid, .syntax-layout { grid-template-columns: 1fr; gap: 30px; }
  .function-hero-stats { max-width: 520px; }
  .syntax-example dl { grid-template-columns: repeat(2, 1fr); }
  .filter-panel { position: static; grid-template-columns: 1fr; }
  .function-grid { grid-template-columns: 1fr; }
  .function-grid.is-compact .function-card { grid-template-columns: 130px 1fr; gap: 10px; }
  .function-grid.is-compact .function-card-bottom { grid-column: 2; }
  .starter-functions { grid-template-columns: repeat(3, 1fr); }
  .argument-list > div { grid-template-columns: 1fr; gap: 4px; }
  .knowledge-section { padding: 28px 24px; }
  .knowledge-practice-download { align-items: stretch; flex-direction: column; }
  .knowledge-practice-download .button { width: 100%; }
  .reference-type-grid, .reference-copy-example, .mixed-reference-grid, .calculation-order, .nest-breakdown { grid-template-columns: 1fr; }
  .reference-copy-example > b { min-height: 34px; }
  .formula-anatomy dl { grid-template-columns: repeat(2, 1fr); }
  .formula-anatomy dl div:nth-child(2) { border-right: 0; }
  .nest-breakdown > b { min-height: 42px; transform: rotate(90deg); }
}

@media (max-width: 480px) {
  .brand-logo { width: 190px; }
  .header-current-page { display: none; }
  .header-inner { gap: 10px; }
  .menu-button { padding-inline: 9px; }
}

@media (max-width: 460px) {
  .brand strong { font-size: .86rem; }
  .header-current-page small { display: none; }
  .header-current-page strong { margin-top: 0; font-size: .7rem; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-facts li { display: grid; gap: 4px; }
  .reference-search div { grid-template-columns: minmax(0, 1fr) 76px; }
  .reference-search input, .reference-search button { height: 48px; }
  #chapter-navigation { grid-template-columns: 1fr; }
  .chapter-opener { grid-template-columns: 1fr; }
  .chapter-kicker { min-height: 76px; }
  .chapter-kicker strong { font-size: 2.7rem; }
  .action-guide-heading { grid-template-columns: 48px minmax(0, 1fr); }
  .operation-brief { grid-template-columns: 1fr; gap: 4px; }
  .annotated-shot { padding: 8px 8px 0; }
  .action-details { padding-inline: 10px; }
  .action-details > div { grid-template-columns: 1fr; }
  .action-details dt { padding: 10px 5px 0; }
  .action-details dd { padding: 3px 5px 10px; }
  .result-preview { grid-template-columns: 1fr; }
  .result-preview span { min-height: 36px; }
  .lesson-title dl div { grid-template-columns: 1fr; gap: 2px; }
  .compact-reference-list > div { grid-template-columns: 1fr; gap: 3px; }
  .book-local-nav { grid-template-columns: repeat(2, 1fr); }
  .capability-flow { grid-template-columns: 1fr; }
  .capability-flow div:not(:last-child)::after { display: none; }
  .contents-part > header { grid-template-columns: 1fr; gap: 3px; }
  .contents-part li a { grid-template-columns: 58px 1fr; }
  .index-toolbar { display: grid; }
  .download-flow { display: grid; }
  .project-actions { display: grid; }
  .function-hero-stats { grid-template-columns: 1fr; }
  .function-hero-stats div { border-right: 1px solid #4f735d; border-bottom: 1px solid #4f735d; }
  .starter-functions { grid-template-columns: repeat(2, 1fr); }
  .dialog-body { padding-inline: 20px; }
  .function-dialog-shot-grid, .autosum-shot-grid { grid-template-columns: 1fr; }
  .function-entry-method > header { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
  .autosum-menu-shot img { width: 158px; }
  .knowledge-local-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .screen-callout-key { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .screen-callout-key li { grid-template-columns: 28px minmax(0, 1fr); }
  .screen-callout-key li span { grid-column: 2; }
  .screen-callout { width: 20px; height: 20px; font-size: .62rem; }
}

.chart-reference {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.chart-reference > header { max-width: 54rem; }

.chart-reference-list {
  display: grid;
  gap: clamp(2rem, 5vw, 3.75rem);
  margin-top: 1.75rem;
}

.chart-reference-card {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 81, 50, 0.08);
}

.chart-reference-number {
  margin: 0 0 0.35rem;
  color: var(--excel-green);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.chart-reference-copy h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}

.chart-reference-copy dl {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
}

.chart-reference-copy dl div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.7rem;
}

.chart-reference-copy dt {
  color: var(--excel-green);
  font-weight: 800;
}

.chart-reference-copy dd,
.chart-reference-card figure { margin: 0; }

.chart-reference-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #cbd9d0;
  border-radius: 0.65rem;
  cursor: zoom-in;
}

.chart-reference-card figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .chart-reference-copy dl div { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media print {
  .site-header, .site-footer, .reader-sidebar, .lesson-downloads, .completion-toggle, .chapter-pager, .filter-panel, .quick-purpose, .view-toggle, .load-more-button { display: none !important; }
  .reader-main { display: block; background: #fff; }
  .lesson-article { width: 100%; padding: 0; }
  .action-guide { break-inside: avoid; box-shadow: none; }
}
