/* =========================================================
   Veris Labs - Resources & Free Business Tools
   Extends css/styles.css (load that first).
   ========================================================= */

/* ---------- Resource / tool hero ---------- */
.tool-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(ellipse 80% 80% at 78% 0%, rgba(111, 200, 230, .26), transparent 58%),
    linear-gradient(150deg, #12203a 0%, #2f76a8 96%);
}
.tool-hero::after {
  content: "";
  position: absolute; inset: 0; opacity: .3;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 80% at 70% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 20%, #000, transparent 75%);
}
.tool-hero .container { position: relative; z-index: 2; max-width: 860px; }
.tool-hero h1 { color: #fff; text-wrap: balance; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.tool-hero .lead { color: rgba(255,255,255,.9); font-size: 1.14rem; max-width: 680px; }
.tool-hero .eyebrow { color: var(--cyan-300); }
.tool-hero .eyebrow::before { background: linear-gradient(90deg, #9fdcef, #4fa8d4); }

/* ---------- The short plain-English answer (AI-search target) ---------- */
.answer-box {
  background: linear-gradient(180deg, #fff 0%, var(--mist) 100%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}
.answer-box p:last-child { margin-bottom: 0; }
.answer-box strong { color: var(--navy-800); }
.answer-box .answer-label {
  display: block;
  font-size: .72rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal-600); margin-bottom: 10px;
}

/* ---------- Calculator layout ---------- */
.tool-layout {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 30px;
  align-items: start;
}
.calc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
}
.calc-card h2, .calc-card h3 { font-size: 1.12rem; margin-bottom: 4px; }
.calc-card .calc-sub { font-size: .9rem; color: var(--slate-light); margin-bottom: 24px; }

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field > label,
.field-label {
  display: block;
  font-size: .86rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 7px;
  letter-spacing: -.005em;
}
.field .hint { display: block; font-size: .81rem; color: var(--slate-light); font-weight: 500; margin-top: 6px; line-height: 1.5; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .affix {
  position: absolute;
  font-weight: 700;
  color: var(--slate-light);
  font-size: .98rem;
  pointer-events: none;
}
.input-wrap .affix.pre { left: 15px; }
.input-wrap .affix.post { right: 15px; }
.input-wrap input,
.input-wrap select {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-800);
  background: var(--mist);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
  -moz-appearance: textfield;
}
.input-wrap.has-pre input { padding-left: 31px; }
.input-wrap.has-post input { padding-right: 44px; }
.input-wrap input:focus,
.input-wrap select:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(79,168,212,.14);
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-wrap select { cursor: pointer; appearance: none; background-image: none; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* segmented control */
.segmented {
  display: inline-flex;
  background: var(--mist-2);
  border-radius: 999px;
  padding: 4px;
  gap: 3px;
  flex-wrap: wrap;
}
.segmented button {
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: .87rem;
  font-weight: 700;
  color: var(--slate);
  padding: 9px 17px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.segmented button:hover { color: var(--navy-800); }
.segmented button.on {
  background: #fff;
  color: var(--teal-600);
  box-shadow: var(--shadow-sm);
}

/* ---------- Results ---------- */
.result-card {
  position: sticky;
  top: 96px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(ellipse 80% 70% at 85% 0%, rgba(62,151,201,.34), transparent 62%),
    var(--grad-ink);
  color: #fff;
}
.result-head { padding: 28px 30px 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.result-label {
  font-size: .73rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan-300); margin-bottom: 10px;
}
.result-figure {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: #fff;
}
.result-sub { font-size: .93rem; color: rgba(233,242,250,.76); margin-top: 8px; }

.result-rows { padding: 8px 30px 26px; }
.result-rows .r {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
  font-size: .94rem;
}
.result-rows .r:last-child { border-bottom: 0; }
.result-rows .r span { color: rgba(233,242,250,.74); }
.result-rows .r b { color: #fff; font-weight: 700; font-family: var(--font-display); letter-spacing: -.015em; white-space: nowrap; }
.result-rows .r.total { border-top: 1px solid rgba(255,255,255,.2); margin-top: 6px; padding-top: 15px; border-bottom: 0; }
.result-rows .r.total span { color: #fff; font-weight: 700; }
.result-rows .r.total b { font-size: 1.16rem; color: var(--cyan-300); }
.result-rows .r.sub { font-size: .87rem; padding: 8px 0 8px 16px; }
.result-rows .r.sub span { color: rgba(233,242,250,.55); }
.result-rows .r.sub b { font-weight: 600; color: rgba(233,242,250,.8); }

.verdict {
  margin: 0 30px 26px;
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  font-size: .93rem;
  line-height: 1.55;
  color: rgba(255,255,255,.94);
}
.verdict strong { color: #fff; display: block; margin-bottom: 3px; font-family: var(--font-display); }
.verdict.good { background: rgba(125,255,180,.13); border-color: rgba(125,255,180,.34); }
.verdict.warn { background: rgba(255,196,84,.14); border-color: rgba(255,196,84,.36); }

/* comparison bars */
.compare { display: grid; gap: 14px; margin-top: 4px; }
.compare .c-row .c-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 7px; }
.compare .c-row .c-top span { color: rgba(233,242,250,.78); font-weight: 600; }
.compare .c-row .c-top b { color: #fff; font-family: var(--font-display); }
.compare .track { height: 10px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden; }
.compare .track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #9fdcef, #4fa8d4); transition: width .5s var(--ease-out); }
.compare .c-row.alt .track i { background: linear-gradient(90deg, #7dffb4, #3fae7e); }

/* ---------- Scorecard / checklist tools ---------- */
.q-list { display: grid; gap: 14px; }
.q-item {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color .2s ease, background .2s ease;
}
.q-item.answered { border-color: #cfe0ef; background: var(--mist); }
.q-item .q-text { font-weight: 700; color: var(--navy-800); font-size: .98rem; margin-bottom: 4px; }
.q-item .q-help { font-size: .85rem; color: var(--slate-light); margin-bottom: 13px; line-height: 1.5; }
.q-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.q-opts label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 7px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: .87rem;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s var(--ease-out);
}
.q-opts label:hover { border-color: var(--teal-500); color: var(--teal-600); transform: translateY(-1px); }
.q-opts input { position: absolute; opacity: 0; pointer-events: none; }
.q-opts input:checked + label,
.q-opts label.sel {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(47,118,168,.3);
}
.q-opts label:focus-within { outline: 3px solid rgba(79,168,212,.55); outline-offset: 2px; }

.score-dial { display: grid; place-items: center; padding: 8px 0 4px; }
.score-dial svg { width: 168px; height: 168px; transform: rotate(-90deg); }
.score-dial .track-c { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 13; }
.score-dial .val-c {
  fill: none; stroke: url(#dialGrad); stroke-width: 13; stroke-linecap: round;
  transition: stroke-dashoffset .7s var(--ease-out);
}
.score-dial .score-num {
  position: absolute;
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 800; color: #fff; letter-spacing: -.04em;
}
.score-wrap { position: relative; display: grid; place-items: center; }
.score-band { font-size: .9rem; color: var(--cyan-300); font-weight: 700; letter-spacing: .04em; margin-top: 2px; }

/* ---------- Supporting content ---------- */
.method {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
}
.method > summary {
  cursor: pointer;
  padding: 20px 26px;
  font-weight: 700;
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.method > summary::-webkit-details-marker { display: none; }
.method > summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--teal-600);
  transition: transform .25s var(--ease-out);
  line-height: 1;
}
.method[open] > summary::after { transform: rotate(45deg); }
.method .method-body { padding: 0 26px 24px; }
.method .method-body p,
.method .method-body li { font-size: .96rem; }
.method .method-body ul { padding-left: 20px; margin: 0 0 12px; }
.method .method-body li { margin-bottom: 8px; color: var(--slate); }
.method .method-body table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: .92rem; }
.method .method-body th,
.method .method-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--slate); }
.method .method-body th { color: var(--navy-800); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.method .method-body td:last-child { text-align: right; font-weight: 700; color: var(--navy-800); font-family: var(--font-display); }

.disclaimer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fffaf0;
  border: 1px solid #f2e0be;
  border-radius: 14px;
  padding: 18px 20px;
  font-size: .9rem;
  color: #7a6234;
  line-height: 1.6;
  margin-top: 26px;
}
.disclaimer svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; color: #c9973a; }
.disclaimer strong { color: #5f4c26; }

.rates-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}
.rates-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #7dffb4; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq details:hover { border-color: #cfe0ef; box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer;
  padding: 20px 26px;
  font-weight: 700;
  color: var(--navy-800);
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--teal-600);
  border-bottom: 2px solid var(--teal-600);
  transform: rotate(45deg);
  transition: transform .25s var(--ease-out);
  flex: 0 0 auto;
  margin-top: -4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq .faq-body { padding: 0 26px 22px; }
.faq .faq-body p { font-size: .97rem; margin-bottom: .7rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Tool index cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tool-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.tool-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #cfe0ef; }
.tool-card:hover::before { transform: scaleX(1); }
.tool-card .ic {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--grad-brand-soft);
  color: var(--teal-600);
  margin-bottom: 18px;
  box-shadow: inset 0 0 0 1px rgba(63,151,201,.14);
  transition: transform .3s var(--ease-out);
}
.tool-card:hover .ic { transform: scale(1.08) rotate(-3deg); }
.tool-card .ic svg { width: 23px; height: 23px; }
.tool-card h3 { font-size: 1.06rem; margin-bottom: .4em; color: var(--navy-800); }
.tool-card p { font-size: .93rem; margin: 0 0 18px; flex: 1; }
.tool-card .go {
  font-weight: 700; font-size: .9rem; color: var(--teal-600);
  display: inline-flex; align-items: center; gap: 7px;
  transition: gap .2s var(--ease-out);
}
.tool-card:hover .go { gap: 12px; }
.tool-card .cat {
  position: absolute; top: 22px; right: 22px;
  font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate);
  background: var(--mist-2);
  padding: 5px 10px; border-radius: 999px;
}

/* resource hub section cards */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.hub-card {
  display: block;
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
  min-height: 250px;
}
.hub-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.hub-card.tools { background: linear-gradient(150deg, #12203a 0%, #2f76a8 100%); }
.hub-card.blog { background: linear-gradient(150deg, #14303a 0%, #1b7f96 100%); }
.hub-card.guides { background: linear-gradient(150deg, #103a2e 0%, #1d6b4f 100%); }
.hub-card::after {
  content: "";
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(159,220,239,.45), transparent 70%);
  top: -110px; right: -70px; filter: blur(34px);
}
.hub-card h3 { color: #fff; font-size: 1.45rem; margin-bottom: .45em; position: relative; z-index: 1; }
.hub-card p { color: rgba(255,255,255,.84); font-size: .96rem; position: relative; z-index: 1; margin-bottom: 20px; }
.hub-card .go { color: #fff; font-weight: 700; font-size: .93rem; position: relative; z-index: 1; display: inline-flex; gap: 8px; transition: gap .2s var(--ease-out); }
.hub-card:hover .go { gap: 13px; }
.hub-card .count {
  position: relative; z-index: 1;
  display: inline-block;
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.26);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}

/* empty state for blog / guides */
.empty-state {
  text-align: center;
  background: var(--mist);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
}
.empty-state .ic {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 22px;
  display: grid; place-items: center;
  background: var(--grad-brand-soft); color: var(--teal-600);
}
.empty-state .ic svg { width: 30px; height: 30px; }

/* related tools strip */
.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.related a {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), border-color .25s ease, box-shadow .25s ease;
}
.related a:hover { transform: translateY(-3px); border-color: var(--teal-500); box-shadow: var(--shadow-md); }
.related a strong { display: block; color: var(--navy-800); font-family: var(--font-display); font-size: .98rem; margin-bottom: 4px; }
.related a span { font-size: .87rem; color: var(--slate-light); }

/* breadcrumb on light backgrounds */
.crumb-light { font-size: .86rem; color: var(--slate-light); margin-bottom: 20px; }
.crumb-light a { color: var(--teal-600); font-weight: 600; }
.crumb-light a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .tool-layout { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .tool-grid, .hub-grid, .related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .tool-grid, .hub-grid, .related { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 20px; }
  .calc-card { padding: 24px 20px; }
  .result-head, .result-rows { padding-left: 22px; padding-right: 22px; }
  .verdict { margin-left: 22px; margin-right: 22px; }
  .answer-box { padding: 22px 22px; }
  .tool-hero { padding: 56px 0 50px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
}
