/* rl-site.css: audit layer for smartdongle.com (BBA 2026-10-13).
   Loaded from include-footer.php AFTER the theme sheets skel.js injects into <head>, and
   BEFORE rl-rhythm.css (which stays last). Theme: Momentum (Pixelarity) / skel, Open Sans,
   Font Awesome 4.2. Sections: rhythm constants, sticky footer, skip link, legal pages,
   version stamp, link icons, content link underlines, RL Consent sizing, 404, focus rings (LAST). */

/* Universal vertical rhythm (FRAMEWORK/css/rl-rhythm.css). Constants measured with
   scripts/check-rule-spacing.js --fonts on 2026-10-13: Open Sans ascent 1.070 descent 0.290 cap 0.714. */
:root {
  --rl-rhythm: 64px;
  --rl-ink-top-head: 0.324em;  --rl-ink-bottom-head: 0.390em;
  --rl-ink-top-body: 0.324em;  --rl-ink-bottom-body: 0.390em;
}

/* Sticky footer (AUDIT Step 3). skel-layers wraps the page in #skel-layers-wrapper. */
#skel-layers-wrapper { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
#skel-layers-wrapper > [role="main"] { flex: 1 0 auto; }

/* Footer lists: the last item's bottom padding is an internal rule gap, not an inset (rhythm measures ink to the section edge) */
#footer ul.style1 > li:last-child { padding-bottom: 0; }

