/* ANE Brand v2 round 4: the existing calculators in the approved light look (white ground, ink text, Adam & Eve green
   for action only, Heebo). Token skin only, like calc-skin.css (D2): no calculator logic, prices, endpoints, validation
   or markup is touched. Loaded after calc-skin.css on round-4 service pages that embed a calculator.
   Contrast (WCAG AA): #FFFFFF on #0D5C45 7.7:1 · #1B1D1C on #F4F5F4 15.6:1 · #4E5552 on #FFFFFF 7.6:1 · #6B726F on #FFFFFF 4.9:1. */

/* PCB / assembly wizard and part search (ANE PCB Engine, .aec) */
html body.ae2-r4.ae2-sp:not(#_) .aec{
  --aec-accent:#0D5C45; --aec-accent-ink:#094633; --aec-accent-2:#0D5C45;
  --aec-tint:#EEF4F1; --aec-tint-2:#DCE9E3;
  --aec-ink:#1B1D1C; --aec-ink-2:#4E5552; --aec-muted:#6B726F;
  --aec-line:#E2E5E3; --aec-line-2:#ECEEEC; --aec-bg:#FFFFFF; --aec-bg-2:#F4F5F4;
  --aec-r:10px; --aec-r-sm:8px; --aec-r-lg:14px;
  --aec-shadow:0 0 0 1px #E2E5E3;
  --k-frame:#F4F5F4; --k-frame-2:#ECEEEC; --k-frame-3:#E2E5E3; --k-frame-ink:#1B1D1C; --k-frame-mute:#4E5552;
  --k-acc:#0D5C45; --k-acc-h:#094633; --k-acc-br:#0D5C45; --k-acc-dk:#0D5C45; --k-lime:#0D5C45;
  --k-line-3:#D3D9D5;
  font-family:var(--b-font);
}

/* 3D printing, CNC and BOM calculators (ANE Calc Kit) */
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom){
  --k-frame:#F4F5F4; --k-frame-2:#ECEEEC; --k-frame-3:#E2E5E3; --k-frame-ink:#1B1D1C; --k-frame-mute:#4E5552;
  --k-bg:#FFFFFF; --k-surface:#FFFFFF; --k-surface-2:#F4F5F4;
  --k-line:#E2E5E3; --k-line-2:#ECEEEC; --k-line-3:#D3D9D5;
  --k-ink:#1B1D1C; --k-ink-2:#4E5552; --k-mute:#6B726F;
  --k-acc:#0D5C45; --k-acc-h:#094633; --k-acc-br:#0D5C45; --k-acc-dk:#0D5C45; --k-lime:#0D5C45;
  --k-tint:#EEF4F1; --k-tint-2:#DCE9E3;
  --k-r-lg:14px; --k-r:10px; --k-r-sm:8px;
  --k-sh-1:none; --k-sh-2:none;
  font-family:var(--b-font);
}

/* Mechanical catalogue (ANE PCB Engine [ane_mech_shop]) */
html body.ae2-r4.ae2-sp:not(#_) .ane-mc{
  --mc-accent:#0D5C45; --mc-ink:#1B1D1C; --mc-text:#1B1D1C; --mc-muted:#6B726F; --mc-line:#E2E5E3; --mc-r:14px;
  --k-frame:#F4F5F4; --k-frame-ink:#1B1D1C; --k-frame-mute:#4E5552; --k-acc-dk:#0D5C45;
}

