/* Carely free tools: frame, directory and shared tool primitives, on top of carely.css.
   Tool internals still use Tailwind (its palette is remapped in tools/_base.html), so rules that
   must beat a Tailwind utility are scoped under a frame class for specificity, never !important
   (one exception: all-caps labels inside tools are switched off). */

/* Tailwind preflight resets heading weight to inherit; restore the system weight */
.cs :is(h1,h2,h3,h4){font-weight:600}

/* ---------- tool hero ---------- */
.t-hero{padding:clamp(28px, 4vw, 56px) 0 clamp(40px, 5vw, 72px)}
.t-hero .crumbs{margin-bottom:clamp(18px, 2.4vw, 28px)}
.t-hero .crumbs [aria-current]{color:var(--ink)}
.t-hero > section{position:static;padding:0;overflow:visible}
.t-hero > section > div{max-width:var(--wrap);margin:0 auto;padding:0 var(--gutter);text-align:left}
.t-hero > section > div > div:first-child{display:none} /* the old "free tool" pill in hero overrides */
.t-hero h1{font-family:var(--display);font-weight:600;font-size:clamp(38px, 5.4vw, 68px);line-height:1.03;letter-spacing:-.02em;color:var(--pine);max-width:15em;margin:0;text-wrap:balance}
.t-hero section h1 + p{margin:22px 0 0;max-width:36em;font-size:clamp(18px, 1.6vw, 21px);line-height:1.55;color:var(--muted)}
.t-hero section p + p{display:flex;align-items:center;gap:10px;margin:18px 0 0;max-width:36em;font-size:15px;line-height:1.45;color:var(--muted)}
.t-hero section p + p::before,.t-check::before{content:"";flex:none;width:22px;height:22px;border-radius:50%;background:var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5.5 12.5 4 4L18.5 7.5' fill='none' stroke='%23123b2c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat}
.t-check{display:flex;align-items:center;gap:10px;font-size:15px;line-height:1.45;color:var(--muted)}

/* ---------- tool area ---------- */
.t-body{background:var(--mist);padding:clamp(32px, 5vw, 72px) 0 clamp(64px, 8vw, 112px)}
.t-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:clamp(28px, 3.4vw, 48px);align-items:start}
.t-main,.t-side{min-width:0}
@media (min-width:1024px) and (min-height:820px){
  .t-side-in{position:sticky;top:96px}
}

