/* PCBCALC_FIGTREE_FONT_ONLY_V1: ONLY the font family was changed. */
@font-face{font-family:"Figtree";src:url("./fonts/figtree-latin-wght-normal.woff2") format("woff2");font-style:normal;font-weight:300 900;font-display:swap}
@font-face{font-family:"Figtree";src:url("./fonts/figtree-latin-wght-italic.woff2") format("woff2");font-style:italic;font-weight:300 900;font-display:swap}
/* PCBCalc.my v10.1 — ONE shared shell; no page-specific shell markup.
   Load after each page's content CSS. All shell sizes declared here; no !important needed. */
:root {
 --shell-sidebar-width:258px;
 --shell-sidebar-bg:#eef1ee;
 --shell-sidebar-border:#e4e9e2;
 --shell-brand-ink:#21352c;
 --shell-header-bg:#fcfcfb;
 --shell-ink:#24352c;
 --shell-nav-muted:#536159;
 --shell-nav-active:#e2e7e1;
 --shell-control-border:#e0e6de;
}
*,*::before,*::after{box-sizing:border-box}
html{font-size:14px;line-height:1.5;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;font-family:"Figtree","Segoe UI",Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.5}
button,input,textarea,select{font-family:inherit}
body .frame{width:100%;max-width:none;padding:0;margin:0;height:100dvh;min-height:0}
body .shell{width:100%;height:100dvh;min-height:0;display:grid;grid-template-columns:var(--shell-sidebar-width) minmax(0,1fr);overflow:hidden;border:0;border-radius:0;box-shadow:none;background:var(--page,#fcfcfb)}
/* Shared sidebar: same DOM on all routes. */
body .shell > .site-sidebar{display:flex;flex-direction:column;gap:0;min-height:0;height:100dvh;overflow-y:auto;overflow-x:hidden;padding:24px 17px 22px;background:var(--shell-sidebar-bg);border-right:1px solid var(--shell-sidebar-border);scrollbar-width:none}
.site-sidebar::-webkit-scrollbar{display:none}
body .site-sidebar .brand-row{height:42px;min-height:42px;display:flex;align-items:center;justify-content:space-between}
body .site-sidebar .brand{min-width:0;display:flex;align-items:center;gap:11px;margin:0;padding:0;white-space:nowrap;text-decoration:none;color:var(--shell-brand-ink);font-family:inherit;font-size:20px;font-weight:500;letter-spacing:-.8px;line-height:1.5}
body .site-sidebar .brandmark,body .mobile-brand .brandmark{display:grid;grid-template-columns:repeat(2,9px);grid-template-rows:repeat(2,9px);gap:3px;margin:0 0 0 4px;transform:rotate(-7deg);flex:none}
body .site-sidebar .brandmark b,body .mobile-brand .brandmark b{background:#34483b;border-radius:2px}
body .site-sidebar .brandmark b:nth-child(2),body .mobile-brand .brandmark b:nth-child(2){opacity:.5}
body .site-sidebar .brandmark b:nth-child(3),body .mobile-brand .brandmark b:nth-child(3){opacity:.67}
body .site-sidebar .brandmark b:nth-child(4),body .mobile-brand .brandmark b:nth-child(4){opacity:1}
body .site-sidebar .navs{display:grid;align-content:start;gap:4px;margin:42px 0 0;padding:0;width:100%}
body .site-sidebar .nav{display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:9px 10px;margin:0;background:transparent;border:0;border-radius:9px;text-align:left;text-decoration:none;font-family:inherit;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:0;color:var(--shell-nav-muted);filter:none;transition:background .15s ease}
body .site-sidebar .nav.active{background:var(--shell-nav-active);font-weight:400;color:#1e2d29}
body .site-sidebar .nav:hover{background:#e5ebe4}
body .site-sidebar .nav-icon-wrap{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;overflow:visible}
body .site-sidebar .nav-icon-wrap .ui-icon{width:20px;height:20px;flex:none;color:inherit}
body .site-sidebar .nav-icon-wrap .nav-robot{width:27px;height:32px;object-fit:contain;image-rendering:pixelated;margin:0;animation:mascot-idle 3.5s ease-in-out infinite}
body .site-sidebar .sidebar-bottom,body .site-sidebar .sidebar-foot{margin-top:auto;padding:18px 10px 0;color:#8b9894;font-size:11px;font-weight:400;line-height:1.5}
body .site-sidebar .sidebar-rule{height:1px;min-height:1px;background:#e2e5e3;margin:22px 4px 14px}
body .site-sidebar .new-chat{width:100%;min-height:46px;display:flex;align-items:center;gap:12px;padding:9px 10px;margin:0;background:transparent;border:0;border-radius:9px;color:#42535a;font-size:14px;font-weight:400;text-align:left}
body .site-sidebar .new-chat .ui-icon{width:21px;height:21px;flex:none}
body .site-sidebar .history-heading{margin:35px 10px 14px;letter-spacing:1.1px;font-size:10px;color:#88969a;font-weight:500}
body .site-sidebar .session-item{display:flex;align-items:center;gap:12px;padding:11px 10px;color:#44555b;font-size:12px;min-height:41px}
body .site-sidebar .session-item .ui-icon{width:15px;height:15px;flex:none}
body .site-sidebar .session-item span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
/* Unified header: consistent 70px height, same controls, same typography. */
body .shell > main{min-width:0}
body .shell > main > .top{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:18px;height:70px;min-height:70px;padding:0 28px;border-bottom:1px solid #e8ebe6;background:var(--shell-header-bg);position:relative;z-index:5}
body .shell > main:not(.assistant-main){height:100dvh;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:none;padding:0 24px 24px}
body .shell > main:not(.assistant-main)::-webkit-scrollbar{display:none}
body .shell > main:not(.assistant-main) > .top{position:sticky;top:0;z-index:20;margin:0 -24px 20px}
body .shell > main.assistant-main{height:100dvh;min-height:0;max-height:100dvh;overflow:hidden;padding:0;background:var(--paper,#fff);display:flex;flex-direction:column}
body .shell > main.assistant-main > .top{flex:none;margin:0}
body .shell .top-title{font-size:14px;font-family:inherit;font-weight:400;line-height:1.5;letter-spacing:0;color:#34474d}
body .shell .top-right{display:flex;align-items:center;gap:10px;flex:none}
body .shell .pill{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:40px;margin:0;padding:9px 13px;background:#fff;border:1px solid var(--shell-control-border);border-radius:11px;color:#3b5050;font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;cursor:pointer;filter:none}
body .shell .pill.alt{background:#f7f8f6;min-width:105px}
body .shell .pill.theme{width:40px;height:40px;padding:8px}
body .shell .pill .chevron{width:14px;height:14px}
body .shell .pill .sun-icon,body .shell .pill .moon-icon{width:20px;height:20px}
body .shell .pill .moon-icon{display:none}
body .shell .ui-icon{display:inline-block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
body .mobile-brand,body .mobile-nav-close,body .mobile-menu-button,body .mobile-overlay{display:none}
body .language-short{display:none}
.mobile-overlay[hidden]{display:none}
body .mobile-overlay{position:fixed;inset:0;z-index:40;border:0;background:rgba(16,30,29,.52)}
body .site-sidebar .mobile-nav-close{width:34px;height:34px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--shell-brand-ink)}
body .shell .nav:focus-visible,body .shell .brand:focus-visible,body .shell .pill:focus-visible{outline:2px solid #6e9184;outline-offset:2px}
body.dark{--shell-sidebar-bg:#1d261f;--shell-sidebar-border:#374239;--shell-brand-ink:#e8efe8;--shell-header-bg:#151b17;--shell-nav-muted:#c0ccc2;--shell-nav-active:#354337;--shell-control-border:#48574a}
body.dark .shell > .site-sidebar{background:var(--shell-sidebar-bg);border-color:var(--shell-sidebar-border)}
body.dark .site-sidebar .brandmark b,body.dark .mobile-brand .brandmark b{background:#cbd8cc}
body.dark .site-sidebar .nav.active{background:var(--shell-nav-active);color:#f6f8f4}
body.dark .site-sidebar .nav:hover{background:#2b362f}
body.dark .site-sidebar .sidebar-rule{background:#35423a}
body.dark .shell > main > .top{background:var(--shell-header-bg);border-color:#39433c}
body.dark .shell .top-title{color:#d2d9d1}
body.dark .shell .pill,body.dark .shell .pill.alt{background:#1e2821;color:#e8efe8;border-color:var(--shell-control-border)}
body.dark .shell .pill .sun-icon{display:none}
body.dark .shell .pill .moon-icon{display:inline-block}
body.dark .site-sidebar .sidebar-bottom,body.dark .site-sidebar .sidebar-foot{color:#acb9b0}
@media (min-width:831px){html,body{height:100%;width:100%;overflow:hidden}body .shell .top .mobile-brand,body .shell .top .mobile-menu-button{display:none}}
@media (max-width:830px){
 html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
 body .frame{height:auto;min-height:100dvh}
 body .shell{height:auto;min-height:100dvh;display:block;overflow:visible}
 body .shell > .site-sidebar{display:none;height:auto;min-height:0;max-height:none}
 body.nav-open .shell > .site-sidebar{position:fixed;top:0;bottom:0;left:0;z-index:45;display:flex;width:min(290px,86vw);height:100dvh;overflow-y:auto;box-shadow:15px 0 40px #0002}
 body.nav-open .mobile-overlay:not([hidden]){display:block}
 body.nav-open .site-sidebar .mobile-nav-close{display:flex}
 body .shell > main:not(.assistant-main){height:auto;min-height:100dvh;overflow:visible;padding:0 14px 20px}
 body .shell > main.assistant-main{height:100dvh;min-height:100dvh;overflow:hidden}
 body .shell > main > .top,body .shell > main:not(.assistant-main) > .top{position:relative;height:64px;min-height:64px;margin:0 -14px 16px;padding:0 16px}
 body .shell > main.assistant-main > .top{margin:0;padding:0 16px}
 body .shell .top-title{display:none}
 body .shell .mobile-brand{display:flex;align-items:center;gap:9px;text-decoration:none;font-size:16px;font-weight:500;letter-spacing:-.6px;color:var(--shell-brand-ink);white-space:nowrap}
 body .shell .mobile-brand .brandmark{transform:rotate(-7deg) scale(.75);margin-right:-2px}
 body .shell .mobile-menu-button{display:inline-flex}
 body .shell .pill{min-height:38px;padding:8px 10px}
 body .shell .pill.alt{min-width:0}
 body .shell .pill.theme{width:38px;height:38px}
 body .shell .top-right{gap:7px}
 body .site-sidebar .brand-row{height:42px}
}
@media(max-width:385px){body .shell .language-short{display:inline}body .shell .pill.alt #languageLabel{display:none}body .shell .pill.alt{min-width:38px}}
@media(prefers-reduced-motion:reduce){body .site-sidebar .nav-robot{animation:none}}
/* Shared SVG sprite must not occupy layout space on any page. */
.svg-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
/* The same language layout at mobile widths on all pages, regardless of legacy rules. */
@media(max-width:830px){body .shell .pill.alt #languageLabel{display:inline}body .shell .pill.alt .language-short{display:none}}
@media(max-width:385px){body .shell .pill.alt #languageLabel{display:none}body .shell .pill.alt .language-short{display:inline}}
/* Explicit ID-level language visibility prevents legacy 450px rules producing English EN together. */
body .shell #languageShort{display:none}
body .shell #languageLabel{display:inline}
@media(max-width:385px){body .shell #languageShort{display:inline}body .shell #languageLabel{display:none}}
@media(max-width:830px){
 body .shell .top-right .pill.alt{padding:8px 10px;gap:9px;min-width:0}
 body .shell .top-right .pill.theme,body .shell .top-right .pill.mobile-menu-button{padding:8px;width:38px;height:38px}
}
@media(max-width:830px){
 body.nav-open .mobile-overlay{z-index:110}
 body.nav-open .shell > .site-sidebar{z-index:120}
}
