/* =========================================================
   EVERFITLY — shared stylesheet
   Palette: forest #16302B, coral #FF6B4A, sand #D8CFC0, cream #FBF8F3, gold #C9A227
   Display: "Bricolage Grotesque" | Body: "Inter" | Data/Mono: "JetBrains Mono"
   ========================================================= */

:root{
  --ink:        #16302B;
  --ink-soft:   #3C5650;
  --coral:      #FF6B4A;
  --coral-dark: #E5532F;
  --sand:       #D8CFC0;
  --sand-light: #EFE9DD;
  --cream:      #FBF8F3;
  --gold:       #C9A227;
  --white:      #FFFFFF;
  --line:       #E2DACB;
  --radius:     14px;
  --shadow:     0 4px 18px rgba(22,48,43,0.08);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html, body{
  overflow-x:hidden;
  max-width:100%;
}
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:'Inter',-apple-system,Segoe UI,sans-serif;
  font-size:16px;
  line-height:1.55;
}

h1,h2,h3,h4{
  font-family:'Bricolage Grotesque','Inter',sans-serif;
  color:var(--ink);
  margin:0 0 .5em;
  font-weight:700;
  letter-spacing:-0.01em;
}

a{color:var(--coral-dark); text-decoration:none;}
a:hover{text-decoration:underline;}

.mono{font-family:'JetBrains Mono',monospace;}

/* ---------- Skip link / focus ---------- */
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--ink); color:var(--white);
  padding:.6em 1em; z-index:200; border-radius:0 0 8px 0;
}
.skip-link:focus{left:0;}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible{
  outline:3px solid var(--gold); outline-offset:2px;
}

/* ---------- Top bar ---------- */
.topbar{
  background:var(--ink); color:var(--sand-light);
  font-size:13px;
}
.topbar-inner{
  max-width:1180px; margin:0 auto; padding:6px 20px;
  display:flex; justify-content:space-between; gap:12px;
}
.topbar a{color:var(--sand-light); opacity:.85;}
.topbar a:hover{opacity:1;}