/* shared primitives the tool templates are built from */
.tool-card{background:var(--paper);border:0;border-radius:24px;padding:clamp(22px, 3vw, 36px);box-shadow:0 1px 2px rgba(18,59,44,.05), 0 14px 34px -22px rgba(18,59,44,.22)}
.tool-btn-primary,.tool-btn-secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 24px;border-radius:999px;font-weight:600;font-size:17px;line-height:1.2;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .2s, box-shadow .2s}
.tool-btn-primary{background:var(--pine);color:#fff;box-shadow:0 10px 24px -14px rgba(18,59,44,.7)}
.tool-btn-primary:hover{background:var(--pine-2)}
.tool-btn-secondary{background:#fff;color:var(--pine);box-shadow:inset 0 0 0 1.5px var(--line)}
.tool-btn-secondary:hover{box-shadow:inset 0 0 0 1.5px var(--pine)}
.tool-btn-ghost{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;font-weight:600;color:var(--muted);cursor:pointer;transition:color .2s, background-color .2s}
.tool-btn-ghost:hover{color:var(--pine);background:var(--mist)}
.tool-btn-primary:disabled,.tool-btn-secondary:disabled,.tool-btn-ghost:disabled{opacity:.45;cursor:not-allowed}
.tool-btn-primary .ph-arrow-right{display:none} /* no arrows appended to button text */

/* type inside tools: Eczar for headings and big numbers, Mukta for labels; no all-caps */
.t-main *,.t-hero *{text-transform:none !important}
.t-main :is(h2,h3){font-family:var(--display);font-weight:600;letter-spacing:-.008em;line-height:1.22}
.t-main h4,.t-main :is(h2,h3,h4)[class*="text-xs"],.t-main :is(h2,h3,h4)[class*="text-sm"]{font-family:var(--text);font-weight:700;letter-spacing:0;line-height:1.4}
.t-main :is(.text-3xl,.text-4xl,.text-5xl,.text-6xl){font-family:var(--display);font-weight:600;letter-spacing:-.015em}
.t-main .text-xs.uppercase{font-size:14px;line-height:1.4}
.t-main details > summary{cursor:pointer}
.t-main :is(input,select,textarea){min-width:0} /* lets grid and flex rows of fields shrink on phones */
/* carely.css class names that a few tools also use for their own markup */
.t-main .closing{padding:0}
.t-main .label{margin-bottom:0}

/* disclaimer */
.t-disc{display:flex;gap:14px;align-items:flex-start;background:var(--paper);border-radius:18px;padding:18px 20px;margin-bottom:24px;box-shadow:inset 0 0 0 1.5px var(--line)}
.t-disc-ic{flex:none;width:40px;height:40px;border-radius:12px;background:var(--sky);display:grid;place-items:center}
.t-disc-ic svg{width:22px;height:22px;color:var(--pine)}
.t-disc p{font-size:15px;line-height:1.55;color:var(--muted)}
.t-disc p + p{margin-top:8px}
.t-disc strong{color:var(--pine);font-weight:600}

/* sidebar */
.t-cta{background:var(--mint);border-radius:var(--r-lg);padding:28px 26px 22px;color:var(--pine)}
.t-cta-mark{width:54px;height:54px;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:inset 0 0 0 2px var(--pine), 0 0 0 6px rgba(255,255,255,.45)}
.t-cta-mark img{width:56%;height:auto}
.t-cta h2{margin-top:20px;font-size:28px;line-height:1.1}
.t-cta p{margin-top:10px;font-size:16px;line-height:1.5;color:var(--pine);opacity:.85}
.t-cta .btn{width:100%;margin-top:22px;height:52px}
.t-cta-alt{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;padding:6px;font-size:15px;font-weight:600;color:var(--pine);text-decoration:none}
.t-cta-alt svg{width:18px;height:18px;flex:none}
.t-cta-alt:hover{text-decoration:underline}
.t-box{background:var(--paper);border-radius:var(--r-lg);padding:24px 24px 12px;box-shadow:0 1px 2px rgba(18,59,44,.05)}
.t-box + .t-box,.t-cta + .t-box{margin-top:20px}
.t-box-h{font-family:var(--display);font-size:22px;line-height:1.2;color:var(--pine)}
.t-box p{margin-top:8px;font-size:16px;line-height:1.5;color:var(--muted)}
.t-box .link{display:inline-block;margin:14px 0 14px;font-size:16px}
.t-rel{list-style:none;margin:12px 0 0;padding:0}
.t-rel a{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-top:1px solid var(--line);text-decoration:none;font-size:16px;font-weight:600;line-height:1.35;color:var(--pine);transition:color .2s}
.t-rel a:hover{color:var(--leaf)}
.t-rel .chev{width:18px;height:18px;flex:none;color:var(--muted);transition:transform .25s var(--ease)}
.t-rel a:hover .chev{transform:translateX(3px)}

/* ---------- directory (/tools/) ---------- */
.ix-hero{padding:clamp(28px, 4vw, 56px) 0 clamp(48px, 6vw, 88px)}
.ix-hero-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.95fr);gap:clamp(36px, 5vw, 80px);align-items:end}
.ix-hero h1{font-size:clamp(42px, 5.6vw, 78px);line-height:1;letter-spacing:-.022em;max-width:11.5em}
.ix-hero .lede{margin-top:24px}
.ix-hero .t-check{margin-top:20px}
.ix-start{background:var(--mist);border-radius:var(--r-lg);padding:26px 26px 10px}
.ix-start h2{font-size:24px;line-height:1.2}
.ix-start .rows{margin-top:16px}
.ix-start .rows a{grid-template-columns:44px 1fr auto;gap:14px;padding:16px 2px}
.ix-start .rows a:hover{background:#fff}
.ix-start .rows b{font-size:17px}
.ix-start .rows li:last-child a{border-bottom:0}
.ix-start .ic-tile{width:44px;height:44px;border-radius:13px}
.ix-start .ic-tile svg{width:22px;height:22px}

.ix-bar{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px);border-top:1px solid var(--line);border-bottom:1px solid var(--line);transition:top .45s var(--ease)}
.nav:not(.tuck) ~ main .ix-bar{top:76px}
html:not(.js) .ix-bar{display:none}
.ix-bar-in{display:flex;align-items:center;gap:14px 20px;padding-top:14px;padding-bottom:14px}
.ix-search{position:relative;flex:0 1 320px}
.ix-search svg{position:absolute;left:16px;top:50%;width:20px;height:20px;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.ix-search .input{min-height:46px;padding:8px 16px 8px 46px;border-radius:999px;font-size:16px}
.ix-chips{display:flex;gap:8px;flex-wrap:wrap}
.ix-chip{display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 15px;border:0;border-radius:999px;background:transparent;box-shadow:inset 0 0 0 1.5px var(--line);font-size:15px;font-weight:600;color:var(--pine);cursor:pointer;white-space:nowrap;transition:background-color .2s, box-shadow .2s, color .2s}
.ix-chip span{font-size:14px;font-weight:500;color:var(--muted)}
.ix-chip:hover{box-shadow:inset 0 0 0 1.5px var(--pine)}
.ix-chip[aria-pressed="true"]{background:var(--pine);color:#fff;box-shadow:none}
.ix-chip[aria-pressed="true"] span{color:var(--mint)}

.ix-body{padding:clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 64px)}
.ix-group{scroll-margin-top:170px}
.ix-group + .ix-group{margin-top:clamp(64px, 8vw, 112px)}
.ix-group[hidden],.ix-list li[hidden]{display:none}
.ix-group-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 48px;align-items:end;margin-bottom:26px}
.ix-group-head h2{font-size:clamp(32px, 3.6vw, 46px);line-height:1.05}
.ix-group-head h2 span{font-family:var(--text);font-size:17px;font-weight:500;color:var(--muted);letter-spacing:0;margin-left:10px}
.ix-group-head p{color:var(--muted);font-size:18px;line-height:1.55;max-width:30em}
.ix-list{display:grid;grid-template-columns:1fr 1fr;column-gap:48px}
.ix-list li{display:grid} /* stretch each row so hairlines line up across the two columns */
.ix-list .ic-tile i{font-size:25px;line-height:1;color:var(--pine)}
.ix-list b{font-size:18px}
.ix-empty{padding:40px 0 8px;text-align:center;color:var(--muted)}
.ix-empty p{font-size:19px}
.ix-empty button{margin-top:14px;background:none;border:0;cursor:pointer;font-size:17px}

