/*
 * Finobazaar Land calculators. Uses the theme's tokens when present, with
 * brand values as fallbacks. The answer line carries each page: the input
 * on the left of "=", the result large on the right, and the formula
 * written out underneath, so every figure can be checked by hand.
 * Works without land.js.
 */
.fblc {
	--fblc-blue: var(--fb-brand-blue, #105de1);
	--fblc-blue-dark: var(--fb-brand-blue-dark, #0848b8);
	--fblc-surface: var(--fb-brand-blue-surface, #f3f7ff);
	--fblc-ink: var(--fb-brand-black, #111);
	--fblc-text: var(--fb-text, #202020);
	--fblc-muted: var(--fb-text-2, #5f6368);
	--fblc-line: var(--fb-border, #e3e8f0);
	--fblc-warn: var(--fb-warn, #7f5200);
	--fblc-warn-bg: var(--fb-warn-bg, #fdf0d2);
	--fblc-err: var(--fb-error, #a12a2a);
	--fblc-err-bg: var(--fb-error-bg, #fbeaea);
	--fblc-gov: #3d4a5c;
	--fblc-gov-bg: #f4f5f7;
	--fblc-r: 12px;
	color: var(--fblc-text);
	margin: 0 0 2rem;
	overflow-wrap: anywhere;
}
.fblc h2 { color: var(--fblc-ink); font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 .75rem; }
.fblc a:not(.fb-btn) { color: var(--fblc-blue-dark); text-underline-offset: 2px; }
.fblc a.fb-btn { text-decoration: none; }
.fblc a:focus-visible, .fblc button:focus-visible, .fblc input:focus-visible, .fblc select:focus-visible, .fblc summary:focus-visible, .fblc [tabindex]:focus-visible { outline: 3px solid var(--fblc-blue); outline-offset: 2px; }
.fblc-lead { font-size: 1.0625rem; margin: 0 0 1.25rem; max-width: 66ch; }
.fblc-small, .fblc-help { font-size: .875rem; color: var(--fblc-muted); }
.fblc-help { display: block; margin-top: .25rem; }
.fblc a.fblc-tap { display: inline-flex; align-items: center; min-height: 44px; }

/* Form */
.fblc-form { background: var(--fblc-surface); border: 1px solid var(--fblc-line); border-radius: var(--fblc-r); padding: 1rem; margin: 0 0 1.25rem; }
.fblc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem 1rem; }
.fblc-field { margin: 0 0 .75rem; }
.fblc-field label, .fblc-label, .fblc-modes legend, .fblc-section legend { display: block; font-weight: 600; color: var(--fblc-ink); margin: 0 0 .3rem; }
.fblc-field input, .fblc-field select { min-height: 44px; padding: .5rem .75rem; border: 1px solid #c5ccd8; border-radius: 8px; background: #fff; font: inherit; width: 100%; max-width: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.fblc-field select[aria-invalid="true"] { border-color: var(--fblc-warn); }
.fblc-field--short { max-width: 16rem; }
.fblc-field--fixed { align-self: end; }
.fblc-field--fixed strong { display: inline-block; min-height: 44px; line-height: 44px; }
.fblc-modes { border: 0; padding: 0; margin: 0 0 .75rem; }
.fblc-radio { display: flex; gap: .5rem; align-items: center; min-height: 44px; }
.fblc-radio input { width: 1.15rem; height: 1.15rem; }
.fblc-place { margin: .25rem 0 .75rem; }
.fblc-place > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--fblc-blue-dark); }
.fblc-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin: .5rem 0 0; }
.fblc .fbl-sel__btn { white-space: nowrap; flex: 0 0 auto; }

/* Plot sections */
.fblc-section { background: #fff; border: 1px solid var(--fblc-line); border-radius: 10px; padding: .75rem 1rem .25rem; margin: 0 0 .75rem; }
.fblc-section legend { padding: 0 .35rem; margin-left: -.35rem; }
.fblc-dims { border-top: 1px dashed var(--fblc-line); padding-top: .5rem; margin-top: .25rem; }
.fblc-dims__title { font-size: .875rem; color: var(--fblc-muted); margin: 0 0 .4rem; }
.fblc.is-js .fblc-dims[data-fblc-off] { display: none; }
.fblc.is-js .fblc-dims { border-top: 0; padding-top: 0; }
.fblc.is-js .fblc-dims__title { display: none; }
.fblc-section__remove { margin: 0 0 .75rem; }

/* Result */
.fblc-result:empty { display: none; }
.fblc-answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin: 0 0 .5rem; font-variant-numeric: tabular-nums; }
.fblc-answer span { color: var(--fblc-muted); font-size: 1.0625rem; }
.fblc-answer strong { font-size: clamp(1.6rem, 5vw, 2.25rem); line-height: 1.15; color: var(--fblc-ink); letter-spacing: -.01em; }
.fblc-formula { border-left: 3px solid var(--fblc-blue); padding: .35rem 0 .35rem .75rem; margin: 0 0 1rem; color: var(--fblc-text); font-variant-numeric: tabular-nums; }
.fblc-table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.fblc-table caption { text-align: start; font-weight: 600; color: var(--fblc-ink); padding: 0 0 .4rem; }
.fblc-table th, .fblc-table td { text-align: start; padding: .55rem .6rem; border-bottom: 1px solid var(--fblc-line); vertical-align: top; }
.fblc-table thead th { font-size: .875rem; color: var(--fblc-muted); }
.fblc-table tbody th { font-weight: 500; }
.fblc-table td { font-weight: 600; color: var(--fblc-ink); }
.fblc-table tr.is-from th, .fblc-table tr.is-from td { background: var(--fblc-surface); }
.fblc-table .fblc-formula-cell, .fblc-table--items td:nth-child(2) { font-weight: 400; color: var(--fblc-text); }
.fblc-table .fblc-num { text-align: end; white-space: nowrap; }
.fblc-table tfoot th, .fblc-table tfoot td { border-top: 2px solid var(--fblc-ink); border-bottom: 0; font-weight: 700; }
.fblc-table--defs td { font-weight: 400; }
.fblc-next { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: .25rem 0 1rem; }

/* Regional rules and official records */
.fblc-rules { background: #fafbfc; border: 1px solid var(--fblc-line); border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1rem; }
.fblc-rules__title { font-weight: 600; margin: 0 0 .35rem; }
.fblc-rules ul { margin: 0 0 .5rem; padding-inline-start: 1.1rem; }
.fblc-official { background: var(--fblc-gov-bg); border-inline-start: 6px solid var(--fblc-gov); border-radius: 0 var(--fblc-r) var(--fblc-r) 0; padding: .85rem 1rem; margin: 0 0 1rem; }
.fblc-official__title { font-weight: 600; margin: 0; }
.fblc-official__rate { font-size: 1.5rem; font-weight: 700; color: var(--fblc-ink); margin: .2rem 0 .5rem; font-variant-numeric: tabular-nums; }
.fblc-official__rate span { font-size: 1rem; font-weight: 400; color: var(--fblc-muted); }
.fblc-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem 1rem; margin: 0 0 .5rem; }
.fblc-cells dt { font-size: .8125rem; color: var(--fblc-muted); }
.fblc-cells dd { margin: 0; font-weight: 600; }
.fblc-official a, .fblc-rules a, .fblc-source a, .fblc-help a { display: inline-block; padding-block: 4px; }

/* Notices */
.fblc-notice { border-radius: var(--fblc-r); padding: .75rem 1rem; margin: 0 0 1rem; border: 1px solid #cddcf8; background: var(--fblc-surface); }
.fblc-notice p { margin: 0; }
.fblc-notice ul { margin: .4rem 0 0 1.1rem; padding: 0; }
.fblc-notice--error { background: var(--fblc-err-bg); border-color: #efc4c4; color: var(--fblc-err); }
.fblc-notice--warn { background: var(--fblc-warn-bg); border-color: #f0dca8; color: var(--fblc-warn); }
.fblc-disclaimer { border-top: 1px solid var(--fblc-line); margin: 1.5rem 0 1rem; padding-top: .75rem; font-size: .875rem; color: var(--fblc-muted); max-width: 72ch; }
.fblc-disclaimer p { margin: 0 0 .4rem; }
.fblc-list { padding-inline-start: 1.1rem; }
.fblc-list li { margin: 0 0 .4rem; max-width: 72ch; }

/* Related and hub */
.fblc-related { margin: 1rem 0 0; }
.fblc-related__title { font-weight: 600; margin: 0 0 .25rem; }
.fblc-related ul, .fblc ul.fblc-tools { list-style: none; margin: 0; padding: 0; }
.fblc-related ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.fblc-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.fblc-tool { border: 1px solid var(--fblc-line); border-radius: var(--fblc-r); padding: 1rem; background: #fff; }
.fblc-tool__link { font-weight: 700; font-size: 1.0625rem; display: inline-flex; min-height: 44px; align-items: center; }
.fblc-tool p { margin: .25rem 0 0; color: var(--fblc-muted); }

@media (max-width: 640px) {
	.fblc-form { padding: .85rem; }
	.fblc-row { grid-template-columns: 1fr; gap: 0; }
	.fblc-field--short { max-width: none; }
	.fblc-table--items thead { display: none; }
	.fblc-table--items tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--fblc-line); }
	.fblc-table--items th, .fblc-table--items td { border: 0; }
	.fblc-table--items td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; padding-top: 0; }
	.fblc-table--items td.fblc-num { grid-column: 2; grid-row: 1; }
	.fblc-table--items tfoot tr { border-bottom: 0; border-top: 2px solid var(--fblc-ink); }
	.fblc-table--items tfoot th, .fblc-table--items tfoot td { border: 0; }
}
@media (prefers-reduced-motion: reduce) { .fblc * { scroll-behavior: auto !important; } }
/* Theme spacing between blocks does not apply inside the calculators. */
.fblc .fblc-row > *, .fblc .fblc-form > * + *, .fblc .fblc-result > * + * { margin-top: 0; }
.fblc .fblc-row { align-items: start; }
.fblc table.fblc-table { width: 100%; max-width: 100%; }
.fblc .fb-btn { max-width: 100%; white-space: normal; text-align: center; height: auto; min-height: 44px; }
