/* OutdoorBudget – Cycling & Other Activities Calculators */
.obca {
	--obca-brand: #9a3f16;
	--obca-brand-dark: #5a250e;
	--obca-brand-soft: #fbede5;
	--obca-accent: #1f7a6d;
	--obca-accent-soft: #e8f4f2;
	--obca-text: #2a1d17;
	--obca-muted: #6e5d54;
	--obca-border: #ead9cf;
	--obca-bg: #ffffff;
	--obca-soft: #fbf7f4;
	--obca-danger: #b3261e;
	--obca-radius: 14px;
	--obca-shadow: 0 1px 2px rgba(50, 25, 12, .06), 0 6px 20px rgba(50, 25, 12, .06);
	color: var(--obca-text);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.obca *, .obca *::before, .obca *::after { box-sizing: border-box; }
.obca-calc {
	background: var(--obca-bg);
	border: 1px solid var(--obca-border);
	border-radius: var(--obca-radius);
	box-shadow: var(--obca-shadow);
	padding: 20px;
	margin: 0 0 2em;
	max-width: 100%;
	overflow: hidden;
}

/* Header */
.obca-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.obca-head__icon {
	flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px;
	background: var(--obca-brand-soft); display: grid; place-items: center; font-size: 26px;
}
.obca .obca-head__title { font-size: 1.35rem; font-weight: 700; margin: 0 0 2px; line-height: 1.25; color: var(--obca-brand-dark); }
.obca .obca-head__sub { margin: 0; color: var(--obca-muted); font-size: .95rem; }
.obca .obca-head__sub strong { color: var(--obca-text); font-weight: 600; }

/* Layout: stacked on phones, form + sticky results on wide screens */
.obca-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 960px) {
	.obca-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); align-items: start; }
	.obca-results { position: sticky; top: 90px; }
}

/* Sections & fields */
.obca .obca-section {
	border: 1px solid var(--obca-border); border-radius: 12px; padding: 14px 14px 4px;
	margin: 0 0 14px; background: var(--obca-soft); min-width: 0;
}
.obca .obca-section legend {
	font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
	color: var(--obca-brand); padding: 0 6px; margin: 0; width: auto; border: 0; float: none;
}
.obca-fields { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.obca-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; min-width: 0; }
.obca .obca-field > label { font-weight: 600; font-size: .92rem; margin: 0; color: var(--obca-text); line-height: 1.3; }
.obca-input {
	display: flex; align-items: stretch; background: #fff; border: 1px solid var(--obca-border);
	border-radius: 10px; overflow: hidden; transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
.obca-input:focus-within { border-color: var(--obca-brand); box-shadow: 0 0 0 3px rgba(154, 63, 22, .15); }
.obca .obca-input input,
.obca .obca-input select {
	flex: 1 1 auto; min-width: 0; width: 100%; border: 0 !important; outline: 0; box-shadow: none !important;
	background: transparent; padding: 9px 11px; margin: 0; font: inherit; font-size: 16px; color: var(--obca-text);
	height: auto; min-height: 42px; border-radius: 0;
}
.obca .obca-input--unit select {
	flex: 0 0 auto; width: auto; max-width: 52%; border-left: 1px solid var(--obca-border) !important;
	background: var(--obca-soft); font-size: 14px; padding-right: 6px; cursor: pointer;
}
.obca-affix {
	display: flex; align-items: center; padding: 0 10px; color: var(--obca-muted); background: var(--obca-soft);
	font-size: .9rem; white-space: nowrap;
}
.obca-affix:first-child { border-right: 1px solid var(--obca-border); }
.obca-affix:last-child { border-left: 1px solid var(--obca-border); }
.obca .obca-help { color: var(--obca-muted); font-size: .8rem; line-height: 1.35; }
.obca .obca-help--block { display: block; margin: 4px 0 10px; }
.obca input[type=number]::-webkit-inner-spin-button { opacity: .5; }

/* Switch */
.obca-field--check { justify-content: center; }
.obca .obca-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .92rem; margin: 0; min-height: 44px; }
.obca .obca-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.obca-switch__ui {
	flex: 0 0 42px; width: 42px; height: 24px; border-radius: 99px; background: #d9c8be; position: relative; transition: background .15s;
}
.obca-switch__ui::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
	background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.obca-switch input:checked + .obca-switch__ui { background: var(--obca-brand); }
.obca-switch input:checked + .obca-switch__ui::after { transform: translateX(18px); }
.obca-switch input:focus-visible + .obca-switch__ui { box-shadow: 0 0 0 3px rgba(154, 63, 22, .3); }
.obca-is-off { opacity: .45; }

