/* Airline Fit Check. Scoped to .cot-fit; colours follow the theme's light/dark palette. */
.cot-fit {
	--fit-accent: #1f4fff;
	--fit-on-accent: #ffffff;
	--fit-good: #0b5a43;
	--fit-good-bg: #dff3ea;
	--fit-bad: #8a3805;
	--fit-bad-bg: #fde8d6;
	--fit-line: color-mix(in srgb, var(--ink, #0d0d0d) 16%, transparent);
	--fit-line-strong: color-mix(in srgb, var(--ink, #0d0d0d) 34%, transparent);
	--fit-on-ink-muted: color-mix(in srgb, var(--paper, #ffffff) 72%, var(--ink, #0d0d0d));
	--fit-radius: 20px;
	--fit-pad: clamp(18px, 3vw, 28px);
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 4vw, 40px);
	padding: clamp(24px, 4vw, 40px) 0 72px;
	font-family: var(--font-display, 'Archivo', system-ui, sans-serif);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink, #0d0d0d);
}
html[data-color-scheme=dark] .cot-fit {
	--fit-accent: #8fa8ff;
	--fit-on-accent: #0d0d0d;
	--fit-good: #9fe3c4;
	--fit-good-bg: #12382b;
	--fit-bad: #ffc79d;
	--fit-bad-bg: #45230c;
}

.cot-fit *,
.cot-fit *::before,
.cot-fit *::after { box-sizing: border-box; }
.cot-fit [hidden] { display: none !important; }
.cot-fit p,
.cot-fit h1,
.cot-fit h2,
.cot-fit h3,
.cot-fit ul { margin: 0; }
.cot-fit h1,
.cot-fit h2,
.cot-fit h3 { font-family: inherit; text-transform: none; color: inherit; }
.cot-fit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cot-fit button { font: inherit; color: inherit; cursor: pointer; text-transform: none; letter-spacing: 0; }
.cot-fit :focus-visible { outline: 2px solid var(--fit-accent); outline-offset: 3px; }
.cot-fit-mono { font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace); }

/* Hero */
.cot-fit-hero { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; justify-content: space-between; }
.cot-fit-hero-text { flex: 999 1 420px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.cot-fit-kicker { font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 13px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #6b6b6b); }
.cot-fit .cot-fit-title { font-size: clamp(44px, 8vw, 84px); line-height: 0.95; font-weight: 800; letter-spacing: -0.03em; }
.cot-fit-tagline { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.25; font-weight: 600; }
.cot-fit-lede { font-size: 17px; color: var(--muted, #6b6b6b); }
.cot-fit-units { flex: 1 1 220px; max-width: 300px; display: flex; flex-direction: column; gap: 8px; }

/* Shared pieces */
.cot-fit-label { font-size: 15px; font-weight: 700; }
.cot-fit-num { font-family: var(--font-mono, 'JetBrains Mono', monospace); font-weight: 400; color: var(--muted, #6b6b6b); margin-right: 10px; }
.cot-fit-hint { font-size: 15px; line-height: 1.45; color: var(--muted, #6b6b6b); }
.cot-fit-hint--bad { color: var(--fit-bad); font-weight: 600; }
.cot-fit-status { font-size: 17px; color: var(--muted, #6b6b6b); }
.cot-fit-body { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 40px); }
.cot-fit-panel { background: var(--paper, #ffffff); border: 1px solid var(--fit-line); border-radius: var(--fit-radius); padding: var(--fit-pad); }
.cot-fit .cot-fit-h2 { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.cot-fit .cot-fit-h2--big { font-size: clamp(28px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.02em; }
.cot-fit .cot-fit-h3 { font-size: 18px; line-height: 1.25; font-weight: 700; }

.cot-fit-seg { display: flex; gap: 4px; padding: 4px; background: var(--paper2, #f4f4f2); border: 1px solid var(--fit-line); border-radius: 999px; }
.cot-fit-seg--type { max-width: 420px; }
.cot-fit .cot-fit-seg button { flex: 1 1 0; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font-size: 15px; font-weight: 600; white-space: nowrap; }
.cot-fit .cot-fit-seg button[aria-pressed=true] { background: var(--ink, #0d0d0d); color: var(--paper, #ffffff); }

.cot-fit .cot-fit-pill,
.cot-fit .cot-fit-row { min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--fit-line-strong); border-radius: 999px; background: var(--paper, #ffffff); font-size: 15px; font-weight: 600; line-height: 1.3; text-align: left; }
.cot-fit .cot-fit-row { border-radius: 14px; width: 100%; }
.cot-fit .cot-fit-pill[aria-pressed=true],
.cot-fit .cot-fit-row[aria-pressed=true] { background: var(--fit-accent); border-color: var(--fit-accent); color: var(--fit-on-accent); }
.cot-fit-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cot-fit .cot-fit-input { width: 100%; height: 48px; padding: 0 16px; border: 1.5px solid var(--fit-line-strong); border-radius: 12px; background: var(--paper, #ffffff); color: var(--ink, #0d0d0d); font: 500 16px/1.2 var(--font-display, 'Archivo', sans-serif); }
.cot-fit .cot-fit-input.cot-fit-mono { font-family: var(--font-mono, 'JetBrains Mono', monospace); }
.cot-fit .cot-fit-input::placeholder { color: var(--muted, #6b6b6b); opacity: 1; }
.cot-fit .cot-fit-range { width: 100%; height: 44px; margin: 0; accent-color: var(--fit-accent); }

/* Setup: controls + limit */
.cot-fit-setup { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.4vw, 24px); align-items: stretch; }
.cot-fit-controls { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.cot-fit-step { display: flex; flex-direction: column; gap: 10px; }
.cot-fit-step-head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.cot-fit-current { font-size: 18px; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.cot-fit-matches { display: flex; flex-direction: column; gap: 6px; }
.cot-fit-fares { display: flex; flex-wrap: wrap; gap: 8px; }

.cot-fit-limit { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; background: var(--ink, #0d0d0d); color: var(--paper, #ffffff); border-color: var(--ink, #0d0d0d); }
.cot-fit-limit .cot-fit-kicker,
.cot-fit-limit .cot-fit-limit-note,
.cot-fit-limit .cot-fit-sizer-label { color: var(--fit-on-ink-muted); }
.cot-fit-limit-title { font-size: 22px; line-height: 1.2; font-weight: 700; }
.cot-fit-limit-dims { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.cot-fit-limit-none { font-size: 17px; }
.cot-fit-sizer { display: flex; gap: 28px; align-items: flex-end; }
.cot-fit-sizer-view { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cot-fit-sizer-box { display: block; border: 2px dashed currentColor; border-radius: 10px; background: color-mix(in srgb, currentColor 8%, transparent); }
.cot-fit-sizer-label { font-size: 13px; font-weight: 400; }
.cot-fit-limit-facts { display: flex; flex-direction: column; gap: 8px; margin-top: auto; font-size: 15px; line-height: 1.4; }
.cot-fit-limit-weight { font-size: 18px; font-weight: 700; }
.cot-fit-limit-allowance { font-weight: 700; }

/* Results */
.cot-fit-results,
.cot-fit-near { display: flex; flex-direction: column; gap: 18px; }
.cot-fit-results-head { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-end; justify-content: space-between; }
.cot-fit-results-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cot-fit-empty { padding: 24px; border: 1px solid var(--fit-line); border-radius: 16px; font-size: 17px; }
.cot-fit-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cot-fit-card { display: flex; gap: 16px; align-items: flex-start; min-width: 0; padding: 16px; background: var(--paper, #ffffff); border: 1px solid var(--fit-line); border-radius: 16px; }
.cot-fit-card-sizer { position: relative; flex: none; width: 62px; height: 78px; margin-top: 2px; }
.cot-fit-card-limit,
.cot-fit-card-bag { position: absolute; left: 0; bottom: 0; border-radius: 6px; }
.cot-fit-card-limit { border: 1.5px dashed var(--muted, #6b6b6b); }
.cot-fit-card-bag { background: var(--fit-accent); opacity: 0.85; }
.cot-fit-card-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cot-fit-card-brand { font-size: 12px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #6b6b6b); }
.cot-fit .cot-fit-card-name { font-size: 17px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.cot-fit .cot-fit-card-name a { text-decoration: none; }
.cot-fit .cot-fit-card-name a:hover { text-decoration: underline; }
.cot-fit-card-meta { font-size: 15px; font-weight: 700; }
.cot-fit-card-dims { font-size: 13px; font-weight: 400; color: var(--muted, #6b6b6b); }
.cot-fit-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cot-fit-tag { padding: 5px 10px; border-radius: 999px; background: var(--paper2, #f4f4f2); font-size: 13px; font-weight: 600; line-height: 1.3; }
.cot-fit-tag--good { background: var(--fit-good-bg); color: var(--fit-good); }
.cot-fit-tag--bad { background: var(--fit-bad-bg); color: var(--fit-bad); flex: none; }
.cot-fit-card-links { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 15px; font-weight: 600; }
.cot-fit-card-links a { padding: 10px 0; }
.cot-fit .cot-fit-more { align-self: center; min-height: 48px; padding: 0 28px; border: 1.5px solid var(--ink, #0d0d0d); border-radius: 999px; background: var(--paper, #ffffff); font-size: 16px; font-weight: 600; }

.cot-fit-near-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cot-fit-near-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; padding: 14px 16px; border: 1px solid var(--fit-line); border-radius: 16px; }
.cot-fit-near-card > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* Own bag */
.cot-fit-own { display: flex; flex-direction: column; gap: 16px; }
.cot-fit-own-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; max-width: 760px; }
.cot-fit-field { display: flex; flex-direction: column; gap: 6px; }
.cot-fit-field label { font-size: 14px; font-weight: 600; }
.cot-fit-verdict { align-self: flex-start; padding: 12px 18px; border-radius: 12px; background: var(--paper2, #f4f4f2); color: var(--muted, #6b6b6b); font-size: 17px; line-height: 1.4; }
.cot-fit-verdict--good { background: var(--fit-good-bg); color: var(--fit-good); font-weight: 700; }
.cot-fit-verdict--bad { background: var(--fit-bad-bg); color: var(--fit-bad); font-weight: 700; }
.cot-fit-own-airlines { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.cot-fit-own-airlines details { border-top: 1px solid var(--fit-line); padding-top: 4px; }
.cot-fit-own-airlines summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.cot-fit-own-airlines ul { list-style: none; padding: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2px 24px; }
.cot-fit-own-airlines li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.cot-fit-own-airlines li span { font-size: 13px; color: var(--muted, #6b6b6b); }
.cot-fit .cot-fit-textbutton { padding: 6px 0; border: 0; background: none; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; }

.cot-fit-fine { max-width: 760px; font-size: 14px; color: var(--muted, #6b6b6b); }

/* Summary bar: phones only */
.cot-fit-bar { display: none; }

@media (max-width: 700px) {
	.cot-fit { padding-bottom: 0; }
	.cot-fit-units { max-width: none; }
	.cot-fit-chips--wide { display: none; }
	.cot-fit-fares { flex-direction: column; }
	.cot-fit .cot-fit-fares .cot-fit-pill { border-radius: 14px; }
	.cot-fit-seg--type { max-width: none; }
	.cot-fit-results-head .cot-fit-chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--container-pad, 16px)); margin-inline: calc(var(--container-pad, 16px) * -1); padding: 0 var(--container-pad, 16px) 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
	.cot-fit-results-head .cot-fit-chips::-webkit-scrollbar { display: none; }
	.cot-fit-results-head .cot-fit-pill { flex: none; white-space: nowrap; scroll-snap-align: start; }
	.cot-fit-limit-facts { margin-top: 0; }
	.cot-fit .cot-fit-more { align-self: stretch; }
	.cot-fit-own-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cot-fit-verdict { align-self: stretch; }
	.cot-fit-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-inline: calc(var(--container-pad, 16px) * -1); padding: 10px var(--container-pad, 16px) calc(10px + env(safe-area-inset-bottom)); background: var(--ink, #0d0d0d); color: var(--paper, #ffffff); }
	.cot-fit-bar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
	.cot-fit-bar-top { font-size: 13px; color: var(--fit-on-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.cot-fit-bar-main { font-size: 15px; font-weight: 700; }
	.cot-fit .cot-fit-bar-link { flex: none; display: flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--paper, #ffffff); color: var(--ink, #0d0d0d); font-size: 15px; font-weight: 700; text-decoration: none; }
}

@media (prefers-reduced-motion: no-preference) {
	.cot-fit-pill,
	.cot-fit-row,
	.cot-fit-seg button { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
}