/* the wrapper card is the round-4 box itself: no second frame inside it */
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ane-embed{--line:#E2E5E3;--radius-lg:14px;border:0;box-shadow:none;padding:0;background:transparent}
html body.ae2-r4.ae2-sp:not(#_) .aec :is(.aec-in,.aec-sel,.aec-ta):focus{box-shadow:0 0 0 2px #0D5C45}

/* The calculator head was drawn for a dark frame (literal white text in ANE Calc Kit kit.css). On the light frame the
   same elements take the ink colours. Same elements, same states; only colour. */
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-head{background-image:none;box-shadow:none;border:1px solid var(--k-frame-3);border-radius:14px}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-head::after{display:none}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-head h2{color:var(--k-frame-ink);font-weight:700;letter-spacing:-.01em}
/* Calculator heads (BOM, 3D printing, CNC): ANE Calc Kit paints the title white and the shipping pill pale green
   for its dark frame. On the light round-4 frame they take the ink colours. Limited to the three kit tools; colour only. */
html body.ae2-r4.ae2-sp:not(#_) :is(#ane-bom,#ane3d,#ane-cnc3) .hd h2{color:var(--k-frame-ink)}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane-bom,#ane3d,#ane-cnc3) .hd .ship-note{background:#EEF4F1;border-color:#C9DBD2;color:#0D5C45}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-modes{background:#fff;border-color:var(--k-frame-3)}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-mode{color:var(--k-frame-mute)}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-mode:hover{color:var(--k-frame-ink);background:var(--k-frame-2)}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-mode.on{background:#0D5C45;color:#fff;box-shadow:none}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-tab.on{background:#0D5C45;border-color:#0D5C45;color:#fff}
@media (max-width:760px){html body.ae2-r4.ae2-sp:not(#_) .r4-calc__box--embed{padding:10px}}

/* Components page: the two tools (part search, BOM pricing) as tabs in the round-4 tab style. Behaviour: service.js (1.6.0), unchanged. */
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools__list{display:flex;gap:0;margin:0 0 18px;padding:0;border-bottom:1px solid #E2E5E3;overflow-x:auto;scrollbar-width:none}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools__list[hidden]{display:none}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools__list button{appearance:none;flex:0 0 auto;margin:0 0 -1px;padding:12px 18px;border:0;border-bottom:2px solid transparent;background:none;font:600 15px/1.2 var(--b-font);color:#4E5552;cursor:pointer;white-space:nowrap}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools__list button:hover{color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools__list button[aria-selected="true"]{color:#1B1D1C;border-bottom-color:#0D5C45}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools__list button:focus-visible{outline:2px solid #0D5C45;outline-offset:-2px;border-radius:6px}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-panel__h{margin:0 0 10px;font-size:18px;font-weight:700;color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-tools.is-tabbed .ae2-sp-panel__h{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html body.ae2-r4.ae2-sp:not(#_) .r4-calc .ae2-sp-panel[hidden]{display:none}

/* Live price box (PCB / assembly): on the light frame its text takes the ink colours (kit.css writes light literals for
   the dark frame). The error state keeps its red ground with white text. Colour only.
   Contrast: #1B1D1C on #F4F5F4 15.6:1 · #4E5552 on #F4F5F4 7.0:1 · #0D5C45 on #F4F5F4 7.0:1. */
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err){color:#1B1D1C;background-image:none;box-shadow:inset 0 0 0 1px #E2E5E3}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err) .k{color:#4E5552}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err) .v{color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err) .m{color:#4E5552}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err) .lk{color:#0D5C45}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err) .lk:hover{color:#094633}
html body.ae2-r4.ae2-sp:not(#_) .aec .aec-total:not(.err) .sp{border-color:rgba(13,92,69,.25);border-top-color:#0D5C45}
/* 1.10.3: Calc Kit result and bill panels sit on the light R4 frame (#F4F5F4); kit.css colours them for a dark frame. Colour only. */
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill,.result){color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill-row,.result .row){color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill,.result) :is(.sub,.bill-sub,.k),html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill-load,.bill .msg,.result .per){color:#4E5552}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill-v,.result .row .v){color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill-total span:first-child,.result .total .k){color:#1B1D1C}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill .bill-incl,.result #c3-incl,.result #c3-domwhy,.result #c3-domkg){color:#4E5552;opacity:1!important}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) :is(.bill-total,.result .divide){border-top-color:#E2E5E3}
html body.ae2-r4.ae2-sp:not(#_) :is(#ane3d,#ane-cnc3,#ane-bom) .result .divide{background:#E2E5E3}
html body.ae2-r4.ae2-sp:not(#_) #ane-cnc3 #c3-manual{color:#0D5C45!important;opacity:1!important}
html body.ae2-r4.ae2-sp:not(#_) #ane-cnc3 #c3-manual:hover{color:#094633!important}
html body.ae2-r4.ae2-sp:not(#_) #ane-cnc3 #c3-manual:focus-visible{outline:2px solid #0D5C45;outline-offset:3px}
