/*
Theme Name: TechCalc Master
Author: TechCalc
Description: قالب تقني خفيف ومخصص لإدارة مواقع TechCalc مع واجهة عامة إنجليزية ولوحة إعدادات عربية.
Version: 0.9.6
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: techcalc-master
License: GPL-2.0-or-later
*/

:root{
  --tc-primary:#2563eb;
  --tc-primary-rgb:37,99,235;
  --tc-primary-text:#fff;
  --tc-text:#111827;
  --tc-muted:#5f6b7a;
  --tc-bg:#fff;
  --tc-surface:#fff;
  --tc-surface-soft:#f7f9fc;
  --tc-border:#dfe5ec;
  --tc-success:#15803d;
  --tc-warning:#a16207;
  --tc-error:#b91c1c;
  --tc-radius-sm:6px;
  --tc-radius-md:10px;
  --tc-radius-lg:14px;
  --tc-shadow-sm:0 1px 3px rgba(15,23,42,.07);
  --tc-shadow-md:0 10px 28px rgba(15,23,42,.08);
  --tc-site:1200px;
  --tc-content:820px;
  --tc-wide:1000px;
  --tc-header-h:68px;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;direction:ltr}
body{margin:0;background:var(--tc-bg);color:var(--tc-text);font-family:var(--tc-font,"Segoe UI Variable Text","Segoe UI Variable","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif);font-size:16px;line-height:1.65;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;direction:ltr;text-align:left;font-optical-sizing:auto}
body.techcalc-ltr,body.rtl.techcalc-ltr{direction:ltr!important;text-align:left!important}
body.techcalc-ltr input,body.techcalc-ltr textarea,body.techcalc-ltr select,body.techcalc-ltr button{direction:ltr;text-align:left}
h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:750}
img,svg{max-width:100%;height:auto}
a{color:var(--tc-primary);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{opacity:.9}
button,input,select,textarea{font:inherit}
button{color:inherit}
:focus-visible{outline:3px solid rgba(var(--tc-primary-rgb),.26);outline-offset:2px}
::selection{background:rgba(var(--tc-primary-rgb),.16)}

.tc-container{width:min(calc(100% - 32px),var(--tc-site));margin-inline:auto}
.tc-content{width:min(100%,var(--tc-content));margin-inline:auto}
.tc-wide{width:min(100%,var(--tc-wide));margin-inline:auto}
.tc-main{min-height:60vh}
.tc-section{padding:64px 0}
.tc-section--soft{background:var(--tc-surface-soft)}
.tc-section__head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}
.tc-section__eyebrow{margin:0 0 8px;color:var(--tc-primary);font-size:.82rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.tc-section__title{margin:0;font-size:clamp(1.65rem,2.6vw,2.25rem);line-height:1.2;letter-spacing:-.025em}
.tc-section__desc{max-width:680px;margin:8px 0 0;color:var(--tc-muted)}
.tc-text-link{font-weight:650;text-decoration:none;white-space:nowrap}

/* Header */
.tc-site-header{position:relative;z-index:50;border-bottom:1px solid var(--tc-border);background:rgba(255,255,255,.97)}
.tc-site-header.is-sticky{position:sticky;top:0;backdrop-filter:saturate(150%) blur(10px)}
.tc-header-inner{min-height:var(--tc-header-h);display:flex;align-items:center;gap:28px}
.tc-brand{display:inline-flex;align-items:center;gap:10px;min-width:0;color:var(--tc-text);font-size:1.13rem;font-weight:800;letter-spacing:-.025em;text-decoration:none}
.tc-brand .custom-logo{display:block;width:auto;max-height:36px}
.tc-brand__mark{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--tc-primary);color:var(--tc-primary-text);font-size:.9rem;font-weight:800}
.tc-primary-nav{margin-left:auto}
.tc-primary-nav ul{display:flex;align-items:center;gap:6px;margin:0;padding:0;list-style:none}
.tc-primary-nav a{display:block;padding:8px 11px;border-radius:8px;color:#334155;font-size:.94rem;font-weight:600;text-decoration:none}
.tc-primary-nav a:hover,.tc-primary-nav .current-menu-item>a,.tc-primary-nav .current_page_item>a{background:var(--tc-surface-soft);color:var(--tc-text)}
.tc-header-actions{display:flex;align-items:center;gap:8px}
.tc-icon-button{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--tc-border);border-radius:9px;background:#fff;cursor:pointer}
.tc-icon-button:hover{border-color:#c9d3df;background:var(--tc-surface-soft)}
.tc-icon-button svg{width:19px;height:19px}
.tc-menu-toggle{display:none}

/* Search dialog */
.tc-search-dialog{position:fixed;inset:0;z-index:100;display:none;align-items:flex-start;justify-content:center;padding:10vh 16px;background:rgba(15,23,42,.52)}
.tc-search-dialog.is-open{display:flex}
.tc-search-panel{width:min(100%,700px);overflow:hidden;border:1px solid var(--tc-border);border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.22)}
.tc-search-panel__top{display:flex;align-items:center;gap:10px;padding:14px;border-bottom:1px solid var(--tc-border)}
.tc-search-panel input{width:100%;min-height:50px;padding:0 14px;border:0;outline:0;color:var(--tc-text);font-size:1rem}
.tc-search-results{max-height:55vh;overflow:auto;padding:8px}
.tc-search-result{display:flex;gap:12px;align-items:center;padding:11px 12px;border-radius:10px;color:var(--tc-text);text-decoration:none}
.tc-search-result:hover,.tc-search-result.is-active{background:var(--tc-surface-soft)}
.tc-search-result__icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:9px;background:rgba(var(--tc-primary-rgb),.09);color:var(--tc-primary);font-weight:800}
.tc-search-result__name{display:block;font-weight:700;line-height:1.35}
.tc-search-result__meta{display:block;color:var(--tc-muted);font-size:.84rem}
.tc-search-empty{padding:22px;color:var(--tc-muted);text-align:center}

/* Hero */
.tc-hero{padding:72px 0 62px;background:linear-gradient(180deg,rgba(var(--tc-primary-rgb),.055),rgba(var(--tc-primary-rgb),.01) 70%,transparent)}
.tc-hero__inner{max-width:860px;margin-inline:auto;text-align:center}
.tc-hero h1{max-width:820px;margin:0 auto;font-size:clamp(2.15rem,5vw,3.65rem);line-height:1.05;letter-spacing:-.05em}
.tc-hero__lead{max-width:720px;margin:20px auto 0;color:var(--tc-muted);font-size:clamp(1rem,2vw,1.13rem)}
.tc-hero-search{position:relative;max-width:680px;margin:30px auto 0}
.tc-hero-search input{width:100%;min-height:58px;padding:0 54px 0 18px;border:1px solid #ced8e4;border-radius:12px;background:#fff;box-shadow:var(--tc-shadow-md);color:var(--tc-text);font-size:1rem}
.tc-hero-search button{position:absolute;right:7px;top:7px;width:44px;height:44px;border:0;border-radius:9px;background:var(--tc-primary);color:var(--tc-primary-text);cursor:pointer}
.tc-hero-search__hints{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:15px}
.tc-hero-search__hints a{padding:5px 10px;border:1px solid var(--tc-border);border-radius:999px;background:#fff;color:#475569;font-size:.82rem;text-decoration:none}

/* Cards */
.tc-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.tc-tool-card,.tc-guide-card{position:relative;display:flex;min-width:0;height:100%;gap:14px;padding:20px;border:1px solid var(--tc-border);border-radius:12px;background:var(--tc-surface);box-shadow:var(--tc-shadow-sm);color:var(--tc-text);text-decoration:none;transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.tc-tool-card:hover,.tc-guide-card:hover{opacity:1;transform:translateY(-2px);border-color:rgba(var(--tc-primary-rgb),.35);box-shadow:0 8px 24px rgba(15,23,42,.08)}
.tc-card-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:10px;background:rgba(var(--tc-primary-rgb),.09);color:var(--tc-primary);font-weight:800}
.tc-card-icon svg{width:21px;height:21px}
.tc-card-body{min-width:0}
.tc-card-title{margin:0;color:var(--tc-text);font-size:1.02rem;line-height:1.35;letter-spacing:-.01em}
.tc-card-desc{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--tc-muted);font-size:.9rem;line-height:1.55;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.tc-card-meta{display:block;margin-top:9px;color:var(--tc-primary);font-size:.8rem;font-weight:700}

/* Topics */
.tc-topic-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.tc-topic{padding:24px;border:1px solid var(--tc-border);border-radius:14px;background:#fff}
.tc-topic__top{display:flex;align-items:center;gap:12px}
.tc-topic__top .tc-card-icon{width:40px;height:40px;flex-basis:40px}
.tc-topic h3{margin:0;font-size:1.1rem}
.tc-topic p{margin:8px 0 0;color:var(--tc-muted);font-size:.9rem}
.tc-topic__links{display:grid;gap:8px;margin:18px 0 0;padding:0;list-style:none}
.tc-topic__links a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-top:1px solid #edf1f5;color:#334155;font-size:.91rem;font-weight:600;text-decoration:none}
.tc-topic__links li:first-child a{border-top:0}
.tc-topic__links a::after{content:'→';color:var(--tc-primary)}

/* Trust */
.tc-trust-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.tc-trust-item{padding:22px;border:1px solid var(--tc-border);border-radius:12px;background:#fff}
.tc-trust-item strong{display:block;margin-bottom:5px;font-size:1rem}
.tc-trust-item p{margin:0;color:var(--tc-muted);font-size:.9rem}

/* Archive */
.tc-page-hero{padding:48px 0 32px;border-bottom:1px solid var(--tc-border);background:var(--tc-surface-soft)}
.tc-page-hero h1{margin:0;font-size:clamp(2rem,4vw,3rem);line-height:1.1;letter-spacing:-.04em}
.tc-page-hero p{max-width:760px;margin:14px 0 0;color:var(--tc-muted)}
.tc-directory-controls{display:flex;gap:14px;align-items:center;justify-content:space-between;margin-bottom:26px}
.tc-directory-search{position:relative;flex:1;max-width:520px}
.tc-directory-search input{width:100%;min-height:48px;padding:0 14px 0 44px;border:1px solid #cfd8e3;border-radius:10px;background:#fff}
.tc-directory-search svg{position:absolute;left:15px;top:15px;width:18px;height:18px;color:#64748b}
.tc-filter-pills{display:flex;gap:7px;flex-wrap:wrap}
.tc-filter-pill{min-height:40px;padding:0 13px;border:1px solid var(--tc-border);border-radius:999px;background:#fff;color:#475569;font-size:.85rem;font-weight:650;cursor:pointer}
.tc-filter-pill.is-active{border-color:rgba(var(--tc-primary-rgb),.28);background:rgba(var(--tc-primary-rgb),.09);color:var(--tc-primary)}
.tc-directory-group{margin-top:42px}
.tc-directory-group[hidden],.tc-tool-card[hidden]{display:none!important}
.tc-directory-group__head{margin-bottom:17px}
.tc-directory-group__head h2{margin:0;font-size:1.45rem}
.tc-directory-group__head p{margin:6px 0 0;color:var(--tc-muted);font-size:.92rem}
.tc-directory-empty{display:none;padding:34px;border:1px dashed #cbd5e1;border-radius:12px;color:var(--tc-muted);text-align:center}
.tc-directory-empty.is-visible{display:block}

/* Breadcrumb */
.tc-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 0 18px;padding:0;list-style:none;color:#64748b;font-size:.82rem}
.tc-breadcrumb a{color:#64748b;text-decoration:none}
.tc-breadcrumb__sep{opacity:.55}

/* Single tool / guide */
.tc-single-header{padding:42px 0 22px}
.tc-single-header h1{margin:0;font-size:clamp(2rem,4vw,3rem);line-height:1.08;letter-spacing:-.04em}
.tc-single-intro{max-width:760px;margin:14px 0 0;color:var(--tc-muted);font-size:1.03rem}
.tc-entry-content{color:#253041;font-size:1.02rem}
.tc-entry-content>*+*{margin-top:1.15em}
.tc-entry-content h2{margin-top:2.15em;color:var(--tc-text);font-size:clamp(1.45rem,3vw,1.85rem);line-height:1.25;letter-spacing:-.025em}
.tc-entry-content h3{margin-top:1.7em;color:var(--tc-text);font-size:1.23rem;line-height:1.3}
.tc-entry-content p,.tc-entry-content li{max-width:76ch}
.tc-entry-content ul,.tc-entry-content ol{padding-left:1.35rem}
.tc-entry-content pre{max-width:100%;overflow:auto;padding:16px;border:1px solid var(--tc-border);border-radius:10px;background:#0f172a;color:#e2e8f0;font-size:.88rem;line-height:1.55}
.tc-entry-content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}
.tc-entry-content :not(pre)>code{padding:.12em .35em;border-radius:5px;background:#eef2f7;color:#334155;font-size:.9em}
.tc-entry-content blockquote{margin-left:0;padding:10px 0 10px 18px;border-left:3px solid var(--tc-primary);color:#475569}
.tc-entry-content table{width:100%;border-collapse:collapse;font-size:.94rem}
.tc-entry-content th,.tc-entry-content td{padding:10px 12px;border:1px solid var(--tc-border);text-align:left}
.tc-entry-content th{background:var(--tc-surface-soft)}
.tc-tool-stage{width:min(100%,900px);margin:0 auto 34px}
.tc-tool-stage .tc-calculator{margin:0;max-width:none;border-color:var(--tc-border);box-shadow:0 8px 28px rgba(15,23,42,.06)}
.tc-tool-stage .tc-button--primary{background:var(--tc-primary);color:var(--tc-primary-text)}
.tc-tool-stage .tc-segmented input:checked+span{border-color:var(--tc-primary);background:rgba(var(--tc-primary-rgb),.08);color:var(--tc-primary)}
.tc-tool-stage .tc-calculator input:focus,.tc-tool-stage .tc-calculator select:focus{outline-color:var(--tc-primary);border-color:var(--tc-primary)}
.tc-tool-stage .tc-calculator{font-family:inherit}
.tc-related{margin-top:56px;padding-top:32px;border-top:1px solid var(--tc-border)}
.tc-related h2{margin:0 0 18px;font-size:1.45rem}
.tc-related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.tc-guide-callout{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:28px;padding:22px;border:1px solid rgba(var(--tc-primary-rgb),.2);border-radius:12px;background:rgba(var(--tc-primary-rgb),.045)}
.tc-guide-callout h3{margin:0 0 5px;font-size:1.05rem}
.tc-guide-callout p{margin:0;color:var(--tc-muted);font-size:.9rem}
.tc-guide-callout a{font-weight:700;white-space:nowrap;text-decoration:none}
.tc-trust-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;margin-top:30px;padding:15px 0;border-top:1px solid var(--tc-border);border-bottom:1px solid var(--tc-border);color:#64748b;font-size:.84rem}
.tc-trust-row a{font-weight:600;text-decoration:none}
.tc-guide-meta{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:13px;color:#64748b;font-size:.84rem}

/* Generic pages */
.tc-page-wrap{padding:46px 0 72px}
.tc-page-wrap h1{font-size:clamp(2rem,4vw,3rem);line-height:1.1;letter-spacing:-.04em}

/* Footer */
.tc-site-footer{margin-top:72px;border-top:1px solid var(--tc-border);background:#f8fafc}
.tc-footer-grid{display:grid;grid-template-columns:1.45fr repeat(3,1fr);gap:34px;padding:50px 0 36px}
.tc-footer-about p{max-width:360px;margin:12px 0 0;color:#64748b;font-size:.9rem}
.tc-footer-col h2{margin:0 0 13px;color:#334155;font-size:.88rem;letter-spacing:.02em}
.tc-footer-col ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.tc-footer-col a{color:#64748b;font-size:.88rem;text-decoration:none}
.tc-footer-col a:hover{color:var(--tc-text)}
.tc-footer-bottom{display:flex;justify-content:space-between;gap:20px;padding:19px 0 28px;border-top:1px solid #e2e8f0;color:#7a8797;font-size:.8rem}

/* Search / 404 */
.tc-results-list{display:grid;gap:14px;margin-top:28px}
.tc-result-card{display:block;padding:20px;border:1px solid var(--tc-border);border-radius:12px;color:var(--tc-text);text-decoration:none}
.tc-result-card:hover{border-color:rgba(var(--tc-primary-rgb),.35)}
.tc-result-card__type{color:var(--tc-primary);font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.tc-result-card h2{margin:4px 0 7px;font-size:1.15rem}
.tc-result-card p{margin:0;color:var(--tc-muted);font-size:.9rem}
.tc-empty-state{padding:55px 0;text-align:center}
.tc-empty-state__code{margin:0;color:var(--tc-primary);font-size:5rem;font-weight:900;line-height:1}
.tc-empty-state h1{margin:12px 0 8px;font-size:2rem}
.tc-empty-state p{max-width:560px;margin:0 auto;color:var(--tc-muted)}

/* Pagination */
.navigation.pagination{margin-top:36px}.nav-links{display:flex;gap:7px;flex-wrap:wrap}.page-numbers{display:grid;place-items:center;min-width:40px;height:40px;padding:0 10px;border:1px solid var(--tc-border);border-radius:8px;color:#475569;text-decoration:none}.page-numbers.current{border-color:var(--tc-primary);background:var(--tc-primary);color:var(--tc-primary-text)}

@media(max-width:960px){
  .tc-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tc-topic-grid,.tc-trust-grid{grid-template-columns:1fr}
  .tc-footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tc-directory-controls{align-items:stretch;flex-direction:column}
  .tc-directory-search{max-width:none}
}

@media(max-width:760px){
  :root{--tc-header-h:60px}
  .tc-container{width:min(calc(100% - 28px),var(--tc-site))}
  .tc-section{padding:48px 0}
  .tc-section__head{align-items:flex-start;flex-direction:column;gap:10px}
  .tc-primary-nav{display:none;position:absolute;left:14px;right:14px;top:calc(100% + 8px);padding:10px;border:1px solid var(--tc-border);border-radius:12px;background:#fff;box-shadow:var(--tc-shadow-md)}
  .tc-primary-nav.is-open{display:block}
  .tc-primary-nav ul{display:grid;gap:2px}
  .tc-primary-nav a{padding:11px 12px}
  .tc-menu-toggle{display:grid}
  .tc-header-actions{margin-left:auto}
  .tc-hero{padding:54px 0 48px}
  .tc-card-grid{grid-template-columns:1fr}
  .tc-related-grid{grid-template-columns:1fr}
  .tc-guide-callout{align-items:flex-start;flex-direction:column}
  .tc-footer-grid{grid-template-columns:1fr;gap:28px}
  .tc-footer-bottom{flex-direction:column}
}

@media(max-width:480px){
  .tc-container{width:min(calc(100% - 24px),var(--tc-site))}
  .tc-brand__mark{width:31px;height:31px}
  .tc-hero-search input{min-height:54px}
  .tc-filter-pills{flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}
  .tc-filter-pill{flex:0 0 auto}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}
}

@media print{
  .tc-site-header,.tc-site-footer,.tc-search-dialog,.tc-related,.tc-guide-callout,.tc-calculator__actions{display:none!important}
  body{background:#fff;color:#000}
  .tc-container,.tc-content,.tc-wide{width:100%;max-width:none}
  .tc-calculator{box-shadow:none!important}
  a{color:#000;text-decoration:none}
}

.screen-reader-text{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.screen-reader-text:focus{position:fixed!important;top:8px!important;left:8px!important;z-index:9999!important;width:auto!important;height:auto!important;margin:0!important;padding:10px 14px!important;clip:auto!important;background:#fff;color:#111827;border:2px solid var(--tc-primary);border-radius:8px}

/* TechCalc Core functional component styling owned by the Master Theme */
.tc-calculator{box-sizing:border-box;margin:1.5rem auto 2rem;padding:1.25rem;max-width:900px;border:1px solid var(--tc-border);border-radius:var(--tc-radius-lg);background:#fff;color:var(--tc-text);box-shadow:var(--tc-shadow-sm)}
.tc-calculator *{box-sizing:border-box}.tc-calculator__title{margin:0 0 .5rem;font-size:1.5rem;line-height:1.25}.tc-calculator__description{margin:0 0 1.25rem;color:var(--tc-muted)}.tc-calculator fieldset{border:0;padding:0;margin:0 0 1rem}.tc-calculator legend,.tc-field-group>label{display:block;margin-bottom:.45rem;font-weight:600}.tc-segmented{display:flex;gap:.5rem;flex-wrap:wrap}.tc-segmented legend{width:100%}.tc-segmented label{position:relative}.tc-segmented input{position:absolute;opacity:0;pointer-events:none}.tc-segmented span{display:block;padding:.65rem .8rem;border:1px solid var(--tc-border);border-radius:8px;cursor:pointer;background:var(--tc-surface-soft)}.tc-segmented input:checked+span{border-color:var(--tc-primary);background:rgba(var(--tc-primary-rgb),.08);color:var(--tc-primary)}.tc-segmented input:focus-visible+span{outline:2px solid var(--tc-primary);outline-offset:2px}.tc-mode-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.tc-mode-panel[hidden]{display:none}.tc-field-group{min-width:0}.tc-input-unit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem}.tc-calculator input,.tc-calculator select{min-height:46px;width:100%;padding:.65rem .75rem;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:var(--tc-text);font:inherit}.tc-calculator input:focus,.tc-calculator select:focus{outline:2px solid var(--tc-primary);outline-offset:1px;border-color:var(--tc-primary)}.tc-duration{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}.tc-duration legend{grid-column:1/-1}.tc-duration label{font-size:.9rem;color:#475569}.tc-duration input{margin-top:.35rem}.tc-calculator__actions{display:flex;gap:.65rem;margin-top:.25rem}.tc-button{min-height:44px;padding:.65rem 1rem;border-radius:8px;border:1px solid transparent;font:inherit;font-weight:600;cursor:pointer}.tc-button--primary{background:var(--tc-primary);color:var(--tc-primary-text)}.tc-button--primary:hover{filter:brightness(.93)}.tc-button--secondary{background:#fff;border-color:#cbd5e1;color:var(--tc-text)}.tc-result{margin-top:1.25rem;padding:1rem;border-radius:10px;background:var(--tc-surface-soft);border:1px solid var(--tc-border)}.tc-result__label{font-size:.875rem;color:#64748b;font-weight:600}.tc-result__primary{margin-top:.25rem;font-size:1.45rem;font-weight:700;line-height:1.3}.tc-result__secondary{margin:.75rem 0 0;padding-left:1.2rem;color:#475569}.tc-calculator__error{margin-top:1rem;padding:.75rem;border:1px solid #fecaca;border-radius:8px;background:#fef2f2;color:#991b1b}.tc-calculation-details{margin-top:1rem;padding:.8rem 1rem;border:1px solid var(--tc-border);border-radius:8px}.tc-calculation-details summary{cursor:pointer;font-weight:600}.tc-calculation-details ol{margin:.75rem 0 0;padding-left:1.25rem}.tc-calculator__note{margin:1rem 0 0;color:#64748b;font-size:.925rem;line-height:1.6}.tc-calculator--unavailable{background:#fff7ed;border-color:#fed7aa}.tc-calculator [hidden]{display:none!important}
.tc-conversion-table-wrap{margin-top:.75rem;max-width:100%;overflow-x:auto}.tc-conversion-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.tc-conversion-table th,.tc-conversion-table td{padding:.65rem .75rem;border-bottom:1px solid #e2e8f0;text-align:left;white-space:nowrap}.tc-conversion-table thead th{font-size:.875rem;color:#64748b;background:#f8fafc}.tc-conversion-table tbody th{font-weight:600;color:#334155}.tc-conversion-table tbody td{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}.tc-conversion-table tbody tr:last-child th,.tc-conversion-table tbody tr:last-child td{border-bottom:0}.tc-conversion-table__group th{padding-top:.85rem;background:#f8fafc;color:#475569;font-size:.8rem;text-transform:uppercase;letter-spacing:.035em}
.tc-field-grid{display:grid;gap:1rem;margin-bottom:1rem}.tc-field-grid--two{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-field-grid--three{grid-template-columns:repeat(3,minmax(0,1fr))}.tc-ratio-inputs{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.5rem}.tc-ratio-inputs>span{font-weight:700;color:#64748b}.tc-custom-ratio{margin-top:1rem}.tc-result__secondary li+li{margin-top:.3rem}.tc-field-group--action{display:flex;flex-direction:column;justify-content:flex-end}.tc-field-spacer{display:block;min-height:1.4rem}.tc-field-group small{display:block;margin-top:.35rem;color:#64748b;font-size:.84rem;line-height:1.45}.tc-base-results{display:grid;gap:.65rem;margin-top:1rem}.tc-base-result{padding:.75rem;border:1px solid var(--tc-border);border-radius:8px;background:#fff}.tc-base-result__label{margin-bottom:.35rem;color:#64748b;font-size:.82rem;font-weight:600}.tc-base-result__value{display:block;max-width:100%;overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;color:var(--tc-text)}.tc-calculator input[type="text"]{font-variant-numeric:tabular-nums}
@media(max-width:760px){.tc-field-grid--three{grid-template-columns:1fr}}
@media(max-width:640px){.tc-calculator{padding:1rem}.tc-mode-panel{grid-template-columns:1fr}.tc-input-unit{grid-template-columns:minmax(0,1fr) 110px}.tc-duration{grid-template-columns:1fr}.tc-calculator__actions{flex-direction:column}.tc-button{width:100%}.tc-field-grid--two{grid-template-columns:1fr}.tc-field-group--action{display:block}.tc-field-spacer{display:none}.tc-field-group--action .tc-button{margin-top:.25rem}}
body.admin-bar .tc-site-header.is-sticky{top:32px}.tc-contact-form{margin-top:28px;padding:24px;border:1px solid var(--tc-border);border-radius:14px;background:#fff;box-shadow:var(--tc-shadow-sm)}.tc-contact-form .tc-field-group{margin-bottom:16px}.tc-contact-form label{display:block;margin-bottom:6px;font-weight:650}.tc-contact-form input,.tc-contact-form select,.tc-contact-form textarea{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:var(--tc-text)}.tc-contact-form textarea{resize:vertical}.tc-contact-form input:focus,.tc-contact-form select:focus,.tc-contact-form textarea:focus{outline:2px solid var(--tc-primary);outline-offset:1px;border-color:var(--tc-primary)}.tc-contact-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.tc-contact-message{margin:20px 0;padding:12px 14px;border-radius:9px}.tc-contact-message--success{border:1px solid #bbf7d0;background:#f0fdf4;color:#166534}.tc-contact-message--error{border:1px solid #fecaca;background:#fef2f2;color:#991b1b}@media(max-width:782px){body.admin-bar .tc-site-header.is-sticky{top:46px}}
.tc-brand-logo{display:block;width:auto;max-height:36px}.tc-ad-slot{width:min(calc(100% - 32px),900px);margin:36px auto;padding:12px 0;text-align:center;clear:both}.tc-ad-slot--mobile-only{display:none}.tc-back-to-top{position:fixed;right:20px;bottom:20px;z-index:45;width:44px;height:44px;border:1px solid var(--tc-border);border-radius:var(--tc-radius-md);background:var(--tc-surface);color:var(--tc-text);box-shadow:var(--tc-shadow-sm);cursor:pointer}.tc-site-footer{background:var(--tc-footer-bg)}@media(max-width:767px){.tc-ad-slot--desktop-only{display:none}.tc-ad-slot--mobile-only{display:block}.tc-back-to-top{right:14px;bottom:14px}}
.tc-logo-mobile{display:none}@media(max-width:640px){.tc-logo-desktop{display:none}.tc-logo-mobile{display:inline-flex}.tc-logo-mobile .tc-brand-logo{max-height:32px}}

/* Public calculator topic hubs */
.tc-topic-hub__heading{display:flex;gap:20px;align-items:flex-start;max-width:900px}
.tc-topic-hub__icon{width:54px;height:54px;flex:0 0 54px;margin-top:4px}
.tc-topic-hub__intro{max-width:780px;color:var(--tc-muted);font-size:1.05rem;line-height:1.75}
.tc-topic-hub__intro p{margin:.65rem 0 0}
.tc-topic-hub .tc-entry-content,.tc-topic-hub .tc-content{max-width:820px}
.tc-category-directory{margin:32px 0 48px}
.tc-topic-mini-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.tc-topic-mini{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--tc-border);border-radius:var(--tc-radius-lg);background:var(--tc-surface);color:var(--tc-text);text-decoration:none;transition:border-color .18s ease,transform .18s ease}
.tc-topic-mini:hover{border-color:var(--tc-primary);transform:translateY(-1px)}
.tc-topic-mini>span:first-child{width:34px;height:34px;display:grid;place-items:center;color:var(--tc-primary);flex:0 0 34px}
.tc-topic-mini svg{width:24px;height:24px}
.tc-topic-mini strong{display:block}
.tc-topic-mini small{display:block;color:var(--tc-muted);margin-top:3px;font-weight:400}
.tc-topic h3 a,.tc-directory-group__head h2 a{color:inherit;text-decoration:none}
.tc-topic h3 a:hover,.tc-directory-group__head h2 a:hover{color:var(--tc-primary)}
.tc-topic__view-all{display:inline-flex;margin-top:14px}
.tc-directory-group__head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end}
@media(max-width:900px){.tc-topic-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.tc-topic-hub__heading{gap:14px}.tc-topic-hub__icon{width:46px;height:46px;flex-basis:46px}.tc-topic-mini-grid{grid-template-columns:1fr}.tc-directory-group__head{align-items:flex-start;flex-direction:column;gap:8px}}

/* Homepage product layout — v0.4.0 */
.tc-site-header{box-shadow:0 1px 0 rgba(15,23,42,.02)}
.tc-header-inner{gap:24px}.tc-primary-nav a{font-size:.9rem}.tc-header-actions{gap:7px}
.tc-hero--home{position:relative;overflow:hidden;padding:82px 0 76px;background:linear-gradient(180deg,rgba(var(--tc-primary-rgb),.075) 0%,rgba(var(--tc-primary-rgb),.025) 65%,var(--tc-bg) 100%)}
.tc-hero--home::before,.tc-hero--home::after{content:"";position:absolute;inset:auto;pointer-events:none;border:1px solid rgba(var(--tc-primary-rgb),.09);border-radius:50%}
.tc-hero--home::before{width:620px;height:620px;left:-410px;top:-365px}.tc-hero--home::after{width:520px;height:520px;right:-330px;bottom:-340px}
.tc-hero__decor{position:absolute;border-radius:18px;background:rgba(var(--tc-primary-rgb),.07);transform:rotate(14deg);pointer-events:none}.tc-hero__decor--one{width:76px;height:76px;left:8%;top:38%}.tc-hero__decor--two{width:54px;height:54px;right:10%;top:25%;transform:rotate(-11deg)}
.tc-hero__badge{display:inline-flex;align-items:center;min-height:30px;margin-bottom:16px;padding:5px 11px;border:1px solid rgba(var(--tc-primary-rgb),.16);border-radius:999px;background:rgba(255,255,255,.78);color:var(--tc-primary);font-size:.78rem;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.tc-hero--home h1{font-size:clamp(2.35rem,5.3vw,4rem);max-width:900px}.tc-hero--home .tc-hero__lead{max-width:760px;font-size:clamp(1rem,2vw,1.15rem)}
.tc-hero--home .tc-hero-search{max-width:720px}.tc-hero--home .tc-hero-search input{padding-right:124px;box-shadow:0 18px 50px rgba(15,23,42,.09)}
.tc-hero--home .tc-hero-search button{width:auto;min-width:108px;padding:0 15px;display:flex;align-items:center;justify-content:center;gap:7px}.tc-hero--home .tc-hero-search button svg{width:18px;height:18px}
.tc-hero-search__hints>span{align-self:center;color:var(--tc-muted);font-size:.8rem;font-weight:700}.tc-hero-search__hints a{box-shadow:0 1px 2px rgba(15,23,42,.04)}
.tc-card-grid--featured{grid-template-columns:repeat(3,minmax(0,1fr))}.tc-card-grid--featured .tc-tool-card{flex-direction:column;min-height:210px;padding:22px}.tc-card-grid--featured .tc-card-icon{width:48px;height:48px;flex-basis:48px}.tc-card-grid--featured .tc-card-body{display:flex;flex:1;flex-direction:column}.tc-card-grid--featured .tc-card-meta{margin-top:auto;padding-top:14px}.tc-card-grid--featured .tc-card-title{font-size:1.05rem}
.tc-topic-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.tc-topic{display:flex;flex-direction:column;padding:22px;min-height:100%;box-shadow:0 1px 2px rgba(15,23,42,.035)}.tc-topic__top{display:flex;gap:12px;align-items:flex-start}.tc-topic__top h3{margin:0;font-size:1.02rem;line-height:1.3}.tc-topic__top p{margin:7px 0 0;color:var(--tc-muted);font-size:.86rem;line-height:1.55}.tc-topic__links{margin:18px 0 0;padding:0;list-style:none}.tc-topic__links li+li{margin-top:7px}.tc-topic__links a{color:#40506a;font-size:.84rem;text-decoration:none}.tc-topic__links a:hover{color:var(--tc-primary)}.tc-topic__footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:18px;color:var(--tc-muted);font-size:.78rem}.tc-topic__view-all{margin-top:0;font-size:.82rem}.tc-topic__icon{background:rgba(var(--tc-primary-rgb),.1)}
.tc-home-directory{border-top:1px solid rgba(223,229,236,.65)}.tc-section__head--directory{align-items:center}.tc-home-directory__search{position:relative;width:min(330px,100%)}.tc-home-directory__search input{width:100%;min-height:44px;padding:0 42px 0 13px;border:1px solid var(--tc-border);border-radius:10px;background:var(--tc-surface);color:var(--tc-text)}.tc-home-directory__search svg{position:absolute;right:13px;top:50%;width:18px;height:18px;transform:translateY(-50%);color:var(--tc-muted)}
.tc-filter-row{margin:0 0 22px}.tc-home-directory__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.tc-home-directory__group{min-width:0;border:1px solid var(--tc-border);border-radius:var(--tc-radius-lg);background:var(--tc-surface);overflow:hidden}.tc-home-directory__group[hidden]{display:none!important}.tc-home-directory__group-head{display:flex;align-items:center;gap:10px;padding:15px 15px 13px;border-bottom:1px solid var(--tc-border);background:var(--tc-surface-soft)}.tc-home-directory__group-head .tc-card-icon{width:34px;height:34px;flex-basis:34px}.tc-home-directory__group-head .tc-card-icon svg{width:18px;height:18px}.tc-home-directory__group-head h3{margin:0;font-size:.93rem;line-height:1.3}.tc-home-directory__list{display:grid}.tc-home-tool-row{display:grid;grid-template-columns:28px minmax(0,1fr) 16px;align-items:center;gap:9px;padding:11px 12px;border-bottom:1px solid rgba(223,229,236,.8);color:var(--tc-text);text-decoration:none}.tc-home-tool-row:last-child{border-bottom:0}.tc-home-tool-row:hover{opacity:1;background:rgba(var(--tc-primary-rgb),.035)}.tc-home-tool-row[hidden]{display:none!important}.tc-home-tool-row__icon{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:rgba(var(--tc-primary-rgb),.08);color:var(--tc-primary)}.tc-home-tool-row__icon svg{width:15px;height:15px}.tc-home-tool-row strong{display:block;font-size:.82rem;line-height:1.3}.tc-home-tool-row small{display:block;overflow:hidden;margin-top:2px;color:var(--tc-muted);font-size:.72rem;line-height:1.3;white-space:nowrap;text-overflow:ellipsis}.tc-home-tool-row__arrow{color:#94a3b8}.tc-center-action{display:flex;justify-content:center;margin-top:24px}
.tc-card-grid--guides{grid-template-columns:repeat(4,minmax(0,1fr))}.tc-card-grid--guides .tc-guide-card{flex-direction:column;min-height:180px}.tc-card-grid--guides .tc-card-icon{width:46px;height:46px;flex-basis:46px}.tc-card-grid--guides .tc-card-body{display:flex;flex:1;flex-direction:column}.tc-card-grid--guides .tc-card-meta{margin-top:auto;padding-top:12px}
.tc-trust-grid--four{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.tc-trust-item{position:relative}.tc-trust-icon{display:grid;place-items:center;width:38px;height:38px;margin-bottom:12px;border-radius:10px;background:rgba(var(--tc-primary-rgb),.08);color:var(--tc-primary)}.tc-trust-icon svg{width:19px;height:19px}.tc-methodology-callout{display:grid;grid-template-columns:54px minmax(0,1fr);gap:18px;margin-top:22px;padding:24px;border:1px solid rgba(var(--tc-primary-rgb),.15);border-radius:var(--tc-radius-lg);background:linear-gradient(135deg,rgba(var(--tc-primary-rgb),.055),rgba(var(--tc-primary-rgb),.015))}.tc-methodology-callout__icon{display:grid;place-items:center;width:54px;height:54px;border-radius:14px;background:var(--tc-primary);color:var(--tc-primary-text)}.tc-methodology-callout__icon svg{width:26px;height:26px}.tc-methodology-callout h3{margin:0;font-size:1.1rem}.tc-methodology-callout p{max-width:760px;margin:7px 0 8px;color:var(--tc-muted)}
.tc-footer-privacy-note{display:inline-block;margin-top:5px;color:rgba(255,255,255,.58);font-size:.78rem}.tc-site-footer .tc-brand{color:#fff}.tc-site-footer a{transition:color .15s ease}
@media(max-width:1050px){.tc-topic-grid,.tc-home-directory__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-trust-grid--four{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-card-grid--guides{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.tc-primary-nav ul{gap:2px}.tc-primary-nav a{padding-inline:8px;font-size:.84rem}.tc-card-grid--featured{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-section__head--directory{align-items:flex-start;flex-direction:column}.tc-home-directory__search{width:100%;max-width:none}}
@media(max-width:640px){.tc-hero--home{padding:56px 0 48px}.tc-hero__decor{display:none}.tc-hero__badge{font-size:.69rem}.tc-hero--home h1{font-size:clamp(2rem,10vw,2.8rem);line-height:1.08}.tc-hero--home .tc-hero__lead{margin-top:15px}.tc-hero--home .tc-hero-search{margin-top:23px}.tc-hero--home .tc-hero-search input{min-height:52px;padding-right:48px;font-size:.9rem}.tc-hero--home .tc-hero-search button{right:5px;top:5px;width:42px;min-width:42px;height:42px;padding:0}.tc-hero--home .tc-hero-search button span{display:none}.tc-hero-search__hints{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.tc-hero-search__hints>span,.tc-hero-search__hints a{flex:0 0 auto}.tc-section{padding:46px 0}.tc-section__head{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:22px}.tc-section__head>.tc-text-link{font-size:.86rem}.tc-card-grid--featured,.tc-card-grid--guides,.tc-topic-grid,.tc-home-directory__grid,.tc-trust-grid--four{grid-template-columns:1fr}.tc-card-grid--featured .tc-tool-card{min-height:auto;flex-direction:row;padding:16px}.tc-card-grid--featured .tc-card-icon{width:42px;height:42px;flex-basis:42px}.tc-card-grid--featured .tc-card-meta{margin-top:8px;padding-top:0}.tc-topic{padding:18px}.tc-topic__links{display:none}.tc-topic__footer{padding-top:14px}.tc-filter-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px}.tc-home-directory__group-head{padding:13px}.tc-home-tool-row{padding:10px 11px}.tc-home-tool-row small{display:none}.tc-card-grid--guides .tc-guide-card{min-height:auto;flex-direction:row;padding:15px}.tc-card-grid--guides .tc-card-meta{margin-top:8px;padding-top:0}.tc-methodology-callout{grid-template-columns:1fr;padding:19px}.tc-methodology-callout__icon{width:44px;height:44px}.tc-footer-privacy-note{font-size:.75rem}}

/* TechCalc expansion tool controls */
.tc-calculator textarea{width:100%;min-height:110px;padding:.75rem;border:1px solid var(--tc-border);border-radius:var(--tc-radius-sm);background:var(--tc-surface);color:var(--tc-text);font:inherit;line-height:1.55;resize:vertical}.tc-calculator textarea:focus{outline:2px solid var(--tc-primary);outline-offset:1px;border-color:var(--tc-primary)}.tc-output-field{display:block;margin-top:1rem}.tc-output-field textarea,.tc-code-output{margin-top:.45rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace}.tc-code-output{overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.tc-color-preview{width:100%;height:64px;margin-bottom:.9rem;border:1px solid var(--tc-border);border-radius:var(--tc-radius-md)}

.tc-gradient-preview{width:100%;height:120px;margin:1rem 0;border:1px solid var(--tc-border);border-radius:var(--tc-radius-md);background:#eef2ff}
