/* ============================================
   Scotland Midge Forecast V2
   Prefix: .mf-
   ============================================ */
.mf-page {
    --mf-l0: #e6ebf0; --mf-l1: #35a86b; --mf-l2: #9cc84a; --mf-l3: #f2c14e; --mf-l4: #f08a3c; --mf-l5: #d9463b;
    --mf-t0: #4b5563; --mf-t1: #0b2a17; --mf-t2: #1f2a12; --mf-t3: #3a2a00; --mf-t4: #3b1a00; --mf-t5: #ffffff;
    --mf-sea: #e9f0f6; --mf-land: #f6f4ef; --mf-line: rgba(26, 58, 92, 0.14); --mf-ink: #16202b; --mf-muted: #5b6673;
}
.mf-page.mf-cbon {
    --mf-l1: #bfa8f0; --mf-l2: #9b7de3; --mf-l3: #7753cf; --mf-l4: #5531ab; --mf-l5: #351872;
    --mf-t1: #1d1238; --mf-t2: #1d1238; --mf-t3: #ffffff; --mf-t4: #ffffff; --mf-t5: #ffffff;
}
.l0 { --c: var(--mf-l0); --t: var(--mf-t0); }
.l1 { --c: var(--mf-l1); --t: var(--mf-t1); }
.l2 { --c: var(--mf-l2); --t: var(--mf-t2); }
.l3 { --c: var(--mf-l3); --t: var(--mf-t3); }
.l4 { --c: var(--mf-l4); --t: var(--mf-t4); }
.l5 { --c: var(--mf-l5); --t: var(--mf-t5); }

.mf-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mf-preview-bar { position: fixed; left: 12px; bottom: 12px; z-index: 100000; max-width: calc(100% - 24px); background: #d4a84b; color: #0f2540; font-size: 0.82rem; line-height: 1.4; padding: 0.5rem 0.9rem; border-radius: 10px; box-shadow: 0 6px 18px rgba(15, 37, 64, 0.25); }
.mf-preview-bar a { color: #0f2540; font-weight: 600; }

/* Hero */
.mf-hero { padding-bottom: 3rem; }
.mf-hero .section-label a { color: inherit; text-decoration: none; }
.mf-hero .section-label a:hover { text-decoration: underline; }
.mf-updated { margin: 1rem 0 0; font-size: 0.85rem; opacity: 0.75; }
.mf-wrap { padding-top: 2rem; }
.mf-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mf-muted); margin: 0 0 0.25rem; }
.mf-sub { color: var(--mf-muted); max-width: 760px; margin: -0.5rem 0 1.5rem; }

