/* R18 · Precision surfaces. Reference rationale: REVIEW-R18.md.
   Geometry uses existing content and chart values; no illustrative product state is added. */
:root{--shape-line:#d5dfd3;--shape-faint:#e5ebe1;--shape-ink:#285a4c;--shape-stage:#f1f4ee;--shape-paper:#fff;--shape-radius:6px;--shape-lift:0 2px 3px #183f2b06,0 16px 30px -18px #183f2b30;--shape-key-lift:0 2px 5px #193c2c12,0 22px 36px -22px #193c2c40}
.diagram-icon{width:24px;height:24px;display:block;flex-shrink:0}
/* Knowledge diagram: source nodes, a single focal core, and visible junctions. */
.ontology-story{border-radius:8px;overflow:hidden;background:#f3f5ef;border-color:#d9e1d4}
.ontology-story-header{padding-top:20px;padding-bottom:20px}
.ontology-scene{min-height:532px}
.ontology-scene-visual{padding:8px 0}
.ontology-model{padding:12px 6px;background:radial-gradient(circle,#b0c0a94a .7px,transparent .9px) 0 0/18px 18px;border:0;position:relative}
.ontology-entity-pair{gap:24px;z-index:1}
.ontology-entity{min-height:88px;position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);gap:13px;text-align:left;padding:18px;background:#fff;border:1px solid #d5dfd1;border-radius:4px;box-shadow:0 2px 3px #163c2905,0 7px 16px -10px #163c2929;align-items:center}
.ontology-entity>div{display:flex;flex-direction:column;gap:6px;min-width:0}
.ontology-entity small{font-size:10px;line-height:1.5;letter-spacing:.1em;color:#7a8872}
.ontology-entity strong{font-size:15px;line-height:1.55;font-weight:500;word-break:keep-all;color:#294733}
.ontology-node-icon{color:#557762;display:grid;place-items:center;width:32px;height:36px}
.ontology-node-icon .diagram-icon{width:26px;height:26px}
.ontology-entity::after{content:'';position:absolute;width:5px;height:5px;border:1px solid #98ad93;background:#f7faf3;bottom:-4px;left:calc(50% - 3px);border-radius:50%}
.ontology-entity-pair:last-child .ontology-entity::after{bottom:auto;top:-4px}
.ontology-relation{height:80px}
.ontology-relation::before{left:calc(25% - 6px);right:calc(25% - 6px);top:0;height:50%;border-color:#b2c3a8;border-bottom:1px solid #b2c3a8;border-radius:0 0 8px 8px}
.ontology-relation::after{content:'';position:absolute;top:50%;bottom:0;left:50%;border-left:1px solid #90aa86}
.ontology-relation>span{position:absolute;right:5px;bottom:4px;max-width:45%;text-align:right;padding:0;background:#f3f5ef;color:#74816b;font-size:11px;line-height:1.5;z-index:1}
.ontology-model-core{position:relative;width:82%;margin:0 auto;padding:23px 25px;min-height:124px;border:1px solid #254f40;border-radius:6px;background:#285a4c;box-shadow:inset 0 1px #a9c6ad40,0 3px #234b3b,0 20px 32px -23px #15382565;display:grid;align-items:center;text-align:center;z-index:2}


.ontology-model-core>div{display:flex;flex-direction:column;gap:7px;min-width:0}
.ontology-model-core small{font-size:10px;line-height:1.5;letter-spacing:.09em;color:#bccfb9}
.ontology-model-core strong{font-size:23px;line-height:1.35;letter-spacing:-.02em;font-weight:500;color:#fff}
.ontology-model-core>div>span{font-size:12px;line-height:1.65;color:#d8e4d0}
.ontology-model-core+.ontology-relation::before{top:50%;border-bottom:0;border-top:1px solid #b2c3a8;border-radius:8px 8px 0 0}
.ontology-model-core+.ontology-relation::after{top:0;bottom:50%}
.ontology-model-core+.ontology-relation>span{top:4px;bottom:auto}
/* Criteria: a policy sheet and a separate professional review rail. */
.ontology-criteria{position:relative;border-radius:6px;box-shadow:var(--shape-key-lift);isolation:isolate}
.ontology-criteria::before{content:'';position:absolute;inset:7px 7px -6px -6px;background:#e9eee4;border:1px solid #d6dfcf;border-radius:6px;z-index:-1}
.ontology-panel-heading{padding:20px 24px;border-radius:6px 6px 0 0;background:#f8faf5;border-bottom-color:#dbe4d4}
.ontology-panel-heading>small{font-size:10px;border-left:1px solid #d9e2d2;padding-left:15px}
.ontology-criteria-list{background:#fff}
.ontology-criteria-list>div{grid-template-columns:32px minmax(0,1fr);gap:17px;padding:20px 0;position:relative}
.ontology-criteria-index{position:relative;padding:0;width:32px;height:34px;border:1px solid #dce5d6;background:#f6f8f2;border-radius:3px;color:#58734d;display:grid;place-items:center;z-index:1}
.ontology-criteria-index .diagram-icon{width:20px;height:20px}
.ontology-criteria-list>div:not(:last-child)::after{content:'';position:absolute;left:16px;top:54px;bottom:-20px;border-left:1px solid #d7e1ce;z-index:0}
.ontology-professional{display:flex;gap:15px;align-items:center;border-left:3px solid #c0a242;padding:18px 21px;border-radius:0 0 6px 0;background:#f9f5e9}
.ontology-review-icon{color:#9f832e;flex:0 0 26px}
.ontology-professional>div>span{font-size:12px;font-weight:500;color:#7b682c;line-height:1.5}
.ontology-professional p{font-size:12px;line-height:1.7;color:#837853;margin-top:4px}
/* The application matrix has one continuous spine and four terminal ports. */
.ontology-applications{padding:8px 0;background:transparent;border:0}
.ontology-application-root{width:90%;margin:auto;padding:20px 23px;display:flex;flex-direction:row;gap:18px;justify-content:center;border:1px solid #254f40;border-radius:6px;box-shadow:inset 0 1px #a9c6ad40,0 3px #234b3b,0 16px 24px -19px #183f2b50;text-align:center;position:relative;z-index:1}

.ontology-application-root>div{min-width:0}
.ontology-application-root span{font-size:11px;line-height:1.6;color:#c4d8c6;display:block;margin-bottom:5px}
.ontology-application-root strong{font-size:17px;line-height:1.5;font-weight:500;color:#fff}
.ontology-application-root::after{height:25px;border-color:#a1b396;z-index:0}
.ontology-application-grid{position:relative;gap:18px 36px;padding-top:26px;grid-auto-rows:1fr}
.ontology-application-grid::before{content:'';position:absolute;top:0;bottom:calc(25% - 11px);left:50%;border-left:1px solid #b2c3a8}
.ontology-application-grid>div{position:relative;display:grid;grid-template-columns:26px minmax(0,1fr);column-gap:11px;align-content:center;padding:21px 17px;min-height:127px;background:#fff;border:1px solid #d5dfd1;border-radius:4px;box-shadow:0 2px 3px #163c2905,0 7px 16px -10px #163c2929}
.ontology-application-icon{color:#628057;grid-row:1/3;padding-top:1px}
.ontology-application-icon .diagram-icon{width:23px;height:23px}
.ontology-application-grid strong{font-size:15px}
.ontology-application-grid p{grid-column:2;font-size:12px;margin-top:7px;line-height:1.65}
.ontology-application-grid>div::before{content:'';position:absolute;top:50%;width:19px;border-top:1px solid #b2c3a8;right:-19px}
.ontology-application-grid>div:nth-child(even)::before{right:auto;left:-19px}
.ontology-application-grid>div::after{content:'';position:absolute;top:calc(50% - 2px);right:-3px;width:4px;height:4px;background:#f7faf3;border:1px solid #98ad93;border-radius:50%}
.ontology-application-grid>div:nth-child(even)::after{right:auto;left:-3px}
/* Service workbenches: quiet inputs, explicit processing, raised output. */
.service-example{border-radius:8px;border-color:var(--service-line);padding:24px;background:var(--service-canvas);overflow:visible}
.example-context{border-bottom:1px solid var(--service-line);padding-bottom:17px;margin-bottom:25px}
.example-context>span{font-size:10px;color:var(--service-accent)}
.example-context>small{font-size:10px;color:#7c8772}
.example-workbench{gap:27px;align-items:center}
.source-document{padding:10px 11px;background:#ffffffd9;border:1px solid var(--service-line);border-radius:3px;margin-top:8px;box-shadow:0 2px 2px #31432103;color:#52694a}
.source-document svg{stroke:var(--service-accent);width:17px;height:20px}
.basis-process{margin-top:23px;padding-left:17px;border-color:var(--service-line)}
.basis-process li::before{width:6px;height:6px;left:-21px;border-radius:50%;border:2px solid var(--service-canvas);box-shadow:0 0 0 1px var(--service-line)}
.basis-process small{color:var(--service-accent);font-size:10px;letter-spacing:.04em}
.basis-source>small{font-size:10px;color:#79856e}
.example-result{isolation:isolate;z-index:1;border:1px solid var(--service-line);border-radius:5px;box-shadow:var(--shape-key-lift);background:#fff;padding:24px 25px}
.example-result::before{inset:6px 6px -6px -6px;border-color:var(--service-line);background:#e8eee2;border-radius:5px;z-index:-2}
.example-result::after{content:'';position:absolute;inset:0;border-radius:4px;background:#fff;z-index:-1}
.service-bookkeeping .example-result::before{background:#eee9d9}
.result-document-head{margin:-24px -25px 0;padding:18px 25px;background:#f9fbf6;border-top:2px solid var(--service-accent);border-bottom-color:var(--service-line);border-radius:5px 5px 0 0}
.service-bookkeeping .result-document-head{background:#fcfaf2}
.result-document-head>div>small{font-size:10px;color:#8e9c83}
.document-glyph{width:31px;height:33px;border:1px solid var(--service-line);border-radius:3px;background:#fff;display:grid;place-items:center;color:var(--service-accent);flex-shrink:0}
.document-glyph .diagram-icon{width:19px;height:19px}
.result-kpi>span{font-size:11px;color:#7d8c70}
.result-kpi>strong{color:var(--service-accent)}
.channel-revenue{background:#52765b;border-radius:0 2px 2px 0}
.channel-cost{background:repeating-linear-gradient(135deg,#cbd9c4 0,#cbd9c4 2px,#e6eddf 2px,#e6eddf 5px);border-radius:0 2px 2px 0}
.channel-row>div>div{height:8px}
.channel-row b{color:#758569;top:-1px}
.example-legend>span:last-child::before{background:repeating-linear-gradient(135deg,#bdd0b5 0,#bdd0b5 2px,#e6eddf 2px,#e6eddf 4px)}
.example-table-head{background:#f8faf4;padding-left:7px;padding-right:7px;border-bottom-color:var(--service-line);color:#7e8d71}
.example-table-row{padding-left:7px;padding-right:7px;color:#5f7251}
.service-bookkeeping .example-table-head{background:#faf7ec;color:#91805a}
.service-bookkeeping .example-table-row{color:#746640}
.mini-cash-chart i{border-radius:2px 2px 0 0;border-top:1px solid #c4bd9f;background:#e3decf}
.mini-cash-chart i.last{border-color:#bca044;background:#d4b54e}
/* Financial statement summaries retain document scale and explicit periods. */
.statement-summary{padding-top:14px;color:#5f563e;font-size:12px;line-height:1.6;font-variant-numeric:tabular-nums}
.statement-unit{text-align:right;font-size:10px;color:#8e8063;margin-bottom:10px}
.statement-section+.statement-section{margin-top:17px}
.statement-section h5{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0;padding-bottom:6px;border-bottom:1px solid #d9d0b8;font-family:inherit;font-size:13px;font-weight:500;color:#6f5a22}
.statement-section h5 small{font-size:10px;font-weight:400;color:#96866b;white-space:nowrap}
.statement-section dl{margin:5px 0 0}
.statement-section dl>div{display:flex;justify-content:space-between;gap:18px;padding:4px 0}
.statement-section dt,.statement-section dd{margin:0}
.statement-section dd{color:#332f24}
.statement-section dl>div:last-child{border-top:1px solid #ece7d9;margin-top:3px;padding-top:6px;font-weight:500}
.financial-comparison>div{grid-template-columns:1.3fr .8fr .8fr}
.financial-comparison>div>span:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
/* A timeline uses real stage joints, rather than disconnected markers. */
.service-process ol{gap:24px;border-top:0}
.service-process li{padding:0 12px 0 0}
.service-process li::before{top:18px;left:36px;width:calc(100% - 12px);height:1px;background:var(--service-line)}
.service-process li:last-child::before{display:none}
.service-process li>span{position:relative;width:35px;height:35px;display:grid;place-items:center;border:1px solid var(--service-line);background:#fff;border-radius:4px;box-shadow:0 2px 2px #253a1e03;color:var(--service-accent)}
.service-process h3{margin-top:20px}
/* Product UI: frame, active controls, evidence rail. */
.stocktor-stage{background:#eff3e9;border:1px solid #d9e2d1;border-bottom:0;padding:33px 33px 0;border-radius:8px 8px 0 0;overflow:hidden}
.inventory-preview{border-radius:7px;border:1px solid #c7d4c4;box-shadow:0 1px 2px #1c3a2110,0 18px 36px -23px #183a2a40;overflow:hidden;background:#fff}
.stocktor-stage .inventory-preview{box-shadow:0 1px 2px #1c3a2110,0 18px 36px -23px #183a2a40}
.preview-chrome{border-bottom-color:#d3dfcc;background:#f8faf5;box-shadow:inset 0 1px #fff}
.inventory-nav{background:#f5f8f0;border-right-color:#e0e7d8}
.inventory-nav>div{border-radius:4px}
.inventory-nav .selected{border:1px solid #d1dfc7;background:#e8efe1;box-shadow:0 1px #fff;padding-left:7px}
.inventory-preview .method{border-radius:5px;background:#eff3e9;box-shadow:inset 0 1px 2px #233b2110}
.inventory-preview .method button{border-radius:3px}
.inventory-preview .method button.active{box-shadow:0 1px 2px #24372726,inset 0 0 0 1px #d4dfcd}
.inventory-preview th{background:#f9fbf5;border-top:1px solid #e2e9da}
.inventory-preview .focused-item{background:#edf3e5}
.valuation-detail{background:#f7faf2;border-left-color:#dbe5d2;box-shadow:inset 3px 0 8px -7px #23442540}
.detail-kicker{display:flex;align-items:center;gap:8px;border-color:#dbe5d2}
.detail-kicker::before{content:'';display:block;width:9px;height:12px;border:1px solid #8da57c;border-top:3px solid #8da57c;border-radius:1px}
.movement-list{padding-left:13px;border-left:1px solid #d9e2d0;margin-left:3px}
.movement-list>div{position:relative}
.movement-list>div::before{content:'';position:absolute;left:-16px;top:6px;width:4px;height:4px;border:1px solid #9aac8e;border-radius:50%;background:#f7faf2}
.movement-list .inbound dt::before,.movement-list .outbound dt::before{display:none}
.movement-list .movement-balance{border-top:1px solid #d5e0c8;margin-left:-14px;padding:13px 0 0 14px}
.movement-list .movement-balance::before{left:-2px;top:19px;background:#6b8757;border-color:#6b8757}
.source-ui,.forecast-ui{border-radius:6px;border:1px solid #d7e0d0;background:#fff;box-shadow:var(--shape-key-lift);overflow:hidden}
.source-icon{border:1px solid #d9e3d2;border-radius:4px;background:#f4f7ef;color:#5d7950;display:grid;place-items:center;flex-shrink:0}
.source-icon .diagram-icon{width:23px;height:23px}
.source-title{border-bottom-color:#dbe5d2}
.source-state{border-radius:3px;background:#edf4e5;border:1px solid #d9e8ca}
.source-state.review{background:#faf3de;border-color:#e9dbb5}
.forecast-metrics{background:#f7f9f3;border-top:1px solid #e0e7d7;border-bottom:1px solid #e0e7d7;padding-top:19px;padding-bottom:19px}
.forecast-metrics>div+div{border-left:1px solid #dfe6d6;padding-left:19px}
.forecast-chart .chart-grid{stroke:#e5ebde}
.method-labels>span{border-radius:4px;box-shadow:inset 0 1px #fff}
/* Secondary knowledge rails follow the same edge and level hierarchy. */
.knowledge-structure{border:1px solid #d6dfcd;border-radius:6px;background:#fff;padding:0 25px;box-shadow:0 2px 2px #17392503}
.knowledge-structure>div{padding:24px 0;position:relative}
.knowledge-structure>div:not(.knowledge-destination){padding-left:22px}
.knowledge-structure>div:not(.knowledge-destination)::before{content:'';position:absolute;width:6px;height:6px;top:29px;left:0;border:1px solid #90a281;background:#f0f5e9;border-radius:2px}
.knowledge-structure .knowledge-destination{margin:0 -25px;padding:21px 25px;background:#f5f8ef;border-bottom:0;border-radius:0 0 6px 6px}
@media(max-width:1100px){
 .ontology-entity{grid-template-columns:26px minmax(0,1fr);padding:15px 12px;gap:9px}.ontology-node-icon{width:26px}.ontology-node-icon .diagram-icon{width:23px;height:23px}.ontology-entity strong{font-size:14px}
 .ontology-model-core{width:90%;padding:21px 18px;grid-template-columns:minmax(0,1fr)}.ontology-model-core strong{font-size:21px}
 .ontology-application-root{width:95%;padding:18px}.ontology-application-root strong{font-size:15px}.ontology-application-grid{gap:16px 28px}.ontology-application-grid>div{padding:17px 12px;grid-template-columns:22px minmax(0,1fr);gap:8px}.ontology-application-grid strong{font-size:14px}.ontology-application-grid>div::before{width:15px;right:-15px}.ontology-application-grid>div:nth-child(even)::before{left:-15px}
 .service-example{padding:20px}.example-workbench{gap:20px}.example-result{padding:22px 20px}.result-document-head{margin:-22px -20px 0;padding:17px 20px}.source-document{padding:9px 8px}
}
@media(max-width:900px) and (min-width:761px){.example-basis{grid-template-columns:1fr 1.6fr}.basis-process{border:0;margin:0;padding:0}.basis-process li::before{display:none}}
@media(max-width:760px){
 .ontology-story{border-radius:6px}.ontology-scene{min-height:0;padding:25px 17px;gap:28px}.ontology-scene-visual{padding:0}
 .ontology-model{padding:9px 0}.ontology-entity-pair{gap:14px}.ontology-entity{grid-template-columns:1fr;padding:14px 11px;gap:10px;min-height:113px;text-align:left;align-content:start}.ontology-node-icon{height:25px;width:24px}.ontology-node-icon .diagram-icon{width:23px;height:23px}.ontology-entity small{font-size:9px}.ontology-entity strong{font-size:13px;line-height:1.6}.ontology-entity>div{gap:5px}
 .ontology-relation{height:72px}.ontology-relation::before{left:calc(25% - 3.5px);right:calc(25% - 3.5px)}.ontology-relation>span{font-size:10px;max-width:44%;bottom:2px;right:0}.ontology-model-core+.ontology-relation>span{top:2px}
 .ontology-model-core{width:100%;padding:20px 16px;grid-template-columns:minmax(0,1fr);min-height:123px;border-radius:5px}.ontology-model-core small{font-size:9px;letter-spacing:.055em}.ontology-model-core strong{font-size:20px}.ontology-model-core>div>span{font-size:11px;line-height:1.65}
 .ontology-panel-heading{padding:17px 17px}.ontology-criteria-list{padding:0 17px}.ontology-criteria-list>div{grid-template-columns:28px minmax(0,1fr);gap:13px;padding:18px 0}.ontology-criteria-index{width:28px;height:32px}.ontology-criteria-list>div:not(:last-child)::after{left:14px;top:50px;bottom:-18px}.ontology-professional{padding:17px 14px;gap:12px}
 .ontology-applications{padding:5px 0}.ontology-application-root{width:100%;padding:19px 14px;gap:12px}.ontology-application-root strong{font-size:15px}.ontology-application-root span{font-size:10px}
 .ontology-application-grid{gap:16px 24px;padding-top:25px}.ontology-application-grid>div{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;padding:17px 12px;min-height:162px}.ontology-application-icon{margin-bottom:11px}.ontology-application-icon .diagram-icon{width:23px;height:23px}.ontology-application-grid strong{font-size:13px;line-height:1.6}.ontology-application-grid p{font-size:11px;line-height:1.7;margin-top:7px}.ontology-application-grid>div::before{width:13px;right:-13px}.ontology-application-grid>div:nth-child(even)::before{left:-13px}
 .service-example{padding:17px 16px 21px;border-radius:6px}.example-context{margin-bottom:20px;padding-bottom:14px;gap:13px}.example-context>span,.example-context>small{font-size:9px;line-height:1.6}.example-basis{gap:16px;grid-template-columns:1fr 1.25fr}.source-document{padding:9px 8px;font-size:11px;gap:7px}.source-document svg{width:14px;height:18px}.basis-source>small{font-size:9px}.basis-process{margin:0;padding-left:14px}.basis-process small{font-size:9px;letter-spacing:0}.basis-process p{font-size:11px;line-height:1.8}.basis-process li::before{left:-18px}
 .example-workbench{gap:23px}.example-result{padding:21px 18px;min-height:0}.example-result::before{inset:5px 5px -5px -5px}.result-document-head{margin:-21px -18px 0;padding:16px 18px}.result-document-head h4{font-size:15px}.result-document-head>div>small{font-size:9px}.document-glyph{width:27px;height:29px}.result-kpi>span{font-size:11px}.example-table{font-size:11px}.example-table-head{font-size:9px}.result-insight{font-size:10px}.example-chart-caption{font-size:10px}.channel-row>span{font-size:10px}
 .service-process ol{gap:25px 22px}.service-process li{border-top:0;padding:0}.service-process li::before{width:calc(100% - 14px)}.service-process li:nth-child(even)::before{display:none}.service-process li>span{width:33px;height:33px}.service-process h3{margin-top:16px}
 .source-ui .source-title{flex-direction:column;align-items:flex-start;gap:8px}.source-ui .source-title>span{text-align:left}
 .stocktor-stage{padding:16px 12px 0;border-radius:6px 6px 0 0}.inventory-preview{border-radius:5px}.valuation-detail{box-shadow:none;border-left:0}.preview-chrome{gap:12px}.forecast-metrics>div+div{padding-left:12px}
 .knowledge-structure{padding:0 20px}.knowledge-structure>div:not(.knowledge-destination){padding-left:17px}.knowledge-structure .knowledge-destination{margin:0 -20px;padding:20px}.knowledge-structure h3{font-size:19px}
}
@media(prefers-reduced-motion:no-preference){.ontology-story-tabs button,.scope-navigation button{transition:background .18s ease,border-color .18s ease,color .18s ease}.ontology-story-tabs button:hover,.scope-navigation button:hover{background:#e9efe333}}
