/* AI video cost calculator (/ai-video-cost-calculator) */
.cost-page { max-width: 980px; }
.cost-page .sub { display: block; font-size: 13px; font-weight: 400; color: var(--text-2); }
.cost-note { font-size: 13.5px; color: var(--text-2); }
.cost-na, .cost-empty { color: var(--text-2); }

/* Controls */
.cost-controls { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px 28px; padding: 22px; margin: 0 0 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cost-controls > div { min-width: 0; }
.cost-c-len { grid-column: span 5; }
.cost-c-res { grid-column: span 7; }
.cost-c-type { grid-column: span 5; }
.cost-c-tool { grid-column: span 3; }
.cost-c-search { grid-column: span 4; }
.cost-label { display: flex; justify-content: space-between; align-items: center; min-height: 26px; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.cost-label output { font-size: 20px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); font-variant-numeric: tabular-nums; }
.cost-controls input[type=range] { display: block; width: 100%; margin: 0 0 12px; accent-color: var(--primary); }
/* Segmented control: one bordered track, the chosen option filled */
.cost-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 100%; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.cost-seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.cost-seg button:hover { color: var(--text); }
.cost-seg button[aria-checked=true] { background: var(--primary); color: #fff; font-weight: 600; }
.cost-seg button:focus-visible, .cost-budget select:focus-visible, .cost-budget input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cost-presets button { min-height: 28px; padding: 0 10px; font-size: 13px; }

/* Headline figures */
.cost-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 8px; }
.cost-stat { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.cost-stat-k { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.cost-stat strong { display: block; font-size: 28px; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.cost-stat:first-child strong { color: var(--primary); }

/* Ranked results */
.cost-head, .cost-row { grid-template-columns: 30px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.cost-head { display: grid; gap: 4px 16px; padding: 0 16px 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.cost-head span:last-child { text-align: right; }
.cost-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.prose .cost-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.cost-row { display: grid; gap: 4px 16px; align-items: center; margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.cost-row.is-best { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.cost-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 700; }
.cost-name strong, .cost-price strong { color: var(--text); }
.cost-credits { color: var(--text); font-size: 15px; }
.cost-price { text-align: right; }
.cost-price strong { font-size: 19px; }
.cost-row.is-best .cost-price strong { color: var(--primary); }
.cost-bar { grid-column: 2 / -1; width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: var(--primary-soft); appearance: none; }
.cost-bar::-webkit-progress-bar { background: var(--primary-soft); }
.cost-bar::-webkit-progress-value { background: var(--primary); border-radius: 99px; }
.cost-bar::-moz-progress-bar { background: var(--primary); border-radius: 99px; }

/* Credits-to-clips box */
.cost-budget { display: grid; gap: 14px 20px; grid-template-columns: 1fr 1fr; padding: 20px; margin: 0 0 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cost-budget label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.cost-budget select, .cost-budget input { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.cost-budget > div:last-child { grid-column: 1 / -1; }
.prose .cost-budget-list { list-style: none; margin: 0; padding: 0; }
.cost-budget-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 10px 0; border-top: 1px solid var(--border); }
.cost-budget-list strong { font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* One card per tool */
.cost-tool { margin: 0 0 10px; padding: 0 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); scroll-margin-top: 80px; }
.cost-tool[open] { padding-bottom: 16px; }
.cost-tool summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 16px 0; cursor: pointer; list-style: none; }
.cost-tool summary::-webkit-details-marker { display: none; }
.cost-from::after { content: ''; display: inline-block; width: 8px; height: 8px; margin: 0 2px 3px 10px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform .15s; }
.cost-tool[open] .cost-from::after { margin-bottom: -1px; transform: rotate(-135deg); }
.cost-tool summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
.cost-tool-name { font-size: 18px; font-weight: 700; color: var(--text); }
.cost-from { margin-left: auto; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cost-badge { padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; }
.prose .cost-plans { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 0 0 14px; padding: 0; }
.cost-plans li { margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); font-size: 15px; }
.prose .cost-table { min-width: 460px; font-variant-numeric: tabular-nums; }
.prose .cost-table th { font-size: 13px; font-weight: 600; color: var(--text-2); }
.prose .cost-rules { font-size: 15px; margin-bottom: 8px; }

@media (max-width: 860px) {
  .cost-c-len, .cost-c-res, .cost-c-type { grid-column: 1 / -1; }
  .cost-c-tool, .cost-c-search { grid-column: span 6; }
}
@media (max-width: 420px) {
  .cost-controls { padding: 16px; gap: 18px 14px; }
  .cost-c-tool, .cost-c-search { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cost-budget { grid-template-columns: 1fr; }
  .cost-summary { grid-template-columns: 1fr; }
  .cost-stat strong { font-size: 24px; }
  .cost-head { display: none; }
  .cost-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .cost-credits { grid-column: 2; grid-row: 2; font-size: 13.5px; color: var(--text-2); }
  .cost-price { grid-column: 3; grid-row: 1 / span 2; }
  .cost-bar { grid-column: 1 / -1; }
}

/* Header facts, search and "show all" */
.cost-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.cost-stats li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; color: var(--text-2); }
.cost-stats strong { color: var(--text); }
.cost-controls select, .cost-controls input[type=search] { box-sizing: border-box; width: 100%; height: 42px; min-height: 0; margin: 0; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 14.5px; }
.cost-controls select:focus-visible, .cost-controls input[type=search]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cost-more { display: block; width: 100%; min-height: 44px; margin: 4px 0 12px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.cost-more:hover { background: var(--primary-soft); }
.cost-more:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cost-name a { color: inherit; text-decoration: none; }
.cost-name a:hover { text-decoration: underline; }
