/* A/B Test Significance Calculator (prefix abt-). Two tabs: test results (variants -> verdict, tiles,
   CI chart, table) and a sample-size planner (baseline, MDE, significance, power -> visitors and days). */
.abt-card { padding: 28px; }
.abt-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; }
.abt-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }

.abt-tabs { display: flex; border: 1px solid #e5e7eb; border-radius: 30px; padding: 4px; background: #f7f8fa; margin-bottom: 22px; }
.abt-tab { flex: 1; border: none; background: none; padding: 10px 18px; border-radius: 26px; font-weight: 700; font-size: .92em; color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s ease, color .2s ease; }
.abt-tab.active { background: var(--site-dark); color: #fff; }
.abt-tab:hover:not(.active) { color: var(--site-dark); }
.abt-panel { display: none; }
.abt-panel.active { display: block; }

.abt-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.abt-ghost { font: inherit; font-size: .85em; font-weight: 700; color: var(--site-dark); background: #fff; border: 1px dashed var(--site-dark); border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: background .2s ease, color .2s ease; display: inline-flex; align-items: center; gap: 8px; }
.abt-ghost:hover { background: var(--site-dark); color: #fff; border-style: solid; }
.abt-ghost[disabled] { opacity: .5; cursor: default; }
.abt-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.abt-group { margin-bottom: 20px; }
.abt-group-title { font-size: .78em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.abt-group-title i { color: var(--site-accent); }
.abt-variants { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.abt-variant { border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; background: #fafbfc; position: relative; }
.abt-variant.abt-hidden { display: none; }
.abt-variant-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.abt-variant-name { font-weight: 800; color: #23272f; display: flex; align-items: center; gap: 8px; }
.abt-swatch { width: 12px; height: 12px; border-radius: 3px; background: #6b7280; display: inline-block; }
.abt-variant[data-variant="a"] .abt-swatch { background: #6b7280; }
.abt-variant[data-variant="b"] .abt-swatch { background: #4f46e5; }
.abt-variant[data-variant="c"] .abt-swatch { background: #0e7490; }
.abt-variant-tag { font-size: .72em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; }
.abt-remove { border: none; background: none; color: #6b7280; cursor: pointer; font-size: .9em; padding: 4px; }
.abt-remove:hover { color: #b91c1c; }
.abt-field { margin-bottom: 10px; }
.abt-field:last-child { margin-bottom: 0; }
.abt-field label, .abt-field .abt-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .88em; color: #23272f; }
.abt-input-row { display: flex; align-items: center; gap: 8px; border: 1px solid #ddd; border-radius: 8px; padding: 9px 12px; background: #fff; }
.abt-input-row:focus-within { border-color: var(--site-dark); }
.abt-input-row input { border: none; outline: none; width: 100%; min-width: 0; font-size: 1em; background: none; color: #23272f; font-variant-numeric: tabular-nums; }
.abt-suffix { font-size: .8em; color: #6b7280; flex: none; white-space: nowrap; }
.abt-field.abt-bad .abt-input-row { border-color: #b91c1c; background: #fef2f2; }
.abt-field small { display: block; color: #6b7280; font-size: .8em; margin-top: 5px; }
.abt-field.abt-bad small { color: #b91c1c; font-weight: 600; }
.abt-rate-line { font-size: .82em; color: #6b7280; margin-top: 8px; font-variant-numeric: tabular-nums; }
.abt-rate-line strong { color: #23272f; }
.abt-field select { border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; width: 100%; font-size: 1em; outline: none; box-sizing: border-box; background: #fff; color: #23272f; }
.abt-field select:focus { border-color: var(--site-dark); }
.abt-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.abt-seg { display: flex; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; min-height: 42px; }
.abt-seg-btn { flex: 1; border: none; background: #f7f8fa; color: #6b7280; font-size: .8em; font-weight: 700; padding: 0 8px; cursor: pointer; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.abt-seg-btn:not(:first-child) { border-left: 1px solid #ddd; }
.abt-seg-btn.active { background: var(--site-dark); color: #fff; }
.abt-seg-btn:hover:not(.active) { color: var(--site-dark); }

.abt-verdict { border-radius: 10px; padding: 18px 20px; display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; background: #eef0f3; border: 1px solid #e3e6ea; margin-bottom: 16px; }
.abt-verdict.abt-win { background: #ecfdf5; border-color: #a7f3d0; }
.abt-verdict.abt-lose { background: #fef2f2; border-color: #fecaca; }
.abt-verdict.abt-wait { grid-template-columns: 1fr; }
.abt-chip { display: inline-block; font-size: .72em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; border-radius: 99px; padding: 4px 12px; background: #d1d5db; color: #374151; grid-column: 1 / -1; justify-self: start; }
.abt-win .abt-chip { background: #047857; color: #fff; }
.abt-lose .abt-chip { background: #b91c1c; color: #fff; }
.abt-headline { font-size: 2.1em; font-weight: 800; line-height: 1.05; color: #23272f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.abt-headline small { display: block; font-size: .45em; font-weight: 700; color: #6b7280; margin-top: 4px; letter-spacing: .02em; }
.abt-win .abt-headline { color: #047857; }
.abt-lose .abt-headline { color: #b91c1c; }
.abt-verdict-text { margin: 0; font-size: .95em; color: #23272f; }
.abt-verdict-text + .abt-verdict-text { margin-top: 6px; color: #4b5563; font-size: .9em; }
.abt-verdict-text strong { font-weight: 700; }

.abt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.abt-tile { background: #fafbfc; border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; }
.abt-tile-k { font-size: .76em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.abt-tile-v { font-size: 1.25em; font-weight: 800; color: var(--site-dark); font-variant-numeric: tabular-nums; }
.abt-tile-s { font-size: .8em; color: #6b7280; margin-top: 4px; }

.abt-section { margin-top: 22px; }
.abt-section h3 { font-size: 1em; font-weight: 700; color: #23272f; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.abt-section h3 i { color: var(--site-accent); }
.abt-chart-wrap { border: 1px solid #eee; border-radius: 10px; padding: 12px 14px 6px; background: #fff; }
.abt-chart { width: 100%; height: auto; display: block; }
.abt-chart .abt-axis { stroke: #d1d5db; stroke-width: 1; }
.abt-chart .abt-grid { stroke: #eee; stroke-width: 1; }
.abt-chart .abt-whisker { stroke: #23272f; stroke-width: 2; }
.abt-chart text { font-family: inherit; fill: #6b7280; font-size: 11px; }
.abt-chart text.abt-bar-label { fill: #23272f; font-weight: 700; font-size: 12px; }
.abt-chart-note { font-size: .8em; color: #6b7280; margin: 8px 0 4px; }

.abt-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.abt-table th { text-align: left; font-size: .78em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; border-bottom: 2px solid #e5e7eb; white-space: nowrap; }
.abt-table td { padding: 9px 8px; border-bottom: 1px solid #eee; vertical-align: top; color: #23272f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.abt-table td:first-child { font-weight: 700; }
.abt-table tr:last-child td { border-bottom: none; }
.abt-table-wrap { overflow-x: auto; border: 1px solid #eee; border-radius: 10px; }
.abt-note { margin: 10px 0 0; font-size: .86em; color: #6b7280; }
.abt-note.abt-warn { color: #b45309; font-weight: 600; }
.abt-note.abt-warn i { margin-right: 6px; }

/* planner */
.abt-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.abt-plan-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.abt-plan-tiles .abt-tile-v { font-size: 1.5em; }
.abt-copyline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eee; }
.abt-copyline p { margin: 0; font-size: .82em; color: #6b7280; }

@media (max-width: 900px) {
    .abt-variants, .abt-options, .abt-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .abt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .abt-card { padding: 18px; }
    .abt-title-bar { margin: -18px -18px 18px; }
    .abt-variants, .abt-options, .abt-plan-grid, .abt-tiles, .abt-plan-tiles { grid-template-columns: minmax(0, 1fr); }
    .abt-verdict { grid-template-columns: 1fr; }
    .abt-headline { font-size: 1.7em; white-space: normal; }
    .abt-tab { padding: 10px 8px; font-size: .85em; }
    .abt-ghost { width: 100%; justify-content: center; }
    .abt-actions { width: 100%; }
    .abt-actions .abt-ghost { flex: 1; }
}