/* Buttons */
.obca .obca-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
	padding: 8px 16px; border-radius: 10px; border: 1px solid var(--obca-brand); background: var(--obca-brand);
	color: #fff; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; line-height: 1.2;
	text-transform: none; letter-spacing: normal; box-shadow: none; text-decoration: none;
}
.obca .obca-btn:hover { background: var(--obca-brand-dark); border-color: var(--obca-brand-dark); color: #fff; }
.obca .obca-btn--ghost { background: #fff; color: var(--obca-brand); }
.obca .obca-btn--ghost:hover { background: var(--obca-brand-soft); color: var(--obca-brand-dark); }
.obca .obca-btn--add { margin: 4px 0 12px; }
.obca .obca-btn--icon { min-height: 36px; padding: 4px 10px; border-color: var(--obca-border); background: #fff; color: var(--obca-danger); }
.obca .obca-btn--icon:hover { background: #fdecea; color: var(--obca-danger); border-color: var(--obca-danger); }
.obca-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Results */
.obca-results {
	background: var(--obca-brand-dark); color: #fff; border-radius: var(--obca-radius); padding: 18px;
	min-width: 0;
}
.obca-results .obca-muted { color: rgba(255, 255, 255, .75); }
.obca .obca-total { margin: 0 0 4px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .8); font-weight: 700; }
.obca .obca-total__value { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; line-height: 1.1; margin: 0 0 4px; color: #fff; word-break: break-word; }
.obca .obca-total__sub { margin: 0 0 14px; color: #ffe2b8; font-weight: 600; }
.obca-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.obca-stat { background: rgba(255, 255, 255, .09); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.obca-stat__label { display: block; font-size: .75rem; color: rgba(255, 255, 255, .75); line-height: 1.25; }
.obca-stat__value { display: block; font-size: 1.08rem; font-weight: 700; color: #fff; word-break: break-word; }
.obca .obca-h { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .8); margin: 14px 0 8px; font-weight: 700; }
.obca-bars { list-style: none; margin: 0; padding: 0; }
.obca-bars li { margin: 0 0 8px; padding: 0; font-size: .88rem; }
.obca-bars__row { display: flex; justify-content: space-between; gap: 8px; }
.obca-bars__track { height: 7px; background: rgba(255, 255, 255, .13); border-radius: 99px; margin-top: 3px; overflow: hidden; }
.obca-bars__fill { height: 100%; background: #f7c56b; border-radius: 99px; }
.obca .obca-rtable { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 0; }
.obca .obca-rtable th, .obca .obca-rtable td { padding: 6px 4px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .14); text-align: left; background: transparent; color: #fff; }
.obca .obca-rtable th { font-weight: 600; color: rgba(255, 255, 255, .75); font-size: .78rem; }
.obca .obca-rtable td:last-child, .obca .obca-rtable th:last-child { text-align: right; }
.obca .obca-list { margin: 0; padding: 0 0 0 18px; font-size: .9rem; }
.obca .obca-list li { margin: 0 0 4px; }
.obca .obca-callout { background: rgba(255, 255, 255, .1); border-left: 3px solid #f7c56b; padding: 9px 11px; border-radius: 8px; font-size: .9rem; margin: 12px 0 0; }
.obca .obca-error { background: #fdecea; color: var(--obca-danger); border-radius: 8px; padding: 10px 12px; font-weight: 600; margin: 0; }
.obca-results__foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.obca-results .obca-btn { background: #fff; color: var(--obca-brand-dark); border-color: #fff; }
.obca-results .obca-btn:hover { background: var(--obca-brand-soft); color: var(--obca-brand-dark); }
.obca-results .obca-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.obca-results .obca-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.obca .obca-note { font-size: .8rem; color: rgba(255, 255, 255, .7); margin: 10px 0 0; }
.obca-calc > .obca-note, .obca noscript .obca-note { color: var(--obca-muted); }

/* Cards */
.obca-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 1.5em 0; }
.obca .obca-card {
	display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--obca-border); border-radius: var(--obca-radius);
	background: #fff; text-decoration: none; color: var(--obca-text); box-shadow: var(--obca-shadow); transition: transform .15s, border-color .15s;
}
.obca .obca-card:hover { transform: translateY(-2px); border-color: var(--obca-brand); color: var(--obca-text); }
.obca-card__icon { font-size: 28px; line-height: 1; }
.obca-card__title { font-weight: 700; font-size: 1.05rem; color: var(--obca-brand-dark); }
.obca-card__text { color: var(--obca-muted); font-size: .92rem; flex: 1; }
.obca-card__cta { color: var(--obca-accent); font-weight: 700; font-size: .9rem; }
.obca-related { margin: 2.5em 0 1em; }
.obca .obca-related__title { margin: 0 0 .2em; }
.obca .obca-related__all a { color: var(--obca-brand); font-weight: 700; }

/* Article */
.obca-article { max-width: 860px; margin: 0 auto; line-height: 1.7; }
.obca-article h2 { margin-top: 1.8em; }
.obca-article h3 { margin-top: 1.4em; }
.obca-article table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; display: block; overflow-x: auto; }
.obca-article table th, .obca-article table td { border: 1px solid #ead9cf; padding: 8px 10px; text-align: left; vertical-align: top; }
.obca-article table th { background: #fbede5; }
.obca-article .obca-tip { background: #e8f4f2; border-left: 4px solid #1f7a6d; padding: 12px 16px; border-radius: 8px; margin: 1.2em 0; }
.obca-article .obca-formula { background: #fbf7f4; border: 1px dashed #d6bfb1; padding: 12px 16px; border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95rem; overflow-x: auto; }
.obca-article .obca-kw { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1em 0; }
.obca-article .obca-kw li { background: #fbede5; color: #5a250e; border-radius: 99px; padding: 4px 12px; font-size: .88rem; margin: 0; }
.obca-faq__item { border: 1px solid #ead9cf; border-radius: 10px; margin: 0 0 10px; background: #fff; }
.obca-faq__item summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style-position: inside; }
.obca-faq__a { padding: 0 16px 6px; }

/* Small phones */
@media (max-width: 480px) {
	.obca-calc { padding: 14px; border-radius: 12px; }
	.obca .obca-section { padding: 12px 10px 2px; }
	.obca-fields { grid-template-columns: 1fr; }
	.obca-stats { grid-template-columns: 1fr 1fr; }
	.obca-head__icon { flex-basis: 40px; width: 40px; height: 40px; font-size: 22px; }
}

/* Print: results only */
@media print {
	.obca-form, .obca-results__foot, .obca-related { display: none !important; }
	.obca-results { background: #fff !important; color: #000 !important; }
	.obca-results * { color: #000 !important; }
}