/* ---------- Header ---------- */
.site-header{
  background:var(--cream);
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:100;
}
.header-inner{
  max-width:1180px; margin:0 auto; padding:16px 20px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.logo{
  display:flex; align-items:center; gap:10px; min-width:0;
  font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:22px; color:var(--ink);
}
.logo:hover{text-decoration:none;}
.logo .mark{
  width:34px; height:34px; border-radius:9px; background:var(--coral);
  display:flex; align-items:center; justify-content:center; color:var(--white);
  font-size:18px; font-weight:800; flex:none;
}
.logo .sub{color:var(--coral-dark);}

.site-search{
  flex:1; min-width:0; max-width:380px; display:flex; align-items:center;
  border:1.5px solid var(--line); border-radius:999px; background:var(--white);
  padding:8px 16px;
}
.site-search input{
  border:none; outline:none; flex:1; min-width:0; font-family:inherit; font-size:14px; background:transparent;
}
.site-search button{
  border:none; background:none; cursor:pointer; color:var(--ink-soft); font-size:16px; padding:0 0 0 8px;
}

/* ---------- Category nav (calculator.net-style top nav) ---------- */
.cat-nav{
  background:var(--ink); color:var(--cream);
}
.cat-nav-inner{
  max-width:1180px; margin:0 auto; padding:0 20px;
  display:flex; gap:4px; overflow-x:auto;
}
.cat-nav a{
  color:var(--cream); opacity:.82; padding:11px 16px; font-size:14px; font-weight:600;
  white-space:nowrap; border-bottom:3px solid transparent; display:inline-block;
}
.cat-nav a:hover, .cat-nav a.active{
  opacity:1; text-decoration:none; border-bottom-color:var(--coral);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb{
  max-width:1180px; margin:0 auto; padding:14px 20px 0; font-size:13px; color:var(--ink-soft);
}
.breadcrumb a{color:var(--ink-soft);}

/* ---------- Layout shell ---------- */
.shell{
  max-width:1180px; margin:0 auto; padding:20px;
  display:grid; grid-template-columns:240px 1fr; gap:32px;
}
.shell.no-sidebar{grid-template-columns:1fr;}
@media (max-width:860px){
  .shell{grid-template-columns:1fr;}
}

/* ---------- Sidebar ---------- */
.sidebar{font-size:14px;}
.sidebar h3{
  font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--coral-dark);
  margin-bottom:10px; padding-bottom:8px; border-bottom:2px solid var(--line);
}
.sidebar ul{list-style:none; margin:0 0 24px; padding:0;}
.sidebar li{margin-bottom:2px;}
.sidebar a{
  display:block; padding:7px 10px; border-radius:8px; color:var(--ink-soft);
}
.sidebar a:hover{background:var(--sand-light); color:var(--ink); text-decoration:none;}
.sidebar a.active{background:var(--coral); color:var(--white); font-weight:600;}

/* ---------- Hero (homepage) ---------- */
.hero{
  background:linear-gradient(135deg,var(--ink) 0%,#1F4239 100%);
  color:var(--cream); padding:64px 20px 80px; text-align:center;
}
.hero h1{
  color:var(--white); font-size:clamp(32px,5vw,52px); max-width:720px; margin:0 auto .4em;
}
.hero p{color:var(--sand-light); max-width:560px; margin:0 auto 28px; font-size:17px;}
.hero .site-search{
  max-width:480px; margin:0 auto; background:var(--white); border-color:transparent;
  box-shadow:var(--shadow);
}

/* ---------- Category grid (homepage) ---------- */
.cat-grid{
  max-width:1180px; margin:-44px auto 0; padding:0 20px 60px;
  display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:20px;
}
.cat-card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  padding:24px; box-shadow:var(--shadow); transition:transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover{transform:translateY(-3px); box-shadow:0 10px 26px rgba(22,48,43,.14);}
.cat-card .icon{
  width:44px; height:44px; border-radius:10px; background:var(--sand-light);
  display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:14px;
}
.cat-card h3{font-size:18px; margin-bottom:8px;}
.cat-card p{font-size:14px; color:var(--ink-soft); margin-bottom:14px;}
.cat-card a.more{font-weight:600; font-size:13px;}

/* ---------- Tool list section (category pages) ---------- */
.tool-section{margin-bottom:34px;}
.tool-section h2{
  font-size:20px; border-bottom:2px solid var(--line); padding-bottom:10px; margin-bottom:14px;
}
.tool-list{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; list-style:none; padding:0; margin:0;
}
.tool-list li{
  background:var(--white); border:1px solid var(--line); border-radius:10px;
}
.tool-list a{
  display:block; padding:12px 14px; font-size:14px; font-weight:600; color:var(--ink);
}
.tool-list a:hover{background:var(--sand-light); text-decoration:none; border-radius:10px;}
.tool-list a .desc{display:block; font-weight:400; font-size:12.5px; color:var(--ink-soft); margin-top:2px;}

/* ---------- Calculator page ---------- */
.calc-title{margin-bottom:6px;}
.calc-intro{color:var(--ink-soft); margin-bottom:24px; max-width:680px;}

.calc-card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius);
  padding:28px; box-shadow:var(--shadow); max-width:680px; margin-bottom:28px;
}
.unit-toggle{
  display:inline-flex; background:var(--sand-light); border-radius:999px; padding:4px; margin-bottom:20px;
}
.unit-toggle button{
  border:none; background:none; padding:7px 18px; border-radius:999px; font-weight:600; font-size:13px;
  cursor:pointer; color:var(--ink-soft); font-family:inherit;
}
.unit-toggle button.active{background:var(--coral); color:var(--white);}

.field-row{display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px;}
.field{display:flex; flex-direction:column; gap:6px;}
.field.full{grid-column:1 / -1;}
.field label{font-size:13px; font-weight:700; color:var(--ink);}
.field .hint{font-size:11.5px; color:var(--ink-soft); font-weight:400;}
.field input[type=number],
.field input[type=text],
.field select{
  border:1.5px solid var(--line); border-radius:9px; padding:10px 12px; font-size:15px;
  font-family:inherit; background:var(--cream); color:var(--ink);
}
.field input:focus, .field select:focus{border-color:var(--coral); background:var(--white);}
.inline-unit{display:flex; gap:8px;}
.inline-unit input{flex:1; min-width:0;}
.inline-unit select{width:84px; flex:none;}

