/* Automation cost calculator. Sits on ../../styles.css (BA tokens, nav, footer, buttons, FAQ)
   and ../../home-v2/home-v2.css (sec-head, badges, ct-h). Unlayered, so it wins. Prefix: cc-. */

.cc-page main { overflow-x: clip; }

/* ─── hero ─── */
.cc-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(68px + clamp(2.6rem, 7vh, 4.8rem)) var(--gut) clamp(2.2rem, 5vh, 3.4rem); }
.cc-h1 { margin-top: 1.4rem; max-width: 20ch; font-size: clamp(2.1rem, .7rem + 4.3vw, 5rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.02; text-wrap: balance; }
.cc-h1 em { letter-spacing: -.02em; background: linear-gradient(transparent 70%, var(--yellow) 70% 94%, transparent 94%); padding: 0 .06em; }
.cc-lead { margin-top: 1.4rem; max-width: 62ch; font-size: clamp(1.05rem, .98rem + .4vw, 1.28rem); color: var(--ink-2); }
.cc-snap { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.4rem; padding: .4rem .85rem; border: 2px dashed var(--ink); border-radius: 999px; font-family: var(--f-mono); font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.cc-snap span { color: var(--mint-d); font-size: .6rem; }

/* ─── calculator window ─── */
.cc-tool { padding: 0 var(--gut) clamp(3.5rem, 9vh, 6rem); }
.cc-win { max-width: 1440px; margin: 0 auto; background: #fff; border: var(--line); border-radius: 22px; box-shadow: 10px 10px 0 var(--ink); overflow: hidden; }
.cc-bar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.1rem; border-bottom: var(--line); background: var(--paper); }
.cc-dots { display: inline-flex; gap: 6px; }
.cc-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }
.cc-dots i:nth-child(1) { background: var(--pink); } .cc-dots i:nth-child(2) { background: var(--yellow); } .cc-dots i:nth-child(3) { background: var(--mint); }
.cc-url { font-family: var(--f-mono); font-size: .72rem; padding: .25rem .7rem; border: 2px solid rgba(13, 20, 33, .25); border-radius: 8px; background: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.cc-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.cc-in { display: grid; align-content: start; gap: 1.6rem; padding: clamp(1.1rem, 2.4vw, 2rem); background: var(--paper); border-right: var(--line); }
.cc-out { display: grid; align-content: start; gap: 1.1rem; padding: clamp(1.1rem, 2.4vw, 2rem); min-width: 0; }

.cc-h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.cc-n { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border: var(--line); border-radius: 50%; background: var(--yellow); font-family: var(--f-mono); font-size: .8rem; }
.cc-h3 { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.cc-step { display: grid; gap: .8rem; min-width: 0; }
.cc-step-h { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.cc-count { font-family: var(--f-mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cc-help { font-size: .92rem; color: var(--ink-2); }
.cc-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.cc-set > legend { padding: 0; margin-bottom: .8rem; }
.cc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.cc-f-wide { grid-column: 1 / -1; }

/* fields */
.cc-f { display: grid; align-content: start; gap: .3rem; font-weight: 700; font-size: .86rem; min-width: 0; }
.cc-f input { width: 100%; min-width: 0; font: inherit; font-size: 1rem; font-weight: 600; padding: .6rem .7rem; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); }
.cc-f input:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.cc-f input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--yellow); }
.cc-hint { font-weight: 500; font-size: .76rem; color: var(--muted); line-height: 1.35; }
.cc-f-wide .cc-hint { color: var(--ink-2); font-weight: 600; }
.cc-f-l { padding: 0; margin-bottom: .3rem; font-weight: 700; font-size: .86rem; }

/* workflow cards */
.wf-list { display: grid; gap: .9rem; }
.wf { display: grid; gap: .75rem; margin: 0; padding: 1rem; min-width: 0; background: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--sh-sm); }
.wf-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.wf-legend { font-family: var(--f-mono); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wf-rm { min-height: 32px; padding: .2rem .7rem; border: 2px solid var(--ink); border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--paper); }
.wf-rm:hover { background: color-mix(in srgb, var(--pink) 30%, #fff); }
.wf-rm[hidden] { display: none; }
.wf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; align-items: end; }
.wf-trig { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem 1rem; }
.wf-interval { flex: 1 1 150px; max-width: 220px; }
.wf-interval[hidden] { display: none; }
.cc-add { justify-self: start; }
.cc-add:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cc-reset { justify-self: start; font-size: .85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); }
.cc-reset:hover { color: var(--ink); }

/* segmented radios */
.seg-wrap { margin: 0; padding: 0; border: 0; min-width: 0; }
.seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg label { padding: .42rem .9rem; border-radius: 999px; font-weight: 700; font-size: .86rem; line-height: 1.2; cursor: pointer; transition: background-color var(--d-fast), color var(--d-fast); }
.seg label:hover { background: var(--cream); }
.seg input:checked + label { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--yellow); }

/* ─── results ─── */
.cc-out-h { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.cc-mode-note { margin-top: -.5rem; font-size: .82rem; color: var(--muted); }

.cc-verdict { padding: clamp(1rem, 2vw, 1.4rem); background: var(--cream); border: var(--line); border-radius: 18px; box-shadow: var(--sh); }
.cc-verdict.is-custom { background: var(--yellow); }
.cc-vk { font-family: var(--f-mono); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.cc-vh { margin-top: .35rem; font-size: clamp(1.35rem, 1rem + 1.2vw, 1.9rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.cc-vb { display: grid; gap: .3rem; margin-top: .7rem; font-size: .94rem; color: var(--ink-2); }
.cc-vb b { color: var(--ink); }
.cc-chips-h { margin-top: 1rem; font-family: var(--f-mono); font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.cc-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.cc-chips li { display: inline-flex; align-items: center; gap: .45rem; padding: .28rem .65rem; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-size: .8rem; }
.cc-chips li b { font-family: var(--f-mono); font-size: .76rem; }
.cc-chips li.is-good { background: color-mix(in srgb, var(--mint) 35%, #fff); }

.cc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.cc-card { --c: var(--yellow); position: relative; display: grid; align-content: start; gap: .2rem; padding: 1.5rem 1.1rem 1.05rem; background: #fff; border: var(--line); border-radius: 18px; box-shadow: var(--sh); overflow: hidden; min-width: 0; }
.cc-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--c); border-bottom: var(--line); }
.cc-card-self::before { background: repeating-linear-gradient(135deg, var(--c) 0 8px, #fff 8px 13px); }
.cc-card-custom { grid-column: 1 / -1; background: color-mix(in srgb, var(--yellow) 14%, #fff); }
.cc-card.is-best { box-shadow: 7px 7px 0 var(--ink); outline: 3px solid var(--mint); outline-offset: -7px; }
.cc-card-h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cc-card h3 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.cc-tags { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.cc-tags span { padding: .12rem .5rem; border: 2px solid var(--ink); border-radius: 999px; font-family: var(--f-mono); font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--mint); }
.cc-card.is-quote .cc-tags span:last-child { background: var(--cream); }
.cc-plan { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.cc-mo { display: flex; align-items: baseline; gap: .25rem; margin-top: .45rem; }
.cc-mo b { font-size: clamp(1.9rem, 1.3rem + 1.4vw, 2.5rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.cc-mo span { font-weight: 700; color: var(--muted); }
.cc-use { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.cc-split { font-size: .8rem; color: var(--muted); }
.cc-split:empty { display: none; }
.cc-3y { margin-top: .55rem; padding-top: .55rem; border-top: 1px dashed rgba(13, 20, 33, .3); font-size: .88rem; color: var(--ink-2); }
.cc-3y b { color: var(--ink); font-weight: 800; }

/* bars */
.cc-compare { display: grid; gap: .7rem; padding: 1.1rem; border: var(--line); border-radius: 18px; background: var(--paper); }
.cc-bars { display: grid; gap: .55rem; }
.cc-bars li { --c: var(--yellow); display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 5.6rem; align-items: center; gap: .7rem; }
.cc-bars li[data-p="zapier"] { --c: #ff4f00; } .cc-bars li[data-p="make"] { --c: #6d00cc; }
.cc-bars li[data-p="n8n"], .cc-bars li[data-p="n8nself"] { --c: #ea4b71; }
.cc-bn { display: grid; font-weight: 700; font-size: .88rem; line-height: 1.2; }
.cc-bn i { font-style: normal; font-weight: 500; font-size: .72rem; color: var(--muted); }
.cc-track { display: flex; height: 24px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; overflow: hidden; }
.cc-fill { display: block; height: 100%; background: var(--c); transition: width var(--d-slow) var(--ease-out); }
.cc-fill + .cc-fill { border-left: 2px solid var(--ink); }
.cc-fill-build { background: repeating-linear-gradient(135deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 55%, #fff) 6px 10px); }
.cc-bars li[data-p="n8nself"] .cc-fill { background: repeating-linear-gradient(135deg, var(--c) 0 8px, color-mix(in srgb, var(--c) 45%, #fff) 8px 12px); }
.cc-bv { text-align: right; font-family: var(--f-mono); font-size: .82rem; font-weight: 700; }

.cc-fine { font-size: .78rem; line-height: 1.5; color: var(--muted); }
.cc-fine a { color: var(--ink-2); font-weight: 700; }

/* ─── meters ─── */
.cc-meters { padding: clamp(4rem, 10vh, 6.5rem) var(--gut); border-top: var(--line); background: var(--cream); --hl: color-mix(in srgb, var(--mint) 55%, #fff); }
.cc-mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 1.6vw, 1.2rem); }
.cc-mgrid li { --c: var(--yellow); position: relative; display: grid; align-content: start; gap: .5rem; padding: calc(10px + clamp(1rem, 2vw, 1.4rem)) clamp(1rem, 2vw, 1.5rem) clamp(1.1rem, 2vw, 1.5rem); background: #fff; border: var(--line); border-radius: 18px; box-shadow: var(--sh); overflow: hidden; }
.cc-mgrid li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: var(--c); border-bottom: var(--line); }
.cc-mk { font-family: var(--f-mono); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cc-mgrid h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.cc-mgrid li > p:last-child { color: var(--ink-2); font-size: .95rem; }

/* ─── how to use ─── */
.cc-use-sec { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 6vw, 5rem); padding: clamp(4rem, 10vh, 6.5rem) var(--gut); border-top: var(--line); --hl: color-mix(in srgb, var(--blue) 65%, #fff); }
.cc-honest { margin-top: 1.4rem; padding: 1rem 1.2rem; max-width: 46ch; border: 2px dashed var(--ink); border-radius: 16px; color: var(--ink-2); }
.cc-honest b { color: var(--ink); }
.cc-checks { display: grid; gap: .9rem; align-content: start; }
.cc-checks li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: .9rem; align-items: start; padding: 1.1rem 1.2rem; background: #fff; border: var(--line); border-radius: 16px; box-shadow: var(--sh-sm); color: var(--ink-2); }
.cc-checks li::before { content: "✓"; display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 800; }
.cc-checks b { color: var(--ink); }

/* ─── CTA band ─── */
.cc-cta { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; align-items: center; gap: clamp(1.6rem, 4vw, 4rem); padding: clamp(4rem, 10vh, 6.5rem) var(--gut); background: var(--yellow); border-top: var(--line); --hl: color-mix(in srgb, var(--pink) 70%, #fff); }
.cc-cta .eyebrow { color: var(--ink); }
.cc-cta-p { margin-top: 1.2rem; max-width: 60ch; font-size: clamp(1rem, .96rem + .3vw, 1.15rem); font-weight: 600; color: var(--ink-2); }
.cc-cta-btns { display: grid; gap: 1rem; justify-items: stretch; }
.cc-btn-main { --bg: #fff; }
.cc-btn-alt { --bg: transparent; box-shadow: none; }
.cc-btn-alt:hover { --bg: rgba(255, 255, 255, .45); box-shadow: 4px 4px 0 var(--ink); }

/* ─── FAQ (details) ─── */
.cc-qa { border-bottom: var(--line); }
.cc-qa summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.35rem 0; list-style: none; cursor: pointer; font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.cc-qa summary::-webkit-details-marker { display: none; }
.cc-qa summary:hover .qa-i { background: var(--yellow); }
.cc-qa[open] .qa-i { transform: rotate(135deg); background: var(--yellow); }
.cc-qa p { padding: 0 3.5rem 1.5rem 0; max-width: 60ch; color: var(--ink-2); }

/* ─── responsive ─── */
@media (max-width: 1100px) {
  .cc-grid { grid-template-columns: 1fr; }
  .cc-in { border-right: 0; border-bottom: var(--line); }
  .cc-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cc-use-sec, .cc-cta { grid-template-columns: 1fr; }
  .cc-cta-btns { justify-items: start; }
}
@media (max-width: 640px) {
  .cc-win { border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); }
  .cc-cards, .cc-mgrid { grid-template-columns: 1fr; }
  .cc-fields { grid-template-columns: 1fr; }
  .wf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-grid .cc-f:first-child { grid-column: 1 / -1; }
  .wf-interval { max-width: none; }
  .cc-bars li { grid-template-columns: minmax(0, 1fr) auto; row-gap: .3rem; }
  .cc-track { grid-column: 1 / -1; grid-row: 2; }
  .cc-cta-btns { justify-items: stretch; width: 100%; }
  .cc-cta-btns .btn { white-space: normal; text-align: center; }
  .cc-qa p { padding-right: 0; }
  .cc-out-h .seg-wrap { width: 100%; }
  .cc-out-h .seg { display: flex; width: 100%; }
  .cc-out-h .seg label { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-fill { transition: none; }
}