/* Toolbar */
.mf-toolbar { display: flex; gap: 0.75rem; align-items: stretch; margin-bottom: 1rem; flex-wrap: wrap; }
.mf-search { position: relative; flex: 1 1 320px; display: flex; align-items: center; background: #fff; border: 1px solid var(--mf-line); border-radius: 10px; padding: 0 0.75rem; }
.mf-search:focus-within { border-color: var(--scottish-blue); box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12); }
.mf-search svg { width: 20px; height: 20px; fill: none; stroke: var(--mf-muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.mf-search input { border: 0; outline: 0; font: inherit; font-size: 1rem; padding: 0.85rem 0.6rem; width: 100%; background: transparent; color: var(--mf-ink); }
.mf-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--mf-line); border-radius: 10px; list-style: none; margin: 0; padding: 0.35rem; z-index: 30; box-shadow: 0 12px 30px rgba(15, 37, 64, 0.15); max-height: 340px; overflow: auto; }
.mf-suggest li { padding: 0.55rem 0.7rem; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.mf-suggest li small { color: var(--mf-muted); white-space: nowrap; }
.mf-suggest li[aria-selected="true"], .mf-suggest li:hover { background: var(--highland-mist); }
.mf-suggest li.note { color: var(--mf-muted); cursor: default; font-size: 0.85rem; }
.mf-locate { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--scottish-blue); color: #fff; border: 0; border-radius: 10px; padding: 0 1.1rem; font: inherit; font-size: 0.95rem; cursor: pointer; min-height: 48px; }
.mf-locate:hover { background: var(--scottish-blue-deep); }
.mf-locate svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.mf-saved { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; align-items: center; font-size: 0.85rem; color: var(--mf-muted); }
.mf-saved button { border: 1px solid var(--mf-line); background: #fff; border-radius: 999px; padding: 0.3rem 0.4rem 0.3rem 0.8rem; font: inherit; font-size: 0.85rem; cursor: pointer; display: inline-flex; gap: 0.4rem; align-items: center; color: var(--mf-ink); }

/* Day selector */
.mf-days { display: grid; grid-template-columns: repeat(7, minmax(72px, 1fr)); gap: 0.5rem; margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.mf-days::-webkit-scrollbar { display: none; }
.mf-day { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; background: #fff; border: 1px solid var(--mf-line); border-radius: 10px; padding: 0.55rem 0.4rem 0.5rem; cursor: pointer; font: inherit; color: var(--mf-ink); }
.mf-day .d { font-weight: 600; font-size: 0.9rem; }
.mf-day .n { font-size: 0.75rem; color: var(--mf-muted); }
.mf-day .bar { width: 70%; height: 5px; border-radius: 3px; background: var(--c); margin-top: 0.3rem; }
.mf-day:hover { border-color: var(--scottish-blue); }
.mf-day.on { background: var(--scottish-blue); border-color: var(--scottish-blue); color: #fff; }
.mf-day.on .n { color: rgba(255, 255, 255, 0.8); }

/* Layout */
.mf-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.mf-mapcard, .mf-panel { background: #fff; border: 1px solid var(--mf-line); border-radius: 14px; }
.mf-mapcard { padding: 1rem 1rem 0.75rem; }
.mf-panel { padding: 1.25rem 1.35rem; position: sticky; top: 90px; }
.mf-map-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.mf-map-head h2 { font-size: 1.35rem; margin: 0; color: var(--scottish-blue-deep); }
.mf-map-head h2 span { color: var(--mf-muted); font-size: 1rem; font-family: 'DM Sans', sans-serif; margin-left: 0.35rem; }
.mf-cb { border: 1px solid var(--mf-line); background: #fff; border-radius: 999px; font: inherit; font-size: 0.78rem; padding: 0.35rem 0.8rem; cursor: pointer; color: var(--mf-ink); white-space: nowrap; }
.mf-cb[aria-pressed="true"] { background: var(--scottish-blue); color: #fff; border-color: var(--scottish-blue); }

/* Map */
.mf-map { position: relative; background: var(--mf-sea); border-radius: 10px; overflow: hidden; }
.mf-svg { display: block; width: 100%; height: auto; max-height: 78vh; }
.mf-land { fill: #f4f2ec; }
.mf-hexes { opacity: 0.8; }
.mf-hexes use { stroke: none; cursor: pointer; }
.mf-hexes use.dim { opacity: 0.22; }
.mf-mesh { pointer-events: none; }
.mf-svg pattern path { fill: none; stroke: #ffffff; stroke-width: 0.55; stroke-opacity: 0.5; }
.mf-coast { fill: none; stroke: #1a3a5c; stroke-width: 0.6; opacity: 0.4; pointer-events: none; }
.mf-hov { fill: rgba(255, 255, 255, 0.18); stroke: #0f2540; stroke-width: 1.2; stroke-opacity: 0.55; pointer-events: none; }
.mf-inset { fill: none; stroke: #7b8591; stroke-width: 0.8; stroke-dasharray: 3 2; }
.mf-inset-label { font: 11px 'DM Sans', sans-serif; fill: #5b6673; }
.mf-labels { pointer-events: none; }
.mf-lab circle { fill: #0f2540; stroke: #fff; stroke-width: 1.2; }
.mf-lab text { font: 500 13px 'DM Sans', sans-serif; fill: #0f2540; paint-order: stroke; stroke: rgba(255, 255, 255, 0.92); stroke-width: 3.2px; stroke-linejoin: round; }
.mf-sel { fill: none; stroke: #0f2540; stroke-width: 2.4; pointer-events: none; filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9)); }
.mf-pin circle { fill: #0f2540; stroke: #fff; stroke-width: 2.5; pointer-events: none; }
.mf-report-dot { fill: #fff; stroke: #0f2540; stroke-width: 1.5; pointer-events: none; }
.mf-tip { position: absolute; pointer-events: none; background: #0f2540; color: #fff; font-size: 0.8rem; padding: 0.35rem 0.6rem; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -130%); z-index: 5; }
.mf-legend { margin: 0.9rem 0 0.25rem; }
.mf-legend-bar { height: 10px; border-radius: 5px; background: var(--mf-grad); opacity: 0.9; }
.mf-cbon .mf-legend-bar { background: var(--mf-grad-cb); }
.mf-legend ul { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0.4rem 0 0; padding: 0; text-align: center; font-size: 0.78rem; }
.mf-legend li { display: flex; flex-direction: column; line-height: 1.3; }
.mf-legend b { font-weight: 600; color: var(--mf-ink); }
.mf-legend small { color: var(--mf-muted); font-size: 0.7rem; }
.mf-map-note { font-size: 0.8rem; color: var(--mf-muted); margin: 0.25rem 0 0; }

/* Badges and chips */
.mf-badge { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--c); color: var(--t); border-radius: 8px; padding: 0.25rem 0.65rem 0.25rem 0.3rem; font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.mf-badge b { background: rgba(255, 255, 255, 0.35); border-radius: 6px; padding: 0.1rem 0.45rem; min-width: 2.2em; text-align: center; }
.mf-badge.sm { font-size: 0.8rem; }
.mf-badge.lg { font-size: 1.15rem; padding: 0.4rem 0.9rem 0.4rem 0.4rem; }
.mf-chip { display: inline-block; min-width: 2.2em; text-align: center; background: var(--c); color: var(--t); border-radius: 6px; font-weight: 700; font-size: 0.85rem; padding: 0.15rem 0.35rem; }

/* Panel */
.mf-place { font-size: 1.8rem; margin: 0 0 0.15rem; color: var(--scottish-blue-deep); line-height: 1.15; }
.mf-region-link { margin: 0 0 1rem; font-size: 0.9rem; color: var(--mf-muted); }
.mf-region-link a { color: var(--scottish-blue); }
.mf-overview h3 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; font-family: 'DM Sans', sans-serif; font-weight: 600; color: var(--mf-ink); }
.mf-rank { list-style: none; margin: 0; padding: 0; }
.mf-rank li { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--mf-line); }
.mf-rank a { color: var(--mf-ink); text-decoration: none; }
.mf-rank a:hover { text-decoration: underline; }
.mf-hint { font-size: 0.85rem; color: var(--mf-muted); margin-top: 1.2rem; }
.mf-now { display: flex; gap: 0.9rem; align-items: center; background: color-mix(in srgb, var(--c) 16%, #fff); border-radius: 10px; padding: 0.8rem; margin-bottom: 1rem; }
.mf-now-score { background: var(--c); color: var(--t); border-radius: 8px; padding: 0.5rem 0.7rem; text-align: center; min-width: 76px; }
.mf-now-score b { font-size: 2.2rem; line-height: 1; display: block; }
.mf-now-score span { font-size: 0.75rem; opacity: 0.85; }
.mf-now-text strong { display: block; font-size: 1.2rem; color: var(--mf-ink); }
.mf-now-text span { font-size: 0.88rem; color: var(--mf-muted); }
.mf-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; margin-bottom: 1.1rem; }
.mf-wd { display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem; background: transparent; border: 0; border-radius: 10px; padding: 0.4rem 0.3rem; cursor: pointer; font: inherit; font-size: 0.75rem; color: var(--mf-muted); transition: background 0.15s ease, color 0.15s ease; }
.mf-wd > span:first-child { text-align: center; white-space: nowrap; }
.mf-wd .mf-chip { width: 100%; padding: 0.3rem 0; font-size: 0.9rem; border-radius: 6px; }
.mf-wd:hover { background: var(--highland-mist); color: var(--mf-ink); }
.mf-wd.on { background: var(--scottish-blue); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(15, 37, 64, 0.18); }
.mf-wd:focus-visible { outline: 2px solid var(--whisky-gold); outline-offset: 2px; }
.mf-hours-head { display: flex; justify-content: space-between; align-items: baseline; }
.mf-hours-head h3 { font-size: 1.05rem; margin: 0; font-family: 'DM Sans', sans-serif; font-weight: 600; color: var(--mf-ink); }
.mf-hours-head span { font-size: 0.8rem; color: var(--mf-muted); }
.mf-hourly { width: 100%; height: auto; display: block; margin: 0.3rem 0; }
.mf-hourly rect { fill: var(--c); }
.mf-hourly .g { stroke: var(--mf-line); stroke-width: 1; }
.mf-hourly .sun { stroke: #d4a84b; stroke-width: 1.5; stroke-dasharray: 3 2; }
.mf-hourly .sunt { font: 10px 'DM Sans', sans-serif; fill: #8a6a1f; text-anchor: middle; }
.mf-hourly .ax { font: 10px 'DM Sans', sans-serif; fill: var(--mf-muted); }
.mf-window { font-size: 0.92rem; margin: 0.25rem 0 0.5rem; }
.mf-risks { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.85rem; color: var(--mf-muted); flex-wrap: wrap; }
.mf-risks li { display: flex; gap: 0.35rem; align-items: center; }
.mf-wx { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin: 0 0 1rem; }
.mf-wx div { background: var(--highland-mist); border-radius: 8px; padding: 0.5rem 0.6rem; }
.mf-wx dt { font-size: 0.72rem; color: var(--mf-muted); }
.mf-wx dd { margin: 0; font-weight: 600; font-size: 0.95rem; }
.mf-tips { font-size: 0.9rem; } /* bullets: see "Bulleted lists" below */
.mf-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mf-actions a, .mf-actions button { border: 1px solid var(--mf-line); background: #fff; border-radius: 999px; padding: 0.45rem 0.9rem; font: inherit; font-size: 0.85rem; cursor: pointer; color: var(--scottish-blue); text-decoration: none; }
.mf-actions a:hover, .mf-actions button:hover { border-color: var(--scottish-blue); }
.mf-loading { color: var(--mf-muted); padding: 2rem 0; text-align: center; }

/* Sections */
.mf-section { margin-top: 3.5rem; }
.mf-section > h2, .mf-alerts h2, .mf-report h2, .mf-embed-promo h2 { font-size: 2rem; color: var(--scottish-blue-deep); margin: 0 0 1rem; }
.mf-region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.mf-rcard { display: flex; flex-direction: column; gap: 0.75rem; background: #fff; border: 1px solid var(--mf-line); border-radius: 12px; padding: 1rem; text-decoration: none; color: var(--mf-ink); transition: border-color 0.2s, transform 0.2s; }
.mf-rcard:hover { border-color: var(--scottish-blue); transform: translateY(-2px); }
.mf-rcard-top { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.mf-rcard-top b { display: block; font-size: 1rem; }
.mf-rcard-top small { display: block; color: var(--mf-muted); font-size: 0.8rem; margin-top: 0.15rem; }
.mf-rstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mf-rstrip span { background: var(--c); color: var(--t); border-radius: 4px; text-align: center; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0; }
.mf-rstrip i { display: block; font-style: normal; font-weight: 400; font-size: 0.62rem; opacity: 0.85; }
.mf-rrange { font-size: 0.78rem; color: var(--mf-muted); }
.mf-region-sum { display: flex; gap: 1.5rem; align-items: center; background: #fff; border: 1px solid var(--mf-line); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.mf-region-sum p { margin: 0; }

.mf-season-scroll, .mf-table-scroll { overflow-x: auto; }
.mf-season-table { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 0.85rem; }
.mf-season-table th { text-align: left; font-weight: 500; padding: 0.3rem 0.5rem; white-space: nowrap; }
.mf-season-table th a { color: var(--mf-ink); }
.mf-season-table thead th { text-align: center; color: var(--mf-muted); font-size: 0.78rem; }
.mf-season-table td { background: var(--c); color: var(--t); text-align: center; font-weight: 700; border-radius: 4px; padding: 0.4rem 0.3rem; min-width: 44px; }
.mf-weeks { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--mf-line); padding-bottom: 18px; position: relative; }
.mf-weeks span { flex: 1; background: var(--c); border-radius: 3px 3px 0 0; position: relative; min-width: 6px; }
.mf-weeks i { position: absolute; bottom: -18px; left: 0; font-style: normal; font-size: 0.7rem; color: var(--mf-muted); }

.mf-7day { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mf-7day th, .mf-7day td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--mf-line); text-align: left; white-space: nowrap; }
.mf-7day thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mf-muted); font-weight: 500; }
.mf-7day th small, .mf-7day td small { display: block; color: var(--mf-muted); font-size: 0.75rem; }
.mf-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.mf-places a { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border: 1px solid var(--mf-line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--mf-ink); }
.mf-places a:hover { border-color: var(--scottish-blue); }
.mf-places small { color: var(--mf-muted); margin-left: 0.4rem; font-size: 0.75rem; }
.mf-local p { max-width: 820px; line-height: 1.8; }
.mf-local > p { margin-bottom: 1.75rem; }
.mf-local-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; }
.mf-local-grid h3, .mf-related h3 { font-size: 1.45rem; color: var(--scottish-blue); margin: 0 0 0.9rem; }
.mf-related h3 { margin-top: 2.75rem; }

/* Bulleted lists: the site-wide reset strips list padding, which left the bullets hanging in the
   margin. Same dot style as article pages, indented inside the text column with even spacing. */
.mf-local-grid ul, .mf-links, .mf-tips { list-style: none; margin: 0; padding: 0; }
.mf-local-grid li, .mf-links li, .mf-tips li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; line-height: 1.6; }
.mf-local-grid li::before, .mf-links li::before, .mf-tips li::before { content: ''; position: absolute; left: 0.25rem; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--scottish-blue); }
.mf-tips li { margin-bottom: 0.45rem; }
.mf-tips li:last-child { margin-bottom: 1rem; }
.mf-links { max-width: 820px; }
.mf-links a { color: var(--scottish-blue); text-decoration: underline; text-decoration-color: rgba(26, 58, 92, 0.3); text-underline-offset: 3px; }
.mf-links a:hover { text-decoration-color: currentColor; }

/* Alerts */
.mf-alerts { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; background: var(--scottish-blue-deep); color: #fff; border-radius: 16px; padding: 2rem; }
.mf-alerts h2 { color: #fff; }
.mf-alerts .mf-eyebrow { color: var(--whisky-gold); }
.mf-alerts-intro p { opacity: 0.9; line-height: 1.7; }
.mf-alert-form { display: grid; gap: 0.9rem; background: #fff; color: var(--mf-ink); border-radius: 12px; padding: 1.25rem; }
.mf-alert-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 500; }
.mf-alert-form select, .mf-alert-form input[type=email], .mf-alert-form input[type=date] { font: inherit; font-size: 0.95rem; padding: 0.65rem 0.7rem; border: 1px solid var(--mf-line); border-radius: 8px; background: #fff; }
.mf-alert-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.mf-alert-form legend { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.3rem; }
.mf-radio { display: flex !important; grid-template-columns: none; gap: 0.6rem !important; align-items: flex-start; font-weight: 400 !important; border: 1px solid var(--mf-line); border-radius: 8px; padding: 0.6rem 0.7rem; cursor: pointer; }
.mf-radio:has(input:checked) { border-color: var(--scottish-blue); background: var(--highland-mist); }
.mf-radio input { margin-top: 0.2rem; }
.mf-trip { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.mf-trip[hidden] { display: none; }
.mf-consent { display: flex !important; gap: 0.5rem !important; align-items: flex-start; font-weight: 400 !important; font-size: 0.8rem !important; color: var(--mf-muted); }
.mf-hp { position: absolute !important; left: -9999px; }
.mf-alert-form .btn { justify-self: start; }
.mf-msg { border-radius: 8px; padding: 0.7rem 0.9rem; font-size: 0.9rem; grid-column: 1 / -1; }
.mf-msg.ok { background: #e6f4ec; color: #0c5a31; }
.mf-msg.info { background: #eef3f8; color: var(--scottish-blue-deep); }
.mf-msg.err { background: #fbe9e9; color: #8f1f1f; }

/* Reports */
.mf-report { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; background: #fff; border: 1px solid var(--mf-line); border-radius: 16px; padding: 2rem; }
.mf-report-box { background: var(--highland-mist); border-radius: 12px; padding: 1.25rem; }
.mf-report-where { font-size: 0.9rem; margin: 0 0 0.8rem; }
.mf-report-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.mf-report-btns button { background: var(--c); color: var(--t); border: 0; border-radius: 8px; padding: 0.7rem 0.2rem; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.mf-report-btns button:disabled { opacity: 0.5; cursor: default; }
.mf-report-count { font-size: 0.9rem; color: var(--mf-muted); }

/* Embed promo */
.mf-embed-promo { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.mf-embed-promo p { line-height: 1.7; max-width: 620px; }
.mf-embed-demo { border: 0; max-width: 100%; }

/* How it works */
.mf-how-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.mf-how-grid div { background: #fff; border: 1px solid var(--mf-line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.mf-how-grid h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.mf-how-grid p { font-size: 0.92rem; line-height: 1.65; margin: 0; color: var(--peat); }
.mf-how > p a { color: var(--scottish-blue); }

/* FAQ */
.mf-faq details { border-bottom: 1px solid var(--mf-line); padding: 0.9rem 0; }
.mf-faq summary { cursor: pointer; font-weight: 600; font-size: 1.02rem; color: var(--mf-ink); }
.mf-faq details p { margin: 0.6rem 0 0; line-height: 1.75; color: var(--peat); max-width: 820px; }
.mf-faq a { color: var(--scottish-blue); }

/* Widget builder */
.mf-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.mf-builder form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--mf-line); border-radius: 14px; padding: 1.25rem; }
.mf-builder label, .mf-builder legend { font-size: 0.85rem; font-weight: 500; }
.mf-builder fieldset { border: 0; padding: 0; margin: 0; }
.mf-seg { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
.mf-seg label { border: 1px solid var(--mf-line); border-radius: 999px; padding: 0.4rem 0.85rem; cursor: pointer; font-weight: 400; }
.mf-seg label:has(input:checked) { background: var(--scottish-blue); color: #fff; border-color: var(--scottish-blue); }
.mf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mf-builder select { width: 100%; font: inherit; padding: 0.6rem; border: 1px solid var(--mf-line); border-radius: 8px; margin-top: 0.35rem; }
.mf-preview { background: repeating-conic-gradient(#f4f6f8 0 25%, #fff 0 50%) 0 0 / 20px 20px; border: 1px solid var(--mf-line); border-radius: 14px; padding: 1.25rem; display: flex; justify-content: center; }
.mf-preview iframe { border: 0; width: 100%; background: transparent; }
.mf-code { width: 100%; min-height: 150px; font: 0.78rem/1.5 Consolas, monospace; padding: 0.8rem; border: 1px solid var(--mf-line); border-radius: 8px; background: #0f2540; color: #e8eef5; resize: vertical; }

/* Midge kit (affiliate) */
.mf-gear { background: #eef2f6; border-radius: 16px; padding: 2rem; }
.mf-gear-head { max-width: 680px; margin: 0 auto 1.5rem; text-align: center; }
.mf-gear-head h2 { font-size: 2rem; color: var(--scottish-blue-deep); margin: 0 0 0.5rem; }
.mf-gear-head p { margin: 0; color: var(--peat); line-height: 1.7; }
.mf-gear-head b { color: var(--scottish-blue-deep); }
.mf-gear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mf-gear-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; background: #fff; border: 1px solid var(--mf-line); border-radius: 12px; padding: 1.35rem; text-decoration: none; color: var(--mf-ink); transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.mf-gear-card:hover { transform: translateY(-3px); border-color: var(--scottish-blue); box-shadow: 0 10px 24px rgba(15, 37, 64, 0.08); }
.mf-gear-icon { width: 52px; height: 52px; border-radius: 50%; background: #fbf1dc; display: flex; align-items: center; justify-content: center; flex: none; }
.mf-gear-icon svg { width: 28px; height: 28px; fill: none; stroke: #a8771f; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mf-gear-body { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex: 1; }
.mf-gear-title { font-weight: 600; font-size: 1.08rem; color: var(--scottish-blue-deep); }
.mf-gear-desc { font-size: 0.9rem; line-height: 1.6; color: var(--mf-muted); }
.mf-gear-best { align-self: center; margin-top: 0.2rem; font-size: 0.75rem; font-weight: 500; color: var(--scottish-blue); background: var(--highland-mist); border-radius: 999px; padding: 0.2rem 0.65rem; }
.mf-gear-btn { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--scottish-blue); color: #fff; border-radius: 8px; padding: 0.7rem 1rem; font-size: 0.9rem; font-weight: 500; transition: background 0.2s ease; }
.mf-gear-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.mf-gear-card:hover .mf-gear-btn { background: var(--scottish-blue-deep); }
.mf-gear-card:hover .mf-gear-btn svg { transform: translateX(3px); }
.mf-gear-note { margin: 1.1rem 0 0; font-size: 0.78rem; color: var(--mf-muted); text-align: center; }
@media (max-width: 900px) {
    .mf-gear-grid { grid-template-columns: 1fr; gap: 0.75rem; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 768px) {
    .mf-gear { border-radius: 0; margin-left: calc(-1 * var(--mf-gut)); margin-right: calc(-1 * var(--mf-gut)); padding: 2rem var(--mf-gut); }
    .mf-gear-head h2 { font-size: 1.6rem; }
    .mf-gear-card:hover { transform: none; }
}

/* Mobile: flat, edge-to-edge (site convention) */
@media (max-width: 900px) {
    .mf-layout { grid-template-columns: 1fr; }
    .mf-panel { position: static; }
    .mf-alerts, .mf-report, .mf-embed-promo, .mf-builder, .mf-local-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .mf-page { --mf-gut: 1.5rem; }
    .mf-wrap { padding-top: 1rem; }
    .mf-mapcard, .mf-panel, .mf-rcard, .mf-report, .mf-how-grid div, .mf-region-sum { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
    .mf-mapcard { margin: 0 calc(-1 * var(--mf-gut)); padding: 0.75rem 1rem; }
    .mf-map { border-radius: 0; margin: 0 -1rem; }
    .mf-panel { margin: 0 calc(-1 * var(--mf-gut)); padding: 1.25rem 1.25rem; border-top: 0; }
    .mf-region-grid { gap: 0; margin: 0 calc(-1 * var(--mf-gut)); }
    .mf-rcard { border-top: 0; }
    .mf-alerts { border-radius: 0; margin: 0 calc(-1 * var(--mf-gut)); padding: 2rem 1.25rem; }
    .mf-report { margin: 0 calc(-1 * var(--mf-gut)); padding: 1.5rem 1.25rem; }
    .mf-lab:not(.k) { display: none; }
    .mf-lab text { font-size: 17px; }
    .mf-wx { grid-template-columns: repeat(2, 1fr); }
    .mf-days { grid-template-columns: repeat(7, 64px); }
    .mf-section > h2 { font-size: 1.6rem; }
    .mf-region-sum { flex-direction: column; align-items: flex-start; margin: 0 calc(-1 * var(--mf-gut)) 1rem; }
    .mf-trip { grid-template-columns: 1fr; }
    .mf-hero { padding: 6.5rem 1.25rem 1.75rem; }
    .mf-hero h1 { font-size: 2.1rem; margin-bottom: 0.75rem; }
    .mf-hero .page-hero-subtitle { font-size: 0.98rem; line-height: 1.6; }
    .mf-hero .mf-updated { margin-top: 0.6rem; }
    .mf-locate { width: 100%; justify-content: center; }
}
@media only screen and (max-width: 359px) {
    .mf-page { --mf-gut: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .mf-rcard, .mf-gear-card { transition: none; }
}

/* Language switcher (hero): name with its flag underneath */
.mf-langs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; margin-top: 1rem; padding: 0.25rem; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px; font-size: 0.8rem; }
.mf-lang { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.35rem 0.7rem 0.45rem; border-radius: 8px; color: #fff; text-decoration: none; line-height: 1.2; }
.mf-lang .mf-lang-name { opacity: 0.85; }
a.mf-lang:hover { background: rgba(255, 255, 255, 0.12); }
a.mf-lang:hover .mf-lang-name { opacity: 1; }
a.mf-lang:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mf-lang.on { background: #fff; color: var(--scottish-blue-deep); font-weight: 600; }
.mf-lang.on .mf-lang-name { opacity: 1; }
.mf-flag { display: block; width: 22px; height: 15px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.mf-lang.on .mf-flag { box-shadow: 0 0 0 1px rgba(15, 37, 64, 0.2); }
.mf-flag svg { display: block; width: 100%; height: 100%; }
@media (max-width: 560px) {
  /* six languages: two even rows of three instead of a lopsided wrap */
  .mf-langs { display: inline-grid; grid-template-columns: repeat(3, auto); padding: 0.25rem; gap: 0.2rem; }
  .mf-lang { padding: 0.35rem 0.6rem 0.45rem; }
}