.radio-row{display:flex; gap:18px; align-items:center;}
.radio-row label{display:flex; align-items:center; gap:6px; font-size:14px; font-weight:600; cursor:pointer;}

.btn{
  border:none; border-radius:10px; padding:12px 26px; font-weight:700; font-size:15px;
  cursor:pointer; font-family:inherit;
}
.btn-primary{background:var(--coral); color:var(--white);}
.btn-primary:hover{background:var(--coral-dark);}
.btn-ghost{background:var(--sand-light); color:var(--ink); margin-left:10px;}
.btn-ghost:hover{background:var(--sand);}

/* ---------- Result scoreboard (signature element) ---------- */
.result{
  display:none; margin-top:22px; border-top:2px dashed var(--line); padding-top:22px;
}
.result.show{display:block;}
.result-tiles{display:flex; flex-wrap:wrap; gap:14px; margin-bottom:18px;}
.tile{
  background:var(--ink); color:var(--cream); border-radius:12px; padding:16px 22px; min-width:140px; flex:1;
}
.tile .label{font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--sand); margin-bottom:6px;}
.tile .value{font-family:'JetBrains Mono',monospace; font-size:28px; font-weight:700; color:var(--white);}
.tile.accent{background:var(--coral);}
.tile.accent .label{color:#FFE0D6;}

.category-bar{
  height:10px; border-radius:999px; background:var(--sand-light); position:relative; overflow:hidden; margin:10px 0 8px;
}
.category-bar .fill{position:absolute; top:0; bottom:0; left:0; border-radius:999px; background:var(--coral);}
.category-bar .marker{
  position:absolute; top:-4px; width:3px; height:18px; background:var(--ink); border-radius:2px;
}
.category-labels{display:flex; justify-content:space-between; font-size:11px; color:var(--ink-soft); margin-bottom:18px;}

.result-note{font-size:13.5px; color:var(--ink-soft); line-height:1.6;}

/* ---------- Article / info block ---------- */
.info-block{max-width:680px; font-size:15px; color:var(--ink-soft);}
.info-block h2{font-size:19px; color:var(--ink); margin-top:28px;}
.info-block table{width:100%; border-collapse:collapse; margin:14px 0; font-size:14px;}
.info-block th, .info-block td{border:1px solid var(--line); padding:8px 10px; text-align:left;}
.info-block th{background:var(--sand-light);}

/* ---------- Blog ---------- */
.blog-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:20px;}
.blog-card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
}
.blog-card .tag{
  display:inline-block; background:var(--sand-light); color:var(--coral-dark); font-size:11px; font-weight:700;
  padding:3px 10px; border-radius:999px; margin:16px 0 8px 16px; text-transform:uppercase; letter-spacing:.04em;
}
.blog-card h3{padding:0 16px; font-size:17px;}
.blog-card p{padding:0 16px; font-size:14px; color:var(--ink-soft);}
.blog-card .read-more{display:block; padding:12px 16px 18px; font-weight:700; font-size:13px;}

article.post{max-width:720px;}
article.post .meta{color:var(--ink-soft); font-size:13px; margin-bottom:24px;}
article.post h2{margin-top:32px;}
article.post p{margin-bottom:16px;}

/* ---------- Footer ---------- */
.site-footer{
  background:var(--ink); color:var(--sand-light); margin-top:50px; padding:40px 20px 20px;
}
.footer-inner{max-width:1180px; margin:0 auto;}
.footer-cols{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:24px; margin-bottom:28px;}
.footer-cols h4{color:var(--white); font-size:13px; text-transform:uppercase; letter-spacing:.05em; margin-bottom:12px;}
.footer-cols ul{list-style:none; margin:0; padding:0;}
.footer-cols li{margin-bottom:7px;}
.footer-cols a{color:var(--sand-light); font-size:13.5px; opacity:.85;}
.footer-cols a:hover{opacity:1;}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.12); padding-top:16px; font-size:12.5px; color:var(--sand);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;
}

@media (max-width:600px){
  .field-row{grid-template-columns:1fr;}
  .topbar-inner{font-size:11px;}
}
