:root{--ink:#17212c;--muted:#677480;--soft:#edf3f5;--brand:#2563eb;--brand2:#0ea5a4;--bg:#f7f9fc;--line:#e3eaf0;--white:#fff;--shadow:0 18px 45px rgba(27,46,74,.065)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);font:16px/1.55 Inter,system-ui,-apple-system,'Segoe UI',Arial,sans-serif;color:var(--ink)}a{color:inherit;text-decoration:none}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}.wrap{width:min(1140px,calc(100% - 40px));margin:auto}.header{background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30;backdrop-filter:blur(14px)}.headinner{height:76px;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;gap:10px;font-weight:850;font-size:24px;letter-spacing:-.9px}.brandicon{background:linear-gradient(145deg,#1a60ec,#13b8ae);border-radius:12px;width:40px;height:40px;display:grid;place-items:center;color:white;font-size:25px}.brand span:last-child{color:#137fb1}.topnav{display:flex;gap:23px;font-size:14px;color:#546474;margin-left:auto}.topnav a:hover,.footer a:hover{color:var(--brand)}.topbtn{background:#eff5ff;color:#245bc4;font-size:13px;border-radius:10px;padding:10px 16px;font-weight:700}.hero{padding:77px 0 62px;background:radial-gradient(circle at 84% 10%,#d6edfb 0,transparent 40%),linear-gradient(140deg,#f7faff,#edf5ff);border-bottom:1px solid #e5edf9}.hero-flex{display:grid;grid-template-columns:1fr .73fr;gap:55px;align-items:center}.eyebrow{color:#0c8796;background:#e5f8f7;border:1px solid #c9eeec;display:inline-block;font-size:12px;font-weight:800;letter-spacing:.5px;padding:7px 13px;border-radius:40px;text-transform:uppercase}h1{font-size:clamp(37px,5vw,59px);line-height:1.1;letter-spacing:-2.2px;margin:24px 0}h1 span{color:#2166d1}.lead{font-size:17px;line-height:1.8;color:#617180;max-width:640px}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:25px}.btn{border:0;border-radius:12px;padding:14px 20px;background:#2563eb;color:#fff;font-weight:750;display:inline-flex;gap:8px;align-items:center;justify-content:center}.btn:hover{background:#1b4fc2}.btn.secondary{background:#fff;color:#2858a2;border:1px solid #d3dfee}.btn.secondary:hover{background:#f5f9ff}.hero-panel{background:#fff;border:1px solid #d8e7f7;border-radius:24px;box-shadow:0 26px 65px #2c61a91c;padding:25px;transform:rotate(2deg)}.mocktop{display:flex;justify-content:space-between;align-items:center;color:#738092;font-size:13px}.mockdisplay{text-align:right;background:#f1f6ff;padding:24px 18px;border-radius:14px;margin:17px 0;font-size:38px;font-weight:800;letter-spacing:-1px}.mockkeys{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.mockkeys span{background:#f0f5fa;border-radius:9px;text-align:center;font-weight:700;padding:11px}.mockkeys span:nth-last-child(1){background:#2665e9;color:#fff}.section{padding:71px 0}.secrow{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:29px}.secrow h2,.pageheading h1{margin:0}.section h2{font-size:35px;line-height:1.2;letter-spacing:-1px}.sub{color:var(--muted);font-size:15px;max-width:520px}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.card{background:#fff;border:1px solid var(--line);padding:27px;border-radius:18px;display:flex;flex-direction:column;box-shadow:var(--shadow);transition:transform .2s,border-color .2s;min-height:232px}.card:hover{transform:translateY(-4px);border-color:#b9d4f8}.cardicon{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:#e8f1ff;color:#2563eb;font-size:25px;font-weight:800;margin-bottom:17px}.card:nth-child(2) .cardicon,.card:nth-child(5) .cardicon{background:#e1f9f3;color:#059b8f}.card:nth-child(3) .cardicon,.card:nth-child(6) .cardicon{background:#fff0e0;color:#bd752a}.card h3{margin:0 0 7px;font-size:20px}.card p{margin:0 0 13px;color:var(--muted);font-size:14px}.card .more{margin-top:auto;color:#2563eb;font-size:14px;font-weight:750}.strip{background:#102a49;color:#fff;border-radius:20px;padding:28px 35px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:22px}.strip b{display:block;font-size:17px;margin-bottom:5px}.strip small{color:#b4c8dd;font-size:13px}.footer{background:#102037;color:#c0cad9;padding:38px 0;margin-top:60px;font-size:13px}.footergrid{display:flex;justify-content:space-between;gap:30px;flex-wrap:wrap}.footer a{color:#d8e5f3}.footer p{max-width:570px;margin:8px 0 0}.linklist{display:flex;gap:17px;flex-wrap:wrap}.page-main{padding:40px 0 20px}.crumb{font-size:13px;color:#82909e;margin-bottom:17px}.crumb a{color:#2862bf}.pageheading h1{font-size:clamp(34px,4.2vw,48px);letter-spacing:-1.6px}.pageheading p{color:var(--muted);margin:15px 0 27px;max-width:840px}.toolgrid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:22px;align-items:start}.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:27px;box-shadow:var(--shadow)}.panel h2{font-size:21px;letter-spacing:-.3px;margin:0 0 18px}.fieldgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field label{font-size:13px;color:#526376;font-weight:700}.field input,.field select{width:100%;padding:12px 13px;border:1px solid #d7e2ec;border-radius:10px;background:#fafdff;color:#1a2a3d;min-height:49px}.field input:focus,.field select:focus{border-color:#80aeeb;outline:none}.result{margin-top:21px;padding:21px 22px;background:linear-gradient(135deg,#eff7ff,#e8faf6);border:1px solid #d6e9f4;border-radius:14px}.result small{font-size:13px;font-weight:700;color:#567086;display:block}.result strong{font-size:34px;letter-spacing:-1px;overflow-wrap:anywhere;display:block;color:#1353bc;line-height:1.35;margin-top:5px}.result p{font-size:13px;color:#667888;margin:7px 0 0}.toolactions{margin-top:17px;display:flex;gap:9px;flex-wrap:wrap}.toolactions button{border:1px solid #d2dfec;background:white;border-radius:9px;padding:9px 13px;color:#265a9e;font-weight:700;font-size:13px}.toolactions button:hover{background:#f0f6ff}.info-panel p,.info-panel li{color:#657382;font-size:14px;line-height:1.8}.info-panel ul{padding-left:20px}.prose{margin-top:25px}.prose h2{font-size:26px;margin:0 0 15px}.prose p,.prose li{color:#586a78;line-height:1.85}.prose ul{padding-left:20px}.note{padding:14px 18px;border-left:4px solid #0ea5a4;background:#eafaf6;color:#365f5a;margin-top:14px;font-size:13px}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:19px}.tab{border:1px solid #d8e4ed;border-radius:9px;background:#fff;color:#4e6377;padding:10px 13px;font-weight:700;font-size:13px}.tab.active{background:#2563eb;color:white;border-color:#2563eb}.calcbox{max-width:540px;margin:auto}.calcscreen{border:1px solid #dae5f1;background:#f2f7fd;border-radius:12px;padding:17px;text-align:right;margin-bottom:14px;min-height:95px}.calcprev{font-size:12px;color:#8a95a1;min-height:20px}.calcval{font-weight:780;font-size:clamp(29px,4vw,41px);letter-spacing:-1px;overflow-wrap:anywhere}.keypad{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.keypad button{min-height:58px;border-radius:11px;border:1px solid #e1e8f0;background:#f5f8fc;font-size:20px;font-weight:650;color:#273d52}.keypad button:hover{background:#e3ebf6}.keypad .op{background:#e6f0ff;color:#1b65bf}.keypad .eq{background:#2563eb;color:white;border-color:#2563eb}.keypad .eq:hover{background:#1756cd}.hist{margin-top:21px;border-top:1px solid var(--line);padding-top:15px}.histhead{display:flex;justify-content:space-between;align-items:center}.hist h3{font-size:15px;margin:0}.hist button{border:0;color:#2563eb;background:transparent;font-size:12px}.histlist{font-size:13px;color:#6c7784;max-height:170px;overflow:auto}.histentry{padding:7px 0;border-bottom:1px solid #ecf0f4;display:flex;justify-content:space-between;gap:15px}.histentry b{color:#243449}.rowgap{margin-top:18px}.hidden{display:none!important}.statlist{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}.stat{border:1px solid #e0e8f0;border-radius:12px;padding:14px;background:#fcfdff}.stat small{color:#7e8793;font-size:12px}.stat b{display:block;font-size:17px;margin-top:4px}.faint{font-size:12px;color:#83909b}.formula{font-family:ui-monospace,monospace;background:#f1f5f9;padding:2px 5px;border-radius:4px}.error{color:#b91c1c!important}.section-link{margin-top:28px}.mini-links{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.mini-links a{display:block;padding:18px;background:white;border:1px solid var(--line);border-radius:12px;font-weight:650;color:#235cbb}.disclaimer{color:#778595;font-size:12px;margin-top:20px}@media(max-width:900px){.hero-flex{grid-template-columns:1fr}.hero-panel{max-width:500px;transform:none}.cards{grid-template-columns:repeat(2,1fr)}.toolgrid{grid-template-columns:1fr}.topnav{gap:12px}.strip{grid-template-columns:1fr 1fr}}@media(max-width:630px){.wrap{width:min(100% - 28px,1140px)}.headinner{height:67px}.brand{font-size:21px}.brandicon{width:35px;height:35px}.topnav{display:none}.topbtn{margin-left:auto;font-size:12px}.hero{padding:48px 0}.hero-panel{padding:17px}.hero h1{letter-spacing:-1.8px}.section{padding:45px 0}.section h2{font-size:28px}.secrow{display:block}.cards{grid-template-columns:1fr}.card{min-height:unset}.strip{grid-template-columns:1fr;padding:25px}.panel{padding:18px}.fieldgrid{grid-template-columns:1fr}.mini-links{grid-template-columns:1fr}.keypad button{min-height:53px}.result strong{font-size:29px}.footer{margin-top:35px}}

/* Engineering calculator */
.calc-mode-switch{display:flex;gap:5px;padding:5px;border:1px solid #dce6f2;background:#f3f7fc;border-radius:14px;margin:0 0 14px}
.calc-mode-switch .mode-button{flex:1;border:0;border-radius:10px;padding:12px 10px;background:transparent;color:#526277;font-size:14px;font-weight:750;cursor:pointer}
.calc-mode-switch .mode-button.active{color:#fff;background:#2563eb;box-shadow:0 4px 12px #1b54b733}
.angle-switch{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-bottom:10px;font-size:13px;color:#526277}
.angle-switch .angle-button{background:#eff4fa;border:1px solid #dce6f2;border-radius:8px;padding:8px 10px;color:#344763;cursor:pointer;font-weight:650}
.angle-switch .angle-button.active{background:#d8e9ff;border-color:#88b8ee;color:#1b65bf}
.science-pad{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin-bottom:12px}
.science-pad button{min-height:42px;border:1px solid #dbe4f1;background:#e9f1fb;border-radius:9px;color:#174e87;font-size:13px;font-weight:700;cursor:pointer}
.science-pad button:hover{background:#cfe3fd}
.calcval{overflow-wrap:anywhere}
@media(max-width:630px){.science-pad{gap:5px}.science-pad button{font-size:12px;min-height:41px}.calc-mode-switch .mode-button{font-size:13px}}

/* Brand: Посчитай Сам */
.brand{white-space:nowrap}.brand>span:last-child{font-size:clamp(17px,2vw,24px);letter-spacing:-.8px}
@media(max-width:420px){.brand>span:last-child{font-size:17px}}


/* 1.3 visual refresh */
:root{--ink:#17243b;--muted:#667589;--bg:#f5f7fb;--line:#e0e8f1;--shadow:0 12px 36px rgba(24,46,80,.045)}
body{background:var(--bg);-webkit-font-smoothing:antialiased}
.header{border-bottom:1px solid rgba(213,224,239,.8)}.headinner{gap:18px}.brand{font-weight:850;letter-spacing:-.8px}.brandicon{border-radius:13px;box-shadow:0 8px 20px #2563eb2b}
.topnav a{transition:color .2s}.topbtn{background:#edf4ff}.theme-toggle{margin-left:2px;width:40px;height:40px;border:1px solid #dde7f3;background:#fff;color:#28415e;border-radius:12px;font-size:21px;display:grid;place-items:center;transition:transform .2s}.theme-toggle:hover{transform:translateY(-2px)}
.hero{background:radial-gradient(circle at 90% 12%,#d4e9ff 0,transparent 41%),radial-gradient(circle at 4% 85%,#e2fbf7 0,transparent 38%),linear-gradient(145deg,#fbfdff,#eef4ff);padding:85px 0 82px}
.hero-flex{grid-template-columns:1.1fr .9fr;gap:60px}.hero .lead{font-size:17px}.hero h1{font-weight:850;max-width:720px}.hero h1 span{background:linear-gradient(120deg,#2563eb,#0d9cb1);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-note{margin-top:25px;color:#7890a8;font-size:13px;font-weight:650}.btn{box-shadow:0 9px 20px #2563eb22;transition:transform .2s,background .2s}.btn:hover{transform:translateY(-2px)}.btn.secondary{box-shadow:none}
.hero-panel{transform:rotate(1deg);border-radius:26px;padding:25px;box-shadow:0 30px 90px #234e9c20}.mockdisplay{background:linear-gradient(135deg,#ecf4ff,#f6fafe);font-variant-numeric:tabular-nums}.mockkeys span{border:1px solid #e3ebf6}.mockkeys span:last-child{background:linear-gradient(135deg,#2474f5,#1359df)}
.section{padding:78px 0}.secrow{align-items:end}.catalog-search-wrap{margin-bottom:24px;max-width:520px}.catalog-search{display:block;width:100%;height:52px;padding:12px 19px;border-radius:14px;border:1px solid #dce6f2;background:#fff;box-shadow:0 8px 30px #0c31520b;color:#1c3149;outline:none}.catalog-search:focus{border-color:#6098ef;box-shadow:0 0 0 3px #2563eb18}.catalog-empty{color:var(--muted);font-size:14px;padding:14px 0}
.cards{gap:20px}.card{position:relative;overflow:hidden;min-height:246px;border-radius:19px;padding:28px;box-shadow:0 10px 35px #2c497c0a}.card:hover{box-shadow:0 20px 45px #2c497c16;transform:translateY(-5px)}.card-index{position:absolute;top:23px;right:24px;color:#bac6d5;font-size:12px;font-weight:800}.card-featured{display:block;position:absolute;top:27px;right:49px;color:#0c8193;background:#e6f7f7;border-radius:30px;padding:4px 9px;font-size:10px;font-weight:750}.cardicon{width:56px;height:56px;border-radius:16px}.card .more{font-size:13px}.card .more::after{content:'  →'}
.strip{background:linear-gradient(125deg,#122b52,#0f4c72);box-shadow:0 17px 40px #122b5220}.page-main{padding-top:46px}.pageheading h1{font-weight:850}.panel{border-radius:20px;box-shadow:0 11px 32px #1d38690a}.toolgrid{grid-template-columns:minmax(0,1.22fr) minmax(275px,.78fr)}
.calcbox{max-width:580px}.calc-mode-switch{background:#eff4fc;border-radius:15px;margin-bottom:15px}.calcscreen{background:linear-gradient(135deg,#edf4ff,#f7fbff);border-color:#d9e6f6;border-radius:16px;padding:23px 19px;min-height:115px}.calcprev{font-size:13px}.calcval{font-variant-numeric:tabular-nums;font-size:clamp(31px,4vw,43px)}
.memorybar{display:flex;align-items:center;gap:7px;margin:0 0 12px}.memorybar button{flex:1;border:1px solid #e0e8f2;background:#f3f7fc;color:#415d80;font-size:12px;font-weight:800;border-radius:9px;min-height:36px}.memorybar button:hover{background:#e5efff}.memory-indicator{font-size:10px;font-weight:800;color:#aab8c9;padding-left:3px}.memory-indicator.active{color:#2563eb}
.keypad{gap:10px}.keypad button{border-radius:12px;min-height:64px;background:#f3f7fb;border:1px solid #e0e8f1;transition:background .16s,transform .12s}.keypad button:active,.science-pad button:active{transform:scale(.96)}.keypad button:hover{background:#e6edf7}.keypad .op{background:#e8f0ff;color:#2862b7}.keypad .eq{background:linear-gradient(135deg,#3179f5,#1755d5);box-shadow:0 9px 18px #2563eb30}.calc-hint{font-size:12px;text-align:center;color:#8a98aa;margin-top:18px}.science-pad{gap:8px}.science-pad button{border-radius:10px;min-height:44px}.hist{border-top-color:#e5edf6}
.footer{background:#101f38}.field input:focus,.field select:focus{box-shadow:0 0 0 3px #2563eb19}
@media(max-width:900px){.hero-flex{grid-template-columns:1fr}.hero-panel{max-width:480px;transform:none}.toolgrid{grid-template-columns:1fr}}
@media(max-width:630px){.hero{padding:50px 0 55px}.hero h1{font-size:clamp(35px,9vw,46px)}.headinner{gap:8px}.topbtn{margin-left:auto;padding:9px}.theme-toggle{width:37px;height:37px;flex-shrink:0}.brand{font-size:18px}.brandicon{width:35px;height:35px}.brand>span:last-child{font-size:17px}.card{min-height:0}.section{padding:50px 0}.keypad button{min-height:56px}.science-pad{gap:5px}.science-pad button{font-size:12px}.memorybar{gap:4px}.memorybar button{min-height:33px;font-size:11px}}
@media(max-width:385px){.topbtn{display:none}.theme-toggle{margin-left:auto}.panel{padding:13px}.science-pad button{font-size:11px}.keypad{gap:7px}}
/* Dark theme: retains strong contrast for input and output values. */
html[data-theme="dark"]{--ink:#e6efff;--muted:#a3b2c8;--bg:#0b1424;--line:#29374b;--white:#142237;--shadow:0 12px 34px #0002;color-scheme:dark}
html[data-theme="dark"] body{background:#0b1424;color:#e6efff}
html[data-theme="dark"] .header,html[data-theme="dark"] .panel,html[data-theme="dark"] .card,html[data-theme="dark"] .hero-panel,html[data-theme="dark"] .theme-toggle{background:#142237;color:#edf3ff;border-color:#2d3b50}
html[data-theme="dark"] .topnav,html[data-theme="dark"] .card p,html[data-theme="dark"] .sub,html[data-theme="dark"] .pageheading p,html[data-theme="dark"] .prose p,html[data-theme="dark"] .info-panel p,html[data-theme="dark"] .info-panel li{color:#a7b7cb}
html[data-theme="dark"] .hero{background:radial-gradient(circle at 90% 20%,#1e3b63,transparent 47%),linear-gradient(135deg,#101d31,#0c1b2a);border-color:#243650}
html[data-theme="dark"] .hero .lead,html[data-theme="dark"] .hero-note{color:#a9b9cd}
html[data-theme="dark"] .mockdisplay,html[data-theme="dark"] .mockkeys span,html[data-theme="dark"] .calcscreen,html[data-theme="dark"] .memorybar button,html[data-theme="dark"] .keypad button,html[data-theme="dark"] .science-pad button,html[data-theme="dark"] .calc-mode-switch,html[data-theme="dark"] .angle-switch button,html[data-theme="dark"] .field input,html[data-theme="dark"] .field select,html[data-theme="dark"] .catalog-search{background:#1d2d45;color:#eaf1ff;border-color:#33445b}
html[data-theme="dark"] .keypad .op,html[data-theme="dark"] .science-pad button{background:#254063;color:#a9d6ff}
html[data-theme="dark"] .keypad .eq,html[data-theme="dark"] .calc-mode-switch .active{background:#2563eb;color:#fff}
html[data-theme="dark"] .cardicon,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .stat,html[data-theme="dark"] .result,html[data-theme="dark"] .formula{background:#1e3856;color:#c6e3ff;border-color:#354762}
html[data-theme="dark"] .result strong,html[data-theme="dark"] .stat b,html[data-theme="dark"] .calcval{color:#eaf3ff}
html[data-theme="dark"] .btn.secondary,html[data-theme="dark"] .toolactions button,html[data-theme="dark"] .mini-links a,html[data-theme="dark"] .tab{background:#1d2d45;color:#d4e5ff;border-color:#354963}
html[data-theme="dark"] .tab.active{background:#2563eb;color:#fff}
html[data-theme="dark"] .strip{background:linear-gradient(135deg,#1c365b,#124a60)}
html[data-theme="dark"] .card-featured{color:#b8f9f5;background:#1c4b50}

/* Version 1.4: unified product-grade layout */
:root{--accent:#285ce6;--accent2:#08a9a3;--soft:#eef4ff;--card-border:#e2e9f3}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.header{position:sticky;top:0;z-index:80;backdrop-filter:blur(16px);background:rgba(255,255,255,.93)}
.headinner{height:77px}.brandicon{width:43px;height:43px;display:grid;place-items:center;background:linear-gradient(135deg,#285ce6,#1e8ee7);color:#fff!important}
.brandicon svg{width:36px;height:36px}.brand>span:last-child{font-size:22px!important}
.topnav a{font-size:14px;font-weight:650}.topnav a:hover{color:#2765e8}
.hero{padding:76px 0 80px;background:radial-gradient(ellipse at 88% 19%,#dcecff,transparent 42%),radial-gradient(ellipse at 22% 93%,#e0fcf6,transparent 40%),#f8faff}
.hero .eyebrow{letter-spacing:.06em}.hero h1{font-size:clamp(39px,4.6vw,66px);letter-spacing:-.055em;line-height:1.11}
.hero-panel{border:1px solid #deebfa;transform:rotate(0deg);box-shadow:0 30px 70px #0f356528}
.hero-panel:hover{transform:translateY(-4px)}
.card{border-color:var(--card-border)}.card h3{font-size:21px}.card p{max-width:30ch}
.favorite-btn{position:absolute;top:19px;left:86px;border:1px solid #dce6f3;border-radius:11px;background:#fff;color:#687d9c;font-size:24px;line-height:1;width:36px;height:36px;display:grid;place-items:center;cursor:pointer;z-index:2}
.favorite-btn[aria-pressed="true"]{background:#fff8df;border-color:#ffdc85;color:#d59618}.favorite-btn:hover{border-color:#8fa8d7}
.catalog-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}.catalog-tabs{display:flex;gap:6px;padding:5px;border:1px solid #e2eaf4;border-radius:14px;background:#eef3fa}
.filter-btn{padding:10px 14px;border:0;background:transparent;color:#6b7c92;border-radius:10px;font-weight:700;cursor:pointer;font-size:13px}.filter-btn.active{background:#fff;color:#205dde;box-shadow:0 2px 9px #203d6113}.catalog-count{font-size:13px;color:#8290a5;font-weight:700}
.workspace-layout{display:grid;grid-template-columns:234px minmax(0,1fr);gap:26px;align-items:start}
.workspace-content{min-width:0}.workspace-content .toolgrid{grid-template-columns:minmax(0,1.23fr) minmax(255px,.77fr);gap:19px}
.tool-sidebar{position:sticky;top:102px;border-radius:20px;border:1px solid var(--card-border);background:#fff;padding:14px;box-shadow:0 12px 30px #213e7110;display:flex;flex-direction:column;gap:4px}
.sidebar-title{font-size:11px;font-weight:850;letter-spacing:.12em;color:#9aabc0;padding:12px 13px 10px}
.sidebar-link{display:flex;align-items:center;gap:12px;border-radius:12px;padding:10px 12px;color:#536680;text-decoration:none;font-size:13px;font-weight:700;min-height:46px;transition:background .16s,color .16s}
.sidebar-link:hover{background:#eef4ff;color:#215ee5}.sidebar-link.selected{background:#eaf1ff;color:#1e5bd9}
.sidebar-icon{width:27px;height:27px;display:grid;place-items:center;border:1px solid #e3eaf4;border-radius:8px;background:#f7faff;font-size:17px;font-weight:750;color:#4e729c;flex-shrink:0}.sidebar-link.selected .sidebar-icon{background:#d5e4ff;color:#215bd7;border-color:#c4d9ff}
.sidebar-tip{border-radius:13px;background:linear-gradient(135deg,#eef5ff,#e9faf8);padding:14px;display:flex;flex-direction:column;gap:5px;margin-top:12px;color:#24456d;font-size:12px}.sidebar-tip span{font-size:21px;color:#12a399}.sidebar-tip small{color:#69809a;line-height:1.45}
.pageheading{position:relative;padding-right:155px}.page-favorite{position:absolute;right:0;bottom:12px;border:1px solid #d7e4f6;border-radius:12px;background:white;color:#42648e;font-size:13px;font-weight:800;padding:10px 12px;cursor:pointer}.page-favorite[aria-pressed="true"]{background:#fff8dd;color:#9e6815;border-color:#ffdc88}
.mobile-bottom{display:none}
html[data-theme="dark"] .header{background:rgba(18,30,48,.93)}
html[data-theme="dark"] .tool-sidebar,html[data-theme="dark"] .favorite-btn,html[data-theme="dark"] .page-favorite,html[data-theme="dark"] .filter-btn.active{background:#192b43;color:#d8eaff;border-color:#334761}
html[data-theme="dark"] .sidebar-link{color:#bacce2}html[data-theme="dark"] .sidebar-link:hover,html[data-theme="dark"] .sidebar-link.selected{background:#254161;color:#e9f3ff}
html[data-theme="dark"] .sidebar-icon{background:#233953;color:#c3d9f4;border-color:#3b5170}html[data-theme="dark"] .sidebar-tip{background:#1e3a4d;color:#e4f3ff}html[data-theme="dark"] .sidebar-tip small{color:#a8c1d4}
html[data-theme="dark"] .catalog-tabs{background:#1a2a40;border-color:#354761}html[data-theme="dark"] .filter-btn{color:#aabdd1}html[data-theme="dark"] .filter-btn.active{color:#cbe4ff}
html[data-theme="dark"] .favorite-btn[aria-pressed="true"],html[data-theme="dark"] .page-favorite[aria-pressed="true"]{color:#ffd47a;border-color:#976c27;background:#45361c}
@media(max-width:1160px){.workspace-layout{grid-template-columns:194px minmax(0,1fr);gap:18px}.workspace-content .toolgrid{grid-template-columns:1fr}.tool-sidebar{padding:10px}.sidebar-link{font-size:12px;gap:8px}}
@media(max-width:900px){.workspace-layout{grid-template-columns:1fr}.tool-sidebar{position:relative;top:auto;flex-direction:row;overflow-x:auto;align-items:center;padding:8px;gap:6px;scrollbar-width:thin}.sidebar-title,.sidebar-tip{display:none}.sidebar-link{white-space:nowrap;padding:8px 12px}.workspace-content .toolgrid{grid-template-columns:1fr}.hero-panel{max-width:540px}}
@media(max-width:630px){body{padding-bottom:76px}.headinner{height:64px}.brandicon{width:37px;height:37px}.brandicon svg{width:30px;height:30px}.brand>span:last-child{font-size:18px!important}.hero{padding:49px 0 52px}.hero h1{font-size:clamp(36px,9.2vw,47px)}.pageheading{padding-right:0;padding-bottom:56px}.page-favorite{left:0;right:auto;bottom:10px}.sidebar-link{font-size:12px}.mobile-bottom{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(4,1fr);gap:3px;padding:8px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-top:1px solid #dfebf8;z-index:100;box-shadow:0 -5px 25px #1e3b6311}.mobile-bottom a{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:43px;color:#667a98;font-size:10px;font-weight:800;text-decoration:none;border-radius:10px}.mobile-bottom a span{font-size:21px;line-height:22px}.mobile-bottom a[aria-current="page"]{color:#255edb;background:#eaf1ff}.footer{margin-top:18px}.favorite-btn{top:20px;left:80px}}
@media(max-width:380px){.brand>span:last-child{font-size:16px!important}.theme-toggle{width:35px}.catalog-controls{display:block}.catalog-count{display:block;margin-top:9px}}
html[data-theme="dark"] .mobile-bottom{background:rgba(18,31,49,.97);border-color:#364760}html[data-theme="dark"] .mobile-bottom a{color:#bacce2}html[data-theme="dark"] .mobile-bottom a[aria-current="page"]{background:#263e61;color:#e4efff}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.card-shell{position:relative;min-width:0}.card-shell .card{height:100%}.card-shell .favorite-btn{left:86px;z-index:3}

/* Version 1.5 */
.newtool{display:grid;gap:18px}.newtool .fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.newtool .field{display:grid;gap:7px;min-width:0}.newtool .field input,.newtool .field select{width:100%;min-height:46px;padding:10px 12px;border:1px solid #dbe5f0;border-radius:10px;background:var(--white);color:var(--ink);font-size:16px}.newtool .facts{display:flex;flex-wrap:wrap;gap:8px}.newtool .facts p{margin:0;padding:10px 14px;border-radius:12px;background:var(--soft);font-size:13px}.newtool .result{min-width:0}.newtool .result strong{overflow-wrap:anywhere}.histentry{cursor:pointer;border-radius:8px;padding:8px}.histentry:hover,.histentry:focus-visible{background:var(--soft);outline:2px solid transparent}.toolactions{display:flex;flex-wrap:wrap;gap:8px}.science-pad{grid-template-columns:repeat(5,minmax(0,1fr))}.science-pad button{min-width:0}html[data-theme="dark"] .newtool .field input,html[data-theme="dark"] .newtool .field select{background:#1d2d45;color:#edf3ff;border-color:#33445b}html[data-theme="dark"] .newtool .facts p{background:#1d3856}@media(max-width:640px){.newtool .fields{grid-template-columns:1fr}.science-pad{gap:5px}.science-pad button{padding:9px 2px;min-height:42px;font-size:12px}.calcbox{max-width:100%}.toolactions button{font-size:12px}}

/* Horoscope sign on the age calculator */
.zodiac-card{display:flex;align-items:center;gap:16px;padding:18px;border:1px solid #cce0fb;border-radius:16px;background:linear-gradient(115deg,#edf5ff,#f3f7ff)}
.zodiac-symbol{display:grid;place-items:center;flex:0 0 64px;width:64px;height:64px;border-radius:15px;background:#e0edff;color:#245ac0;font-size:38px;line-height:1}
.zodiac-details{display:flex;flex-direction:column;gap:3px;min-width:0}.zodiac-kicker{font-size:12px;color:#63768c;font-weight:700}.zodiac-details strong{font-size:23px;line-height:1.2;color:#173e89}.zodiac-period{font-size:13px;color:#536c88}
html[data-theme="dark"] .zodiac-card{border-color:#345078;background:linear-gradient(115deg,#1a3150,#202e51)}html[data-theme="dark"] .zodiac-symbol{background:#314c78;color:#bcd7ff}html[data-theme="dark"] .zodiac-details strong{color:#e0eaff}html[data-theme="dark"] .zodiac-kicker,html[data-theme="dark"] .zodiac-period{color:#b4c8e5}
@media(max-width:420px){.zodiac-symbol{width:54px;height:54px;flex-basis:54px;font-size:31px}.zodiac-card{gap:12px;padding:13px}.zodiac-details strong{font-size:21px}}

/* Version 1.6: unified catalog, calculator fields and result responsiveness */
.cards>.card-shell{min-width:0;display:flex}.cards>.card-shell>.card{width:100%;min-height:245px}.card-shell .favorite-btn{top:18px;left:85px}.card .more{margin-top:auto}.newtool textarea{width:100%;font:inherit;min-height:124px;padding:13px 14px;background:var(--white);color:var(--ink);border:1px solid #dbe5f0;border-radius:12px;resize:vertical}.newtool textarea:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}.proportion-label{text-align:center;font-weight:800;letter-spacing:.08em;font-size:26px;color:var(--brand);margin:0 0 4px}.result strong{font-variant-numeric:tabular-nums}.newtool input:disabled{background:#edf3fa;color:#8da0b8;cursor:not-allowed}html[data-theme="dark"] .newtool textarea{background:#1d2d45;color:#edf3ff;border-color:#33445b}html[data-theme="dark"] .newtool input:disabled{background:#142237;color:#647995}html[data-theme="dark"] .card-shell{color:#eaf2ff}@media(max-width:900px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:630px){.cards{grid-template-columns:minmax(0,1fr)}.cards>.card-shell>.card{min-height:225px}.newtool .fields{grid-template-columns:minmax(0,1fr)}.tool-sidebar{max-height:95px}.pageheading h1{overflow-wrap:anywhere}}

/* v1.7 layout, mobile and accessibility fixes */
.card-shell.hidden{display:none!important}
.card-shell:focus-within{outline:2px solid var(--brand);outline-offset:3px;border-radius:16px}
.skip-link{position:absolute;left:12px;top:-100px;z-index:1000;padding:12px 18px;background:#fff;color:#174fbd;border-radius:10px;box-shadow:0 5px 20px #122c5933}.skip-link:focus{top:12px}
.faq-block{margin-top:22px;border:1px solid #dfe8f4;border-radius:18px;background:var(--white);padding:24px}
.faq-block h2{font-size:23px;margin:0 0 14px}.faq-block details{border-top:1px solid #e6edf7;padding:15px 0}.faq-block details:first-of-type{border-top:0}.faq-block summary{cursor:pointer;font-size:15px;font-weight:750;line-height:1.45;color:var(--ink)}.faq-block p{font-size:14px;line-height:1.7;color:var(--muted);margin:9px 0 0}.faq-block .example{background:var(--soft);border-radius:12px;padding:13px 16px;margin:0 0 16px;font-size:14px;line-height:1.6;color:var(--ink)}
@media(max-width:630px){.faq-block{padding:17px}.faq-block h2{font-size:20px}.keypad button{min-height:50px}.workspace-content{min-width:0}.page-main{overflow-x:clip}.tool-sidebar{overscroll-behavior-x:contain}.toolactions button{min-height:42px}}
html[data-theme="dark"] .faq-block{background:#1b2b42;border-color:#344760}html[data-theme="dark"] .faq-block details{border-color:#344760}html[data-theme="dark"] .faq-block .example{background:#233a55}html[data-theme="dark"] .faq-block summary{color:#eef4ff}

/* v1.7.1: never reserve grid tracks for filtered-out favorites/search results */
#catalog > .card-shell[hidden], #catalog > .card-shell.hidden {display:none!important}
#catalog > .card-shell:not([hidden]) {min-width:0}

/* v1.7.2 audit: layout and interaction safety */
#catalog{align-items:stretch}
#catalog .card-shell[hidden]{display:none!important}
#catalog .card-shell .card{min-width:0;overflow-wrap:anywhere}
#catalog .card-shell .favorite-btn{z-index:4}
#catalog .card-shell .card:focus-visible{outline-offset:4px}
.result,#mainResult,#calcvalue{overflow-wrap:anywhere;word-break:break-word}
input,select,textarea{max-width:100%}
@media(max-width:630px){.catalog-count{margin-top:8px}.card-shell .favorite-btn{left:82px}.cards{gap:13px}.result strong{font-size:clamp(21px,5.4vw,32px)}}


/* v1.8 — mobile usability, reachable controls and readable calculators */
:root{--mobile-bar-height:76px}
html{scroll-padding-top:95px}
@media(max-width:630px){
  :root{--mobile-bar-height:calc(70px + env(safe-area-inset-bottom, 0px))}
  html{scroll-padding-top:78px;scroll-padding-bottom:var(--mobile-bar-height)}
  body{padding-bottom:calc(var(--mobile-bar-height) + 22px)}
  .mobile-bottom{
    min-height:var(--mobile-bar-height);
    box-sizing:border-box;
    padding:6px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .mobile-bottom a{min-height:48px;font-size:11px;line-height:1.18;touch-action:manipulation}
  .mobile-bottom a span{font-size:20px;line-height:23px}
  .page-main,.section{scroll-margin-bottom:var(--mobile-bar-height)}
  .calc-mode-switch{min-width:0;overflow-x:auto;flex-wrap:nowrap;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-snap-type:x proximity}
  .calc-mode-switch .mode-button{min-width:120px;flex:1 0 auto;scroll-snap-align:start;white-space:nowrap;min-height:44px}
  .angle-switch{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;gap:6px;padding-bottom:4px;scrollbar-width:thin}
  .angle-switch .angle-button{flex:0 0 auto;min-height:44px;white-space:nowrap}
  .tabs{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding-bottom:8px;scroll-snap-type:x proximity}
  .tabs .tab{flex:0 0 auto;white-space:nowrap;min-height:44px;scroll-snap-align:start}
  .science-pad{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
  .science-pad button{min-width:0;min-height:44px;overflow-wrap:normal;padding:5px 1px;font-size:clamp(10px,2.8vw,12px)}
  .toolactions button,.keypad button,.memorybar button,.filter-btn{touch-action:manipulation}
  .keypad button{min-height:52px}
  .memorybar{flex-wrap:wrap}
  .memorybar button{min-width:39px;min-height:40px}
  .workspace-content .panel,.workspace-content .faq-block{min-width:0}
  .prose .prose-more>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;min-height:46px;color:var(--brand);font-weight:750;font-size:15px;list-style:none}
  .prose .prose-more>summary::-webkit-details-marker{display:none}
  .prose .prose-more>summary::after{content:'⌄';font-size:22px;line-height:1;transition:transform .15s}
  .prose .prose-more[open]>summary::after{transform:rotate(180deg)}
  .prose .prose-more>div{padding-top:12px}
  .prose{padding:16px 18px}
  .info-panel{padding:16px 18px}
  .faq-block summary{min-height:44px;display:list-item;padding-top:9px;padding-bottom:9px}
  .page-main{overflow-x:clip}
  .footer{margin-bottom:0}
  [id]{scroll-margin-top:80px}
}
@media(min-width:631px){
  .prose .prose-more>summary{display:none}
  .prose .prose-more>div{display:block!important}
}
@media(max-width:345px){
  .panel{padding:12px}
  .science-pad{gap:3px}
  .science-pad button{font-size:10px;min-height:43px}
  .mobile-bottom a{font-size:10px}
  .brand>span:last-child{font-size:15px!important}
}

/* Informational pages v1.9 */
.static-main{min-height:62vh}.static-hero{max-width:840px;margin:0 auto 24px}.static-hero h1{font-size:clamp(32px,5vw,52px);line-height:1.12;letter-spacing:-.04em;margin:14px 0}.static-hero p{color:var(--muted);font-size:17px}.static-content{max-width:840px;margin:auto;padding:30px 36px;background:var(--white);border:1px solid var(--line);border-radius:20px;box-shadow:0 9px 40px #12345b0b}.static-content h2{font-size:clamp(20px,2.7vw,25px);line-height:1.3;margin:30px 0 10px}.static-content h2:first-child{margin-top:0}.static-content p{font-size:16px;line-height:1.8;margin:12px 0}.static-content a{color:var(--brand);overflow-wrap:anywhere}.static-content .info-lead{font-size:18px;font-weight:500}.static-content .muted-note{background:var(--soft);padding:12px 16px;border-radius:12px;font-size:14px}.contact-card{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:20px;border:1px solid var(--line);background:var(--soft);border-radius:15px}.contact-card h2{margin:4px 0!important;font-size:clamp(18px,4vw,25px)}.contact-card p{margin:0}.contact-card .mini-heading{font-size:12px;color:var(--muted);font-weight:800}.static-footer-link{max-width:840px;margin:20px auto}.footer .linklist{display:flex;flex-direction:column;gap:8px}.footer .linklist a{overflow-wrap:anywhere}@media(max-width:630px){.static-content{padding:22px 18px;border-radius:14px}.static-content p{font-size:15px}.static-main .section{padding-top:30px}.contact-card{padding:16px}}html[data-theme="dark"] .static-content{background:#182940;border-color:#32465e;color:#eaf2ff}html[data-theme="dark"] .static-hero p{color:#a9bfd5}html[data-theme="dark"] .contact-card,html[data-theme="dark"] .static-content .muted-note{background:#213650;border-color:#32465e}
/* v1.9.2: настройки и уведомление об аналитических cookie */
.footer-cookie-link{border:0;background:transparent;color:inherit;padding:0;text-align:left;cursor:pointer;font:inherit;text-decoration:underline;text-underline-offset:3px}
.footer-cookie-link:hover{color:var(--brand)}
.cookie-consent[hidden]{display:none!important}
.cookie-consent{position:fixed;left:16px;right:16px;bottom:16px;z-index:9999;max-width:1020px;margin:auto;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 54px rgba(20,35,60,.26);padding:18px}
.cookie-consent-inner{display:flex;gap:18px;align-items:center;justify-content:space-between}
.cookie-consent-copy{min-width:0;max-width:720px}
.cookie-consent-copy strong{display:block;font-size:17px}
.cookie-consent-copy p{font-size:14px;line-height:1.5;margin:5px 0;color:var(--muted)}
.cookie-consent-copy a{color:var(--brand);text-decoration:underline;text-underline-offset:2px}
.cookie-status{display:block;font-size:12px;color:var(--muted)}
.cookie-consent-actions{display:flex;gap:8px;flex-shrink:0}
.cookie-consent-actions button{border-radius:10px;padding:11px 17px;border:1px solid var(--line);background:var(--soft);color:var(--ink);font-weight:700;min-height:44px}
.cookie-consent-actions .cookie-accept{background:var(--brand);border-color:var(--brand);color:#fff}
.cookie-consent-actions button:focus-visible,.footer-cookie-link:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
@media(max-width:680px){.cookie-consent{bottom:calc(74px + env(safe-area-inset-bottom,0px));left:10px;right:10px;padding:14px;max-height:calc(100dvh - 95px);overflow:auto}.cookie-consent-inner{flex-direction:column;align-items:stretch;gap:12px}.cookie-consent-actions{width:100%}.cookie-consent-actions button{flex:1;padding:11px 8px}.cookie-consent-copy p{font-size:13px}}

/* 1.9.4: WCAG AA brand contrast fix (PageSpeed Lighthouse). */
html:not([data-theme="dark"]) .brand > span:last-child,
html:not([data-theme="dark"]) .brand > span:last-child span { color: #075f86; }
html[data-theme="dark"] .brand > span:last-child,
html[data-theme="dark"] .brand > span:last-child span { color: #b7e4ff; }

/* v2.0: accessible visible contact CTA in every state and theme */
.static-content .contact-card a.btn,
.static-content .contact-card a.btn:link,
.static-content .contact-card a.btn:visited,
html[data-theme="dark"] .static-content .contact-card a.btn {
  display:inline-flex;align-items:center;justify-content:center;
  background:#245fe5;color:#fff!important;-webkit-text-fill-color:#fff;
  font-weight:800;min-height:48px;line-height:1.35;white-space:normal;text-align:center;
  text-decoration:none;visibility:visible;opacity:1;
}
.static-content .contact-card a.btn:hover,
html[data-theme="dark"] .static-content .contact-card a.btn:hover { background:#1747b9;color:#fff!important;-webkit-text-fill-color:#fff; }
.static-content .contact-card a.btn:focus-visible{outline:3px solid #ffd35a;outline-offset:3px}
@media(max-width:630px){.contact-card>div{min-width:0;max-width:100%}.static-content .contact-card a.btn{width:100%;padding:13px 16px}.contact-card h2{overflow-wrap:anywhere}}
/* v2.0: helpful examples and related calculator links */
.seo-guidance{margin:22px 0 0;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--white)}
.seo-guidance h2{font-size:clamp(20px,3vw,26px);margin:0 0 12px}.seo-guidance h3{font-size:17px;margin:17px 0 5px}
.seo-guidance p,.seo-guidance li{line-height:1.7;color:var(--muted);font-size:15px}.seo-guidance ul{padding-left:22px}
.seo-guidance a{color:var(--brand);text-decoration:underline;text-underline-offset:3px;font-weight:650}
.seo-guidance a:hover{text-decoration-thickness:2px}
html[data-theme="dark"] .seo-guidance{background:#182940;border-color:#32465e}html[data-theme="dark"] .seo-guidance p,html[data-theme="dark"] .seo-guidance li{color:#c0d0e3}

/* 2.2.0: retain white contact text on all mobile themes */
.static-content .contact-card a.contact-email-action,.static-content .contact-card a.contact-email-action:visited,.static-content .contact-card a.contact-email-action .contact-email-label{color:#fff!important;-webkit-text-fill-color:#fff!important}
@media(max-width:630px){.static-content .contact-card a.contact-email-action{width:100%;min-height:48px}}


/* v2.2.1: WCAG AA contrast fixes from PageSpeed Insights, light theme.
   All small text below is >= 4.5:1 on its actual solid background.
   The dark theme retains its own existing palette. */
html:not([data-theme="dark"]) .brand span:last-child { color:#075f86; }
html:not([data-theme="dark"]) .eyebrow { color:#056777; }
html:not([data-theme="dark"]) .mocktop { color:#566579; }
html:not([data-theme="dark"]) .catalog-count { color:#53647a; }
html:not([data-theme="dark"]) .card-index { color:#53647a; }
html:not([data-theme="dark"]) .card-featured { color:#075d70; }
html:not([data-theme="dark"]) .filter-btn:not(.active) { color:#4b5c72; }
html:not([data-theme="dark"]) .sub { color:#526174; }
html:not([data-theme="dark"]) .hero .lead { color:#576778; }
/* Visible text in promotional mock-up is still readable even though decorative. */
html:not([data-theme="dark"]) .hero-panel .mocktop { color:#566579; }
