/* Approved design translation for the current browser preview.
   Motifs follow the confirmed SVG palette and layout; text and controls stay live. */
:root {
  --paper: #fff;
  --canvas: #fff;
  --branch: #79583d;
  --leaf: #376b4e;
  --leaf-pale: #edf4ee;
  --twig: #b8ccbb;
  --text: #243b30;
  --quiet: #53665a;
}
body { background: var(--paper); color: var(--text); }
.site-header {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--twig);
}
.site-header .inner { max-width: none; min-height: 72px; height: auto; padding: 10px clamp(20px,3vw,48px); gap: clamp(10px,2vw,30px); }
.brand { font-family: Author, Georgia, serif; font-size: 27px; letter-spacing: .11em; color: var(--text); white-space: nowrap; }
.brand small { display: block; font-family: Nunito, sans-serif; font-size: 9px; text-transform: uppercase; letter-spacing: .2em; margin: -7px 0 0 3px; color: var(--branch); }
.site-nav a { border-radius: 3px; font-size: 12px; letter-spacing: .055em; }
.site-nav a.active { background: transparent; color: var(--leaf); box-shadow: inset 0 -2px var(--leaf); }
.site-nav a:hover { background: var(--leaf-pale); }
.axis-sel-btn { border-radius: 3px; border-color: var(--twig); padding: 7px 12px; }
.axis-sel-btn::before { content: ''; display: inline-block; width: 18px; height: 14px; border-left: 2px solid var(--branch); border-bottom: 1px solid var(--branch); transform: skewY(-17deg); margin-right: 3px; }
.fontscale button { border-radius: 3px; border-color: var(--twig); }
.fontscale button.on { background: var(--leaf-pale); color: var(--leaf); border-color: var(--leaf); }
.app-body { max-width: none; grid-template-columns: 232px minmax(0,1fr) 260px; }
.leftnav, .rightctx { background: #fff; border-color: var(--twig); }
.leftnav-panel { padding: 30px 18px; }
.leftnav-cap, .rightctx-cap { color: var(--branch); letter-spacing: .23em; font-family: Nunito, sans-serif; }
.leftnav-list { border-left: 1px solid var(--twig); margin-left: 7px; }
.leftnav-list a { border-radius: 0; position: relative; padding: 12px 13px 12px 22px; font-size: 13px; }
.leftnav-list a::before { content: ''; position: absolute; left: -4px; top: 22px; width: 7px; height: 7px; background: #fff; border: 1px solid var(--twig); border-radius: 50%; }
.leftnav-list a.active { color: var(--leaf); background: var(--leaf-pale); font-weight: 700; }
.leftnav-list a.active::before { background: var(--leaf); border-color: var(--leaf); }
.leftnav-list .mi { color: var(--branch); font-size: 18px; }
.leftnav-handle { border-color: var(--twig); background: #fff; }
.canvas { padding: 40px clamp(22px,4vw,64px) 72px; }
.rightctx { padding: 34px 20px; }
.rightctx-cap { border-bottom: 1px solid var(--twig); padding-bottom: 9px; }
.ctx-field .k { color: var(--branch); }
.ctx-field .v { overflow-wrap: anywhere; }
.section-kicker, .hero-index { font-family: Nunito, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .23em; color: var(--branch); margin: 0 0 13px; }
.block-title { font-family: Author, Georgia, serif; font-size: clamp(27px,3vw,42px); font-weight: 500; letter-spacing: .025em; color: var(--text); }
.canvas .lead { max-width: 66ch; font-size: 14px; }
.canvas .hero { max-width: 840px; padding: clamp(22px,5vw,72px) 0 50px; }
.hero-root { width: min(390px,80%); height: auto; margin-bottom: 20px; }
.hero h1 { font-family: Author, Georgia, serif; font-size: clamp(38px,5.6vw,76px); font-weight: 500; letter-spacing: .015em; line-height: 1.2; }
.hero h1 em { color: var(--leaf); font-style: normal; }
.hero p { color: var(--quiet); }
.hero-cta { border-top: 1px solid var(--twig); padding-top: 25px; }
.btn { border-radius: 3px; }
.btn-primary { background: var(--leaf); }
.card { background: #fff; box-shadow: none; border: 1px solid var(--twig); border-radius: 3px; }
.pin-card { border-left: 3px solid var(--branch); }
.tree-panel { border: 0; padding: 16px 0 30px; background: transparent; }
.tree-graph-wrap { max-height: 72vh; padding: 17px 16px 28px; border-top: 1px solid var(--twig); background-image: linear-gradient(90deg, transparent 99.85%,var(--twig) 100%); background-size: 160px 100%; }
svg.mtree .edge { stroke: var(--branch); stroke-width: 2; }
svg.mtree .edge.weak { stroke: var(--twig); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .55; }
svg.mtree .gworld rect.box { fill: #f5f0e9; stroke: var(--branch); stroke-width: 2.2; }
svg.mtree .gnode rect.box { rx: 4; stroke: var(--twig); }
svg.mtree .gnode[data-type="ROOT"] rect.box { fill: #f5f0e9; stroke: var(--branch); stroke-width: 2.2; }
svg.mtree .gnode.sel rect.box { stroke: var(--leaf); stroke-width: 2.2; }
svg.mtree .gnode .gtype { fill: var(--branch); }
svg.mtree .depth-cap { fill: var(--branch); }
.detail-head { border-bottom: 1px solid var(--twig); padding-bottom: 15px; flex-wrap: wrap; gap: 12px; }
.detail-title { font-family: Author, Georgia, serif; font-size: clamp(28px,3vw,40px); font-weight: 500; }
.detail-tags { flex-wrap: wrap; }
.detail-tags .badge { border-radius: 2px; }
.dsec { position: relative; border-top-color: var(--twig); padding: 24px 0 25px 22px; }
.dsec::before { content: ''; width: 7px; height: 7px; position: absolute; left: 0; top: 33px; border: 1px solid var(--branch); border-radius: 50%; background: #fff; }
.dsec::after { content: ''; position: absolute; width: 1px; left: 3px; top: 41px; bottom: 0; background: var(--twig); }
.dsec-cap { color: var(--branch); letter-spacing: .09em; font-size: 11px; }
.statement { font-size: 17px; max-width: 70ch; }
.formula { display: block; width: fit-content; max-width: 100%; overflow-x: auto; border-radius: 0; background: #fff; border-left: 3px solid var(--branch); color: var(--text); padding: 16px 20px; }
.tguide { border-left-color: var(--branch); }
.cex { background: #f5f0e9; border-color: var(--branch); border-radius: 0; }
.expl-btn { border-radius: 2px; }
.expl-btn.on { background: var(--leaf-pale); color: var(--leaf); }
.search-surface { border-top: 1px solid var(--twig); padding: 23px 0; }
.search-surface .pin-row { margin: 0 0 30px; }
.search-surface input[type="search"] { border-radius: 2px; }
.search-tree { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 24px; }
.search-branch { border-left: 2px solid var(--branch); padding: 3px 0 0 18px; min-width: 0; }
.search-branch h3 { color: var(--branch); font-size: 12px; letter-spacing: .08em; margin: 0 0 18px; }
.search-hit { display: block; position: relative; width: 100%; text-align: left; background: #fff; border: 1px solid var(--twig); border-radius: 2px; padding: 16px 20px; font: inherit; color: var(--text); margin: 12px 0; min-height: 76px; }
.search-hit::before { content: ''; position: absolute; left: -21px; top: 27px; width: 20px; border-top: 1px solid var(--branch); }
.search-hit::after { content: ''; position: absolute; left: -26px; top: 23px; width: 8px; height: 8px; background: var(--leaf-pale); border: 1px solid var(--leaf); border-radius: 75% 0 75% 0; transform: rotate(-35deg); }
.search-hit:hover, .search-hit:focus-visible { border-color: var(--leaf); background: var(--leaf-pale); }
.search-hit b { display: block; font-size: 15px; margin-bottom: 5px; }
.search-hit .badge { float: right; }
.search-empty { display: flex; align-items: center; gap: 22px; color: var(--quiet); border-top: 1px solid var(--twig); padding: 28px 0; }
.search-empty .motif { width: 78px; height: 70px; flex: none; border-left: 3px dotted var(--branch); border-bottom: 2px dotted var(--branch); transform: skewY(-18deg); }
.site-footer { background: #fff; border-top: 1px solid var(--twig); }
@media (max-width: 1020px) { .app-body { grid-template-columns: 200px minmax(0,1fr); } }
@media (max-width: 680px) {
 .site-header .inner { flex-wrap: wrap; gap: 7px; }
 .brand { font-size: 23px; }
 .axis-sel { order: 3; }
 .fontscale { order: 4; margin-left: auto; }
 .app-body { grid-template-columns: minmax(0,1fr); }
 .canvas { padding: 24px 19px 50px; }
 .search-tree { display: block; }
 .search-branch { margin-bottom: 24px; }
 .search-hit { min-height: 56px; }
 .detail-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .view, svg.mtree .gnode rect.paint { animation: none !important; transition: none !important; } }
/* A validation mark reports the actual validation field, never release access. */
.validation-indicator { background: #edf4ee; border: 1px solid #70977d; color: #376b4e; font-weight: 700; }
@media (max-width: 680px) {
  .leftnav { display: block; width: 100%; min-height: 0; border-right: 0; border-bottom: 1px solid var(--twig); }
  .leftnav-panel { position: static; padding: 9px 16px; overflow-x: auto; }
  .leftnav-cap, .leftnav-pos, .leftnav-handle { display: none; }
  .leftnav-list { display: flex; gap: 7px; width: max-content; border-left: 0; margin: 0; }
  .leftnav-list a { padding: 8px 11px; white-space: nowrap; }
  .leftnav-list a::before { display: none; }
}
/* Plan and account pages use the same note-and-branch rhythm as the tree. */
.plan-grid { gap: 0; border-top: 1px solid var(--twig); grid-template-columns: repeat(3,minmax(0,1fr)); }
.plan-card { min-width: 0; border: 0; border-left: 1px solid var(--twig); border-bottom: 1px solid var(--twig); border-radius: 0; padding: 22px 19px 26px; box-shadow: none; background: #fff; }
.plan-card.current { box-shadow: inset 3px 0 var(--leaf); background: var(--leaf-pale); }
.plan-card.soon { opacity: 1; }
.plan-name { color: var(--text); font-family: Author, Georgia, serif; font-size: 22px; font-weight: 500; }
.plan-quota { color: var(--quiet); font-size: 13px; }
.badge { border-radius: 2px; }
.view[data-view="account"] .card { border: 0; border-top: 1px solid var(--twig); border-bottom: 1px solid var(--twig); padding: 26px 0; }
.view[data-view="account"] .btn-google { border-color: var(--twig); background: #fff; }
@media(max-width:900px) { .plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .plan-grid { grid-template-columns: 1fr; } }
/* Home follows the approved tree language: one botanical figure and path rows. */
.home-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,42%); align-items: center; gap: clamp(12px,3vw,48px); border-bottom: 1px solid var(--twig); }
.home-layout .hero { padding: clamp(40px,7vw,100px) 0; }
.home-layout .hero h1 { max-width: 9em; }
.home-layout .hero p:not(.hero-index):not(.hero-cta) { max-width: 52ch; }
.home-visual { position: relative; min-width: 0; padding: 28px 0 8px; background: linear-gradient(180deg,#fff 0%,#f8faf7 80%,#fff 100%); }
.home-visual svg { display: block; width: min(100%,490px); max-height: 600px; margin: auto; }
.visual-caption { display: flex; justify-content: space-between; gap: 8px; padding: 10px 20px 15px; border-top: 1px solid var(--twig); font: 700 10px Nunito,sans-serif; letter-spacing: .12em; color: var(--branch); }
.home-paths { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-bottom: 1px solid var(--twig); margin-bottom: 37px; }
.home-paths a { display: grid; grid-template-columns: 26px minmax(0,1fr) 24px; gap: 12px; align-items: start; padding: 27px 20px 30px; border-right: 1px solid var(--twig); color: var(--text); text-decoration: none; }
.home-paths a:last-child { border-right: 0; }
.home-paths a:hover,.home-paths a:focus-visible { background: var(--leaf-pale); }
.path-number { color: var(--branch); font: 700 11px Nunito,sans-serif; margin-top: 5px; }
.home-paths strong { display: block; font: 500 23px Author,Georgia,serif; }
.home-paths small { display: block; color: var(--quiet); line-height: 1.6; margin-top: 6px; }
.path-arrow { color: var(--leaf); font-size: 23px; line-height: 1; }
@media(max-width:980px) { .home-layout { grid-template-columns: 1fr minmax(220px,34%); } .home-paths { grid-template-columns: 1fr; } .home-paths a { border-right: 0; border-bottom: 1px solid var(--twig); padding: 18px 12px; } }
@media(max-width:680px) { .home-layout { grid-template-columns: 1fr; } .home-layout .hero { padding: 35px 0 0; } .home-visual svg { max-height: 280px; } }
/* Vector parts extracted from the user-approved SVG sheets. */
.approved-icon { display: block; width: 30px; height: 30px; object-fit: contain; flex: none; }
.leftnav-list a { gap: 9px; }
.nav-plain-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; color: var(--branch); flex: none; }
.leftnav-handle img { width: 29px; height: 29px; display: block; }
.status-with-icon,.validation-indicator { display: inline-flex; align-items: center; gap: 5px; }
.approved-status-icon { display: inline-block; width: 22px; height: 22px; object-fit: contain; flex: none; }
.tree-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tree-heading .block-title { margin: 0; }
.fullscreen-control { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border: 1px solid var(--twig); background: #fff; color: var(--leaf); cursor: pointer; font: 700 12px Nunito,sans-serif; white-space: nowrap; }
.fullscreen-control img { display: block; width: 32px; height: 32px; }
.fullscreen-control:hover,.fullscreen-control:focus-visible { background: var(--leaf-pale); border-color: var(--leaf); }
body.tree-fullscreen .app-body { grid-template-columns: minmax(0,1fr); }
body.tree-fullscreen .leftnav,body.tree-fullscreen .rightctx { display: none; }
body.tree-fullscreen .canvas { max-width: none; }
body.tree-fullscreen .tree-graph-wrap { max-height: calc(100vh - 260px); }
@media(max-width:680px) { .fullscreen-control span { display: none; } .approved-icon { width: 24px; height: 24px; } }
/* Explorer A and Traversal History C use the same branch family. */
.explorer-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; border-bottom: 1px solid var(--twig); padding-bottom: 17px; }
.explorer-heading .block-title { margin: 0 0 5px; }
.explorer-topic-list { padding: 8px 0 45px; }
.explorer-topic { display: grid; grid-template-columns: minmax(0,1fr) 75px; min-height: 185px; border-bottom: 1px solid var(--twig); position: relative; }
.explorer-topic::before { content: ''; position: absolute; left: 0; top: 21px; bottom: 21px; width: 2px; background: var(--branch); }
.explorer-main { padding: 24px 22px 25px 27px; min-width: 0; }
.explorer-main small { display: block; color: var(--branch); font: 700 11px Nunito,sans-serif; letter-spacing: .14em; }
.explorer-main h3 { font: 500 clamp(21px,2.5vw,30px) Author,Georgia,serif; margin: 7px 0 12px; }
.explorer-explain { display: block; position: relative; overflow: hidden; border: 0; background: transparent; color: var(--quiet); font: inherit; text-align: left; width: 100%; padding: 0; min-height: 32px; cursor: pointer; transition: min-height .2s ease; }
.explorer-summary,.explorer-more { display: block; min-width: 0; transition: opacity .16s ease, filter .16s ease; }
.explorer-more { position: absolute; left: 0; top: 0; right: 0; z-index: 1; opacity: 0; pointer-events: none; color: var(--text); font-weight: 600; line-height: 1.6; background: rgba(255,255,255,.96); }
.explorer-topic:hover .explorer-explain,.explorer-topic:focus-within .explorer-explain,.explorer-topic.explaining .explorer-explain { min-height: var(--more-height,32px); }
.explorer-topic:hover .explorer-summary,.explorer-topic:focus-within .explorer-summary,.explorer-topic.explaining .explorer-summary { filter: blur(3px); opacity: .12; }
.explorer-topic:hover .explorer-more,.explorer-topic:focus-within .explorer-more,.explorer-topic.explaining .explorer-more { opacity: 1; }
.explorer-arrow { border: 0; border-left: 1px solid var(--twig); background: #fff; color: var(--leaf); font-size: 32px; cursor: pointer; }
.explorer-arrow:hover,.explorer-arrow:focus-visible { background: var(--leaf-pale); }
.history-page { margin-top: 28px; }
.history-path { list-style: none; border-left: 2px solid var(--branch); padding: 0; margin: 0 0 0 16px; }
.history-path li { position: relative; }
.history-path li::before { content: ''; position: absolute; left: -6px; top: 31px; width: 8px; height: 8px; background: var(--leaf-pale); border: 1px solid var(--leaf); border-radius: 50%; }
.history-path button { display: flex; align-items: center; gap: 21px; width: 100%; border: 0; border-bottom: 1px solid var(--twig); background: #fff; color: var(--text); padding: 20px 22px 20px 35px; text-align: left; cursor: pointer; }
.history-path button:hover,.history-path button:focus-visible { background: var(--leaf-pale); }
.history-path button span:nth-child(2) { flex: 1; }
.history-path strong { font: 500 19px Author,Georgia,serif; }
.history-path small { display: block; color: var(--quiet); margin-top: 3px; }
.history-step { color: var(--branch); font: 700 12px Nunito,sans-serif; }
@media(max-width:680px) { .explorer-heading { align-items: start; flex-direction: column; } .explorer-topic { grid-template-columns: minmax(0,1fr) 54px; } .explorer-main { padding-left: 18px; } }
@media(prefers-reduced-motion:reduce) { .explorer-summary,.explorer-more,.explorer-explain { transition: none; } }
.home-visual .world-structure { display: block; width: min(100%,470px); height: min(43vw,500px); min-height: 270px; object-fit: contain; margin: auto; }
@media(max-width:680px) { .home-visual .world-structure { height: 280px; min-height: 0; } }
/* Counterexample B and Source/Evidence A stay in the detail's branch flow. */
.counterexample-note { background: #f5f0e9; border-left: 2px solid var(--branch); padding: 15px 21px; color: var(--text); }
.counterexample-note p { margin: 0 0 8px; }
.counterexample-note .k { color: var(--branch); }
.source-disclosure { border-top: 1px solid var(--twig); }
.source-disclosure summary { cursor: pointer; padding: 14px 2px; color: var(--leaf); font-weight: 700; }
.source-disclosure[open] summary { border-bottom: 1px solid var(--twig); }
.source-disclosure .src-list { margin: 15px 0; padding-left: 24px; }
.source-disclosure .src-list li { margin: 10px 0; overflow-wrap: anywhere; }
/* Next Leaves C: scroll through leaves without expanding all at once. */
.dsec:has(.pill-row .node-pill.link) .pill-row { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 12px; padding: 8px 2px 16px; scrollbar-color: var(--leaf) var(--leaf-pale); }
.dsec:has(.pill-row .node-pill.link) .node-pill.link { flex: 0 0 min(250px,75vw); text-align: left; white-space: normal; min-height: 52px; }
/* Term Popover C, with the approved horizontal Mimosa close part. */
.inline-term { padding: 0 2px; border: 0; border-bottom: 1px solid var(--leaf); background: transparent; color: var(--leaf); font: inherit; font-weight: 700; cursor: pointer; }
.inline-term:hover,.inline-term:focus-visible { background: var(--leaf-pale); }
.term-popover { position: fixed; z-index: 40; width: min(340px,calc(100vw - 24px)); max-height: min(260px,calc(100vh - 35px)); overflow: auto; background: #fff; border: 1px solid var(--twig); box-shadow: 0 12px 30px #243b3024; padding: 18px 20px; }
.term-popover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--branch); }
.term-close { float: right; display: inline-flex; align-items: center; gap: 4px; border: 0; background: #fff; color: var(--branch); cursor: pointer; padding: 2px 0; font-size: 12px; }
.term-close img { width: 76px; height: 31px; object-fit: contain; }
.term-close .mimosa-close-art { width: 76px; height: 35px; display:block; overflow:visible; }
.term-close:hover,.term-close:focus-visible { background: var(--leaf-pale); }
.term-title { color: var(--leaf); font: 600 20px Author,Georgia,serif; margin: 21px 0 8px; }
.term-definition { font-size: inherit; line-height: 1.7; margin: 0; }
/* Dedicated Cycle C: a static closed path, with named return point. */
.cycle-study { border-top: 1px solid var(--twig); padding: 26px 0 32px; }
.cycle-ring { position: relative; height: 260px; width: min(440px,85vw); margin: 0 auto; border: 3px solid var(--branch); border-radius: 55% 45% 49% 51% / 54% 48% 52% 46%; transform: rotate(-17deg); }
.cycle-ring::before { content: ''; position: absolute; inset: 18px; border: 1px solid var(--twig); border-radius: 52% 48% 57% 43%; }
.cycle-node { position: absolute; width: 19px; height: 28px; background: var(--leaf-pale); border: 2px solid var(--leaf); border-radius: 80% 0 80% 0; }
.cycle-start { left: 12%; top: 11%; transform: rotate(-25deg); }
.cycle-end { right: 14%; bottom: 5%; transform: rotate(155deg); }
.cycle-return { position: absolute; bottom: -11px; left: 42%; width: 42px; height: 17px; border-bottom: 2px solid var(--branch); transform: rotate(17deg); }
.cycle-route { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 17px; margin-top: 22px; }
.cycle-route div { min-width: 210px; }
.cycle-route small { display: block; color: var(--branch); font: 700 10px Nunito,sans-serif; letter-spacing: .14em; }
.cycle-route button { display: block; border: 0; border-bottom: 1px solid var(--twig); background: #fff; padding: 8px 0; color: var(--text); cursor: pointer; text-align: left; font: 500 17px Author,Georgia,serif; }
.cycle-route button:hover,.cycle-route button:focus-visible { color: var(--leaf); border-color: var(--leaf); }
.cycle-relation { color: var(--branch); font-size: 12px; }
/* Account → Saved B uses a reading list with an organic marker. */
.saved-overview { margin-top: 38px; border-top: 1px solid var(--twig); }
.saved-heading { display: flex; align-items: center; gap: 15px; padding: 20px 0 12px; }
.saved-heading img { width: 42px; height: 42px; }
.saved-heading .section-kicker { margin: 0; }
.saved-heading h3 { font: 500 24px Author,Georgia,serif; margin: 2px 0 0; }
.saved-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--twig); }
.saved-list li { border-bottom: 1px solid var(--twig); }
.saved-list button { width: 100%; border: 0; background: #fff; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 12px; color: var(--text); cursor: pointer; }
.saved-list button:hover,.saved-list button:focus-visible { background: var(--leaf-pale); }
.saved-list button img { width: 35px; height: 35px; flex: none; }
.saved-list button span:nth-of-type(1) { flex: 1; }
.saved-list strong { display: block; font-weight: 700; }
.saved-list small { display: block; color: var(--branch); margin-top: 3px; }
.history-expand { display: block; margin: 0 0 17px; background: #fff; border: 1px solid var(--twig); color: var(--leaf); padding: 10px 15px; cursor: pointer; }
.history-expand:hover { background: var(--leaf-pale); }
/* Compact Tree uses the approved Principle Node B outer contour. */
svg.mtree .gnode path.box { fill:#fff; stroke:var(--twig); stroke-width:1.35; vector-effect:non-scaling-stroke; transition:stroke .15s ease; }
svg.mtree .gnode[data-type="ROOT"] path.box { fill:#f5f0e9; stroke:var(--branch); stroke-width:2; }
svg.mtree .gnode[data-type="CHAIN"] path.box { fill:var(--leaf-pale); }
svg.mtree .gnode.sel path.box,svg.mtree .gnode:hover path.box,svg.mtree .gnode:focus-visible path.box { stroke:var(--leaf); stroke-width:2.2; }
svg.mtree .gnode.ea path.box { stroke-dasharray:4 3; }
svg.mtree .gnode path.box { fill:transparent; }
svg.mtree .gnode.sel path.box { fill:transparent; }
/* Font Size: approved hybrid B branch and junction, C leaf contours. */
.fontscale { position:relative; display:flex; align-items:center; gap:0; margin-left:0; padding:4px 2px 0; isolation:isolate; }
.fontscale::before { content:''; position:absolute; left:12%; right:12%; bottom:3px; height:1px; background:var(--branch); z-index:-1; }
.fontscale button,.fontscale button.on { position:relative; width:49px; height:39px; padding:0; border:0; background:transparent; color:var(--text); border-radius:0; cursor:pointer; }
.fontscale button img { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; }
.fontscale button .active-art { display:none; }
.fontscale button.on .inactive-art { display:none; }
.fontscale button.on .active-art { display:block; }
.fontscale button span { position:relative; z-index:1; display:block; font:700 10px Nunito,sans-serif; color:var(--text); padding-bottom:2px; }
.fontscale button.on span { color:var(--leaf); }
.fontscale button:hover { filter:brightness(.95); }
.fontscale button:focus-visible { outline:2px solid var(--leaf); outline-offset:1px; }
@media(max-width:680px) { .fontscale { order:4; margin-left:auto; } .fontscale button { width:42px; height:36px; } }
/* Back Toward Root B is one parent step; Tree overview remains a separate action. */
.detail-back-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.back-root-control,.back-root-choices summary { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--twig); background:#fff; color:var(--branch); font:700 12px Nunito,sans-serif; padding:2px 12px 2px 2px; min-height:39px; cursor:pointer; }
.back-root-control img,.back-root-choices img { width:34px; height:34px; }
.back-root-control:hover,.back-root-control:focus-visible,.back-root-choices summary:hover { background:#f5f0e9; border-color:var(--branch); }
.back-root-choices summary { list-style:none; }
.back-root-choices summary::-webkit-details-marker { display:none; }
.back-root-choices[open] { position:relative; }
.back-root-choices[open] .node-pill { margin:5px; }

/* なぜの道筋 — why-trace breadcrumb to bedrock */
.why-path { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; margin:6px 0 18px; padding:10px 14px; border:1px solid var(--twig); border-radius:12px; background:rgba(120,140,110,.06); font-size:12.5px; }
.why-path .why-cap { font-weight:600; color:var(--branch); margin-right:4px; }
.why-path .why-sep { color:var(--twig); margin:0 2px; }
.why-path .why-node { background:none; border:none; padding:0 2px; font:inherit; color:var(--leaf); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.why-path .why-node:hover { color:var(--branch); }
.why-path .why-cur { color:var(--branch); }
.why-path .why-hop { color:var(--twig); border:1px dashed var(--twig); border-radius:6px; padding:0 4px; margin:0 2px; font-size:10px; }
.why-path .why-bedrock { font-weight:600; padding:1px 8px; border-radius:8px; }
.why-path .why-bedrock small { display:block; font-weight:400; color:var(--branch); font-size:11px; margin-top:2px; }
.why-path .why-bedrock.formal { background:#e8ecf5; }
.why-path .why-bedrock.empirical { background:#edf3e9; }
.why-path .why-bedrock.functional { background:#f4eee4; }
/* Approved Term Density A: vein density communicates technical-term amount. */
.expl-switch { display:flex; gap:4px; align-items:center; width:max-content; max-width:100%; margin:4px 0 12px; }
.expl-btn,.expl-btn.on { position:relative; width:80px; height:55px; padding:0; border:0; background:transparent; border-radius:0; color:var(--text); cursor:pointer; }
.expl-btn img { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; }
.expl-btn .active-art { display:none; }
.expl-btn.on .inactive-art { display:none; }
.expl-btn.on .active-art { display:block; }
.expl-btn span { position:relative; z-index:1; display:block; font:700 10px Nunito,sans-serif; letter-spacing:.04em; color:var(--text); }
.expl-btn.on span { color:var(--leaf); }
.expl-btn:hover { filter:brightness(.95); }
.expl-btn:focus-visible { outline:2px solid var(--leaf); outline-offset:1px; }
/* Approved Semantic Node C vine frame. */
.semantic-candidates { display:flex; flex-wrap:wrap; gap:12px; }
.semantic-candidate { box-sizing:border-box; width:min(340px,100%); min-height:96px; padding:22px 28px 19px; background:#fff url('../assets/approved/semantic-node-frame.svg') center / 100% 100% no-repeat; display:flex; flex-direction:column; justify-content:center; gap:4px; }
.semantic-candidate b { color:var(--leaf); font-size:14px; }
.semantic-candidate span { color:var(--faint); font-size:12px; line-height:1.55; }
.rightctx .approved-status-icon { vertical-align:middle; margin-right:5px; width:22px; height:22px; }
/* WORLD-rooted progressive structure tree. One primary branch per Canonical;
   additional relation edges remain available in the principle detail. */
.structure-tree { display:grid; grid-template-columns:minmax(180px,240px) minmax(0,1fr); min-height:530px; border-top:1px solid var(--twig); }
.tree-root-picker { min-width:0; padding:18px 15px 20px 0; border-right:1px solid var(--twig); }
.tree-world { display:flex; align-items:center; gap:9px; padding:4px 6px 14px; color:var(--branch); font:700 16px Author,Georgia,serif; }
.tree-world img { width:47px; height:47px; object-fit:contain; }
.tree-world small { display:block; color:var(--quiet); font:700 10px Nunito,sans-serif; letter-spacing:.06em; }
.tree-root-search { display:block; color:var(--branch); font:700 10px Nunito,sans-serif; letter-spacing:.08em; margin:0 6px 10px; }
.tree-root-search input { display:block; box-sizing:border-box; width:100%; height:35px; margin-top:5px; padding:5px 9px; border:1px solid var(--twig); border-radius:2px; background:#fff; color:var(--text); font:400 12px Nunito,sans-serif; letter-spacing:0; }
.tree-root-search input:focus-visible { outline:2px solid var(--leaf); outline-offset:1px; }
.tree-root-list { max-height:min(62vh,600px); overflow-y:auto; border-left:1px solid var(--twig); margin-left:8px; padding-left:8px; scrollbar-color:var(--twig) transparent; }
.tree-root-list button { display:block; width:100%; padding:9px 8px; border:0; border-bottom:1px solid #e3ebe4; background:#fff; color:var(--text); text-align:left; font:600 12px Nunito,sans-serif; line-height:1.5; cursor:pointer; overflow-wrap:anywhere; }
.tree-root-list button[hidden] { display:none; }
.tree-root-no-results { color:var(--quiet); padding:12px 7px; font-size:11px; }
.tree-root-no-results[hidden] { display:none; }
.tree-root-list button:hover,.tree-root-list button:focus-visible { background:var(--leaf-pale); }
.tree-root-list button.on { color:var(--leaf); background:var(--leaf-pale); box-shadow:inset 3px 0 var(--leaf); }
.tree-lineage { min-width:0; padding:19px 16px 35px 27px; overflow-x:auto; }
.tree-lineage-cap { margin:0 0 20px; color:var(--branch); font:700 11px Nunito,sans-serif; letter-spacing:.11em; }
.tree-lineage-cap span { color:var(--leaf); padding:0 4px; }
.tree-branch { position:relative; min-width:0; }
.tree-node-line { display:flex; align-items:flex-start; gap:8px; min-width:0; }
.tree-branch-toggle,.tree-leaf-dot { flex:0 0 32px; width:32px; height:32px; margin-top:12px; }
.tree-branch-toggle { border:1px solid var(--branch); border-radius:50%; background:#fff; color:var(--branch); font-size:19px; line-height:1; cursor:pointer; }
.tree-branch-toggle:hover,.tree-branch-toggle:focus-visible { background:#f5f0e9; }
.tree-leaf-dot::before { content:''; display:block; width:8px; height:8px; margin:12px; border-radius:50%; background:var(--leaf); }
.tree-node { position:relative; display:flex; align-items:center; gap:10px; min-width:0; width:100%; padding:11px 13px; border:1px solid var(--twig); border-radius:20px 3px 20px 3px; background:#fff; color:var(--text); text-align:left; cursor:pointer; overflow:hidden; }
.tree-node::before { content:''; position:absolute; inset:0; background:var(--leaf-pale); transform:scaleX(0); transform-origin:left; }
.tree-node:hover,.tree-node:focus-visible,.tree-node.sel { border-color:var(--leaf); }
.tree-node:hover::before,.tree-node:focus-visible::before { transform:scaleX(1); opacity:.45; }
.tree-node.sel::before { transform:scaleX(1); opacity:1; }
.tree-node img { position:relative; z-index:1; flex:none; width:30px; height:30px; }
.tree-node-label { position:relative; z-index:1; display:block; min-width:0; }
.tree-node-label strong { display:block; font:600 14px Author,Georgia,serif; line-height:1.45; overflow-wrap:anywhere; }
.tree-node-label small { display:block; color:var(--branch); font:700 10px Nunito,sans-serif; margin-top:3px; }
.tree-children { display:grid; grid-template-rows:0fr; opacity:0; }
.tree-branch.open > .tree-children { grid-template-rows:1fr; opacity:1; }
.tree-children-inner { min-height:0; overflow:hidden; margin-left:16px; padding-left:22px; border-left:2px solid var(--branch); }
.tree-children-inner > .tree-branch { margin-top:12px; }
.tree-children-inner > .tree-branch::before { content:''; position:absolute; width:22px; left:-22px; top:28px; border-top:1px solid var(--branch); }
@media(max-width:760px) { .structure-tree { grid-template-columns:minmax(0,1fr); } .tree-root-picker { border-right:0; border-bottom:1px solid var(--twig); padding:10px 0; } .tree-root-list { display:flex; gap:5px; max-height:none; overflow-x:auto; overflow-y:hidden; border-left:0; margin:0; padding:0 0 8px; } .tree-root-list button { flex:0 0 150px; } .tree-lineage { padding:19px 2px 32px; } }
