/* Ad Cost Calculator (prefix adc-). Mode tabs + currency -> inputs panel beside a results panel
   (key figure, formula line, tiles) -> funnel table -> copy / reset. */
.adc-card { padding: 28px; }
.adc-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.adc-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }

.adc-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.adc-tabs { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 5px; background: #f7f8fa; }
.adc-tab { border: none; background: none; padding: 8px 14px; border-radius: 9px; font: inherit; font-size: .86em; font-weight: 700; color: #6b7280; cursor: pointer; display: flex; align-items: center; gap: 7px; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.adc-tab i { font-size: .95em; }
.adc-tab.active { background: var(--site-dark); color: #fff; }
.adc-tab:hover:not(.active) { color: var(--site-dark); background: #fff; }
.adc-currency { display: flex; align-items: center; gap: 8px; font-size: .86em; font-weight: 600; color: #23272f; }
.adc-currency select { border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .95em; background: #fff; color: #23272f; outline: none; }
.adc-currency select:focus { border-color: var(--site-dark); }

.adc-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.adc-form { min-width: 0; }
.adc-pane-intro { margin: 0 0 14px; font-size: .9em; color: #6b7280; }
.adc-solve { margin-bottom: 16px; }
.adc-solve-label { display: block; font-size: .78em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin-bottom: 8px; }
.adc-solve-row { display: flex; flex-wrap: wrap; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.adc-solve-btn { flex: 1 1 auto; border: none; background: #f7f8fa; color: #6b7280; font: inherit; font-size: .8em; font-weight: 700; padding: 9px 10px; cursor: pointer; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.adc-solve-btn + .adc-solve-btn { border-left: 1px solid #ddd; }
.adc-solve-btn.active { background: var(--site-dark); color: #fff; }
.adc-solve-btn:hover:not(.active) { color: var(--site-dark); }

.adc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.adc-field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .9em; color: #23272f; }
.adc-input-row { display: flex; align-items: center; gap: 8px; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; background: #fff; transition: border-color .15s ease, background .15s ease; }
.adc-input-row:focus-within { border-color: var(--site-dark); }
.adc-cur, .adc-prefix { font-weight: 700; color: var(--site-dark); flex: none; font-size: .95em; }
.adc-suffix { font-size: .8em; color: #6b7280; flex: none; white-space: nowrap; }
.adc-input-row input { border: none; outline: none; width: 100%; min-width: 0; font: inherit; font-size: 1em; background: none; color: #23272f; font-variant-numeric: tabular-nums; }
.adc-field small { display: block; color: #6b7280; font-size: .8em; margin-top: 6px; }
.adc-field.adc-bad .adc-input-row { border-color: #b91c1c; background: #fef2f2; }
.adc-field.adc-solved .adc-input-row { border-style: dashed; border-color: var(--site-accent); background: #f0fdfa; }
.adc-field.adc-solved input { color: var(--site-dark); font-weight: 700; }
.adc-field.adc-solved label::after { content: 'solved'; margin-left: 8px; font-size: .72em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--site-accent); }

.adc-result { background: #fafbfc; border: 1px solid #eee; border-radius: 12px; padding: 20px; min-width: 0; }
.adc-result.adc-wait { background: #fff7ed; border-color: #fed7aa; }
.adc-key-label { font-size: .8em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; margin: 0 0 6px; }
.adc-key { font-size: 2.3em; font-weight: 800; line-height: 1.05; color: var(--site-dark); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.adc-key-sub { font-size: .85em; font-weight: 700; color: #6b7280; margin-top: 4px; min-height: 1.2em; }
.adc-formula { margin: 12px 0 0; padding: 10px 12px; background: #fff; border: 1px solid #eee; border-radius: 8px; font-family: Consolas, 'Courier New', monospace; font-size: .82em; color: #23272f; overflow-wrap: anywhere; }
.adc-formula:empty { display: none; }
.adc-msg { margin: 10px 0 0; font-size: .9em; font-weight: 600; color: #b45309; }
.adc-msg:empty { display: none; }
.adc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.adc-tiles:empty { display: none; }
.adc-tile { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 12px 14px; min-width: 0; }
.adc-tile-k { font-size: .74em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.adc-tile-v { font-size: 1.15em; font-weight: 800; color: #23272f; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.adc-tile-s { font-size: .78em; color: #6b7280; margin-top: 3px; }
.adc-tile.adc-good .adc-tile-v { color: #15803d; }
.adc-tile.adc-badv .adc-tile-v { color: #b91c1c; }

.adc-section { margin-top: 24px; }
.adc-section h3 { font-size: 1em; font-weight: 700; color: #23272f; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.adc-section h3 i { color: var(--site-accent); }
.adc-table-wrap { overflow-x: auto; border: 1px solid #eee; border-radius: 10px; }
.adc-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.adc-table th { text-align: left; font-size: .76em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 2px solid #e5e7eb; white-space: nowrap; }
.adc-table td { padding: 10px; border-bottom: 1px solid #eee; color: #23272f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adc-table tr:last-child td { border-bottom: none; }
.adc-table td:first-child { font-weight: 700; }
.adc-dim { color: #6b7280; font-size: .82em; font-weight: 400; }
.adc-note { margin: 10px 0 0; font-size: .86em; color: #6b7280; }

.adc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.adc-btn { font: inherit; font-size: .9em; font-weight: 700; border-radius: 8px; padding: 10px 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--site-dark); background: var(--site-dark); color: #fff; transition: background .2s ease, color .2s ease; }
.adc-btn:hover { background: var(--site-dark-2); border-color: var(--site-dark-2); }
.adc-btn.adc-copied { background: #15803d; border-color: #15803d; }
.adc-btn-ghost { background: #fff; color: var(--site-dark); border-style: dashed; }
.adc-btn-ghost:hover { background: var(--site-dark); color: #fff; border-style: solid; }
.adc-privacy { margin: 14px 0 0; font-size: .8em; color: #6b7280; display: flex; align-items: center; gap: 6px; }
.adc-privacy i { color: var(--site-accent); }

@media (max-width: 900px) {
    .adc-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .adc-card { padding: 18px; }
    .adc-title-bar { margin: -18px -18px 18px; }
    .adc-tabs { width: 100%; }
    .adc-tab { flex: 1 1 45%; justify-content: center; }
    .adc-currency { width: 100%; justify-content: space-between; }
    .adc-grid, .adc-tiles { grid-template-columns: minmax(0, 1fr); }
    .adc-key { font-size: 1.8em; }
    .adc-solve-btn { flex-basis: 50%; }
    .adc-actions .adc-btn { flex: 1; justify-content: center; }
}
