/* ============================================================
   ruter.dk extension of the ruter-ui base theme
   ------------------------------------------------------------
   Loaded right after static/vendor/ruter-ui/ruter.css by
   templates/web_app/partials/ruter_ui.html.

   ruter.css lives in cascade layers, so these unlayered rules
   win without extra specificity. Point the library's tokens at
   web_theme.css / base.css so ruter-* components follow the
   site's palette and type scale (including base.css's smaller
   mobile sizes) from one place.
   ============================================================ */

:root {
    --ruter-font: var(--font-primary);
    --ruter-text-base: var(--font-size-base);
    --ruter-leading: var(--line-height-normal);

    --ruter-ink: var(--ink);
    --ruter-ink-soft: var(--ink-soft);
    --ruter-accent: var(--green);
    --ruter-accent-strong: var(--green-deep);

    /* Clears the sticky .main-nav when a #fragment scrolls an item into view */
    --ruter-scroll-offset: 90px;
}

/* fonts.css (loaded by base.html, so also by the widgets: leave it
   alone) styles every <a> and a:hover unlayered, and unlayered rules
   beat ruter.css's layers whatever their specificity: link pills would
   come out blue and underline on hover. revert-layer hands these
   properties back to ruter.css, hover and selected states included;
   a[data-part] outranks fonts.css's a:hover. */
ruter-pills a[data-part="item"] {
    color: revert-layer;
    text-decoration: revert-layer;
    transition: revert-layer;
}

/* Same for fonts.css's unlayered `button { font-size: inherit }`:
   toggle-group buttons would take the nav's text size instead of the
   group's size. */
ruter-toggle-group button[data-part="item"] {
    font-family: revert-layer;
    font-size: revert-layer;
}