/* Main column: equal band insets top and bottom (theme had 4em top, 2em bottom plus 3em on #content) */
#main-wrapper { padding-top: 4em; padding-bottom: 4em; }
@media (max-width: 736px) { #main-wrapper { padding-top: 3em; padding-bottom: 3em; } }
#content { padding-bottom: 0; }
#content > ul:last-child > li:last-child, #sidebar section > ul:last-child > li:last-child { padding-bottom: 0; }

/* Rhythm on this theme (measured 2026-10-13, FRAMEWORK scripts/check-rule-spacing.js):
   1. skel's grid gutter is padding-top on every column with a -25px (-15px phone) row margin;
      rl-rhythm zeroes a first row's margin (Bootstrap gutter model), so restore skel's compensation.
   2. The theme sets #content h1/h2 at id specificity (1,0,1), above rl-rhythm's (0,2,1) ink pull,
      so the first and last text children of #content get the pull here at (1,1,1). */
#skel-layers-wrapper .row:first-child { margin-top: -25px; }
@media (max-width: 736px) { #skel-layers-wrapper .row:first-child { margin-top: -15px; } }
#content > :is(h1, h2, h3):first-child { margin-top: calc(var(--rl-ink-top-head) - 0.5lh); }
#content > :is(p, ul, ol):last-child, #sidebar section > :is(p, ul, ol):last-child { margin-bottom: calc(var(--rl-ink-bottom-body) - 0.5lh); }
#sidebar section > :is(h1, h2, h3):first-child { margin-top: calc(var(--rl-ink-top-head) - 0.5lh); }
/* style-mobile.css gives every section/article a 3em bottom margin with !important; the content column and the hero card own their edges */
@media (max-width: 736px) { #content, #sidebar > section:last-child { margin-bottom: 0 !important; } #banner article > :last-child { margin-bottom: 0; } }

/* Visually hidden utility (version-stamp label, consent cues) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Skip link: first focusable element, visible on Tab */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 10001; background: #fff; color: #000; padding: 10px 14px; font-size: 15px; font-weight: 600; text-decoration: underline; border: 2px solid #0074AD; }
.skip-link:focus { top: 8px; }

/* Native legal pages (privacy policy, website terms of use, accessibility statement) */
.sd-legal h1 { margin-bottom: .35em; }
.sd-legal h2 { font-size: 1.35em; margin: 1.6em 0 .4em; clear: both; }
.sd-legal p, .sd-legal li { line-height: 1.6; }
.sd-legal ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.sd-legal li { margin-bottom: .3em; }
.sd-legal .doc-meta { color: #555; margin-bottom: 1.5em; }

/* Site version stamp (AUDIT "Site Version Stamp"), copyright band lower-left. #666 on #f6f6f6 = 5.7:1 */
#copyright { position: relative; }
#copyright .site-version { position: absolute; left: 12px; bottom: 6px; margin: 0; font-size: 11px; line-height: 1; letter-spacing: .04em; color: #666; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: left; }

/* External and PDF link icons (Font Awesome 4 glyphs), applied by include-footer.php */
.external-link-icon::after { content: "\f08e"; font-family: 'FontAwesome'; font-size: .8em; margin-left: 4px; text-decoration: none !important; color: inherit; display: inline-block; }
.external-link-icon:has(img)::after { display: none; }
.pdf-link-icon::after { content: "\f1c1"; font-family: 'FontAwesome'; margin-left: 4px; text-decoration: none !important; color: #ea4335; display: inline-block; }
.pdf-link-icon.button::after { color: inherit; }

/* Content links are distinguishable by more than color (WCAG link-in-text-block) */
#content a:not(.button):not(.image):not(.link), #sidebar a:not(.button):not(.image), #copyright a { text-decoration: underline; }
#content a:not(.button):not(.image):hover, #sidebar a:not(.button):not(.image):hover, #copyright a:hover { text-decoration: none; }

/* Walk-through screenshots scale to the column */
img.imagescale { max-width: 100%; height: auto; }

/* 404 page */
.sd-404 .actions a { margin-right: .5em; }

/* ---------------------------------------------------------------- RL Consent (sizes in px: legacy theme) */
.rl-consent-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10090; background: #fff; color: #2b3644; border-top: 1px solid #e3e7ed; box-shadow: 0 -6px 24px rgba(15, 23, 42, .10); padding: 14px clamp(16px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-weight: 400; }
.rl-consent-banner { animation: rl-consent-rise .45s cubic-bezier(.22,.7,.3,1); }
@keyframes rl-consent-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.rl-consent-banner[hidden] { display: none; }
.rl-consent-cookie { width: 26px; height: 26px; color: #0074AD; flex: none; }
.rl-consent-fab .rl-consent-cookie { width: 24px; height: 24px; }
.rl-consent-banner p { margin: 0; font-size: 15px; line-height: 1.5; flex: 1 1 340px; text-align: left; }
.rl-consent-banner p a { color: #005C8A; text-decoration: underline; }
.rl-consent-banner p a .fa { font-size: .75em; margin-left: .35em; display: inline-block; text-decoration: none; }
.rl-consent-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.rl-btn, .rl-btn-outline { display: inline-block; font-family: inherit; font-size: 14px !important; font-weight: 600; line-height: 1.2; padding: 9px 16px !important; border-radius: 4px; cursor: pointer; text-decoration: none; }
.rl-btn { background: #0074AD; color: #fff; border: 1px solid #0074AD; }
.rl-btn:hover { background: #005C8A; border-color: #005C8A; }
.rl-btn-outline { background: #fff; color: #005C8A; border: 1px solid #0074AD; }
.rl-btn-outline:hover { background: #eef5fa; }
.rl-consent-link { background: none; border: 0; color: #005C8A; text-decoration: underline; font-family: inherit; font-size: 14px; padding: 8px 4px; cursor: pointer; }
.rl-consent-fab { position: fixed; bottom: 16px; left: 16px; z-index: 10080; width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #0074AD; border: 1px solid #e3e7ed; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.16); cursor: pointer; padding: 0; }
.rl-consent-fab[hidden] { display: none; }
.rl-consent-dialog { border: 0; border-radius: 12px; padding: 0; max-width: 980px; width: calc(100% - 32px); max-height: min(86vh, 960px); color: #2b3644; font-weight: 400; }
.rl-consent-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.rl-consent-dialog-inner { padding: 28px 32px 24px; overflow-y: auto; max-height: min(86vh, 960px); box-sizing: border-box; }
.rl-consent-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.rl-consent-dlg-head img { height: 44px; width: auto; }
.rl-consent-close { background: none; border: 0; font-size: 28px; line-height: 1; color: #2b3644; cursor: pointer; padding: 4px 8px; }
.rl-consent-intro, .rl-consent-google { font-size: 16px; line-height: 1.6; margin: 0 0 8px; text-align: left; }
.rl-consent-google { margin-bottom: 24px; }
.rl-consent-intro a, .rl-consent-google a { color: #005C8A; text-decoration: underline; }
.rl-consent-cat { margin: 22px 0 0; }
.rl-consent-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.rl-consent-cat h3 { font-size: 17px !important; margin: 0 !important; line-height: 1.3 !important; }
.rl-consent-cat-desc { font-size: 15px; line-height: 1.55; color: #5c6672; margin: 0 0 12px; text-align: left; }
.rl-consent-always { font-size: 14px; font-weight: 600; white-space: nowrap; }
.rl-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.rl-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.rl-switch-track { position: absolute; inset: 0; background: #c3cad3; border-radius: 13px; transition: background .2s; }
.rl-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .2s; }
.rl-switch input:checked + .rl-switch-track { background: #0074AD; }
.rl-switch input:checked + .rl-switch-track::after { transform: translateX(20px); }
.rl-switch input:focus-visible + .rl-switch-track { outline: 3px solid #ffbf47; outline-offset: 2px; }
.rl-consent-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.rl-consent-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rl-consent-table th { text-align: left; font-weight: 600; background: #eef1f4; padding: 8px 12px; }
.rl-consent-table td { padding: 9px 12px; border-bottom: 1px solid #e3e7ed; vertical-align: top; }
.rl-consent-table code { font-size: 12px; background: none; color: #5c6672; }
.rl-consent-table td strong { font-weight: 600; display: block; }
.rl-consent-dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.rl-consent-dialog-actions .rl-btn { margin-left: auto; }
.rl-consent-credit { margin: 18px 0 0; text-align: center; font-size: 12px; color: #5a6572; }
.rl-consent-credit a { color: inherit; text-decoration: underline; }
@media (max-width: 736px) {
  .rl-consent-dialog-inner { padding: 20px 16px 18px; }
  .rl-consent-actions { margin-left: 0; width: 100%; }
  .rl-consent-actions .rl-btn, .rl-consent-actions .rl-btn-outline { flex: 1 1 auto; text-align: center; }
}

/* ---------------------------------------------------------------- Focus rings (KEYBOARD NAVIGATION ONLY) - MUST stay last.
   Gated behind html.kbd-nav (detector in include-footer.php): Tab shows the ring, a click or Back never does.
   Explicit selectors; theme uses outline: 0 on #nav a, .button and inputs at up to (1,0,1). */
html:not(.kbd-nav) a:focus,
html:not(.kbd-nav) button:focus,
html:not(.kbd-nav) input:focus,
html:not(.kbd-nav) select:focus,
html:not(.kbd-nav) textarea:focus,
html:not(.kbd-nav) iframe:focus,
html:not(.kbd-nav) summary:focus,
html:not(.kbd-nav) [tabindex]:focus {
    outline: none !important;
}
html.kbd-nav a:focus-visible,
html.kbd-nav #nav a:focus-visible,
html.kbd-nav button:focus-visible,
html.kbd-nav input:focus-visible,
html.kbd-nav select:focus-visible,
html.kbd-nav textarea:focus-visible,
html.kbd-nav iframe:focus-visible,
html.kbd-nav summary:focus-visible,
html.kbd-nav [tabindex]:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px !important;
}
html.kbd-nav a:focus-visible:has(img) {
    display: inline-block !important;
}
html.kbd-nav a:focus-visible:not(:has(img)),
html.kbd-nav #nav a:focus-visible,
html.kbd-nav button:focus-visible,
html.kbd-nav .button:focus-visible,
html.kbd-nav input[type="submit"]:focus-visible {
    background: #fff !important;
    color: #000 !important;
    box-shadow: inset 0 0 0 1px #000 !important;
    text-shadow: none !important;
}