/* ---------- responsive ---------- */
@media (max-width:1023px){
  .t-grid{grid-template-columns:1fr}
  .t-cta{display:none} /* the closing call to action follows right after on small screens */
  .t-cta + .t-box{margin-top:0}
}
@media (max-width:920px){
  .ix-hero-grid{grid-template-columns:1fr}
  .ix-group-head{grid-template-columns:1fr}
  .ix-list{grid-template-columns:1fr}
  .ix-bar-in{flex-wrap:wrap}
  .ix-search{flex:1 1 100%}
}
@media (max-width:760px){
  .ix-bar{position:static;border-top:0}
  .ix-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 calc(var(--gutter) * -1);padding:2px var(--gutter)}
  .ix-chips::-webkit-scrollbar{display:none}
}
@media (max-width:640px){
  .t-hero section p + p{align-items:flex-start}
  .t-disc{padding:16px}
  .t-disc-ic{width:34px;height:34px;border-radius:10px}
  .t-disc-ic svg{width:19px;height:19px}
  .t-box{padding:22px 20px 10px}
  .ix-start{padding:22px 20px 8px}
  .ix-list b{font-size:17px}
}

/* ---------- print: the tool and its result only ---------- */
@media print{
  body.cs{background:#fff !important}
  .skip,.nav,.sheet,.site-foot,.wa-float,section.closing,.crumbs,.tool-print-hide,.tool-sidebar{display:none !important}
  .t-body{background:#fff;padding:0}
  .t-hero{padding:0 0 16px}
  .t-grid{display:block}
  .tool-card{box-shadow:none !important;border:1px solid #d8e3dd !important}
}
