/*
 * radioufs.css -- site chrome and shared components for the stand-alone
 * pages that are not rendered by WordPress:
 *
 *   /radioufsvetenskap/   db/vetenskap.php
 *   /radioufsnetradio/    db/netradview.php
 *   /db/netradlist.php
 *   /radioufsmailing/     db/mailing.php
 *   /mailing/
 *   /dagens/
 *
 * It is written to look like the WordPress theme the rest of
 * www.radioufs.com runs -- same typeface, colours, header, navigation bar,
 * boxed content and footer -- but it shares no file with it. Nothing here
 * is loaded from wp-content/ or wp-includes/, so a theme or plugin update
 * cannot change these pages, and these pages cannot break the theme.
 *
 * The markup this styles is printed by db/common/site-chrome.php.
 * The values were read off the live theme; if the theme is ever restyled,
 * the custom properties below are the place to follow it.
 */

/* ----- Typeface ---------------------------------------------------------
   Inter, the theme's typeface, served from this folder (SIL Open Font
   License, see fonts/README.txt). The theme only ever uses these two
   weights; a request for 500/600 falls to the nearer of the two. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-700.woff2') format('woff2');
}

:root {
  --ru-red: #C1121F;          /* top bar, footer bar */
  --ru-blue: #0047AB;         /* navigation bar, links, buttons */
  --ru-blue-dark: #003580;    /* hover on blue */
  --ru-ink: #1f1f1f;          /* text */
  --ru-muted: #595959;        /* secondary text (7:1 on white) */
  --ru-line: #dcdcdc;         /* hairlines */
  --ru-field: #8c8c8c;        /* form-field outline (3:1 on white) */
  --ru-bg: #f5f5f5;           /* page background */
  --ru-soft: #f3f6fb;         /* tinted panels */
  --ru-footer: #101010;
  --ru-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.08);
  --ru-font: 'Inter', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ru-wrap: 1440px;          /* widest the page gets */
  --ru-col: 980px;            /* widest a column of text gets */
}

/* ----- Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ru-bg);
  color: var(--ru-ink);
  font-family: var(--ru-font);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.6em; font-family: inherit; font-weight: 700; line-height: 1.3; color: inherit; }
h1 { font-size: 1.75rem; line-height: 1.4; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.25em; }

a { color: var(--ru-blue); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--ru-blue-dark); }

img, svg, audio, video { max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--ru-blue); outline-offset: 2px; }

[hidden] { display: none !important; }

/* Visually hidden, still read out. */
.ru-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.ru-skip {
  position: absolute; left: 5px; top: -100px; z-index: 1000;
  padding: 10px 16px; background: #fff; color: var(--ru-ink); font-weight: 700;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
}
.ru-skip:focus { top: 5px; }

.ru-wrap { max-width: var(--ru-wrap); margin: 0 auto; padding: 0 20px; }

/* ----- Header: date bar, site title, navigation ------------------------ */
.ru-header { font-size: 14px; }

.ru-topbar { background: var(--ru-red); color: #fff; padding: 5px 0; font-weight: 700; line-height: 1; }
.ru-topbar .ru-wrap { display: flex; align-items: center; min-height: 30px; }

.ru-brand { background: #fff; padding: 20px 0; }
.ru-brand__title { margin: 0; font-size: 41px; font-weight: 700; line-height: 1.5; }
.ru-brand__title a { color: var(--ru-ink); text-decoration: none; }
.ru-brand__title a:hover { color: var(--ru-ink); }
.ru-brand__tagline { margin: 0; line-height: 1.7; }

.ru-nav { position: relative; z-index: 200; background: var(--ru-blue); font-weight: 700; line-height: 19px; }
.ru-nav__bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.ru-nav :focus-visible { outline-color: #fff; outline-offset: -3px; }

.ru-menu, .ru-menu ul { list-style: none; margin: 0; padding: 0; }
.ru-menu { flex: 1 1 auto; min-width: 0; }
.ru-menu li { position: relative; display: flex; flex-wrap: wrap; align-items: center; }
.ru-menu a { display: block; flex: 1 1 auto; padding: 15px; color: #fff; text-decoration: none; }

/* The arrow next to an item that has a submenu. A real button, so the
   submenu can be opened by touch and from the keyboard, not only on hover.
   It needs the script, so it is only shown once that has loaded. */
.ru-menu__more {
  display: none; flex: 0 0 auto; align-items: center; justify-content: center;
  width: 26px; height: 49px; margin-left: -11px; padding: 0;
  background: none; border: 0; color: #fff;
}
.ru-js .ru-menu__more { display: inline-flex; }
.ru-menu__more::before {
  content: ''; width: 7px; height: 7px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.ru-menu li.is-open > .ru-menu__more::before { transform: rotate(-135deg); margin-top: 3px; }

.ru-menu__sub { display: none; background: #fff; }
.ru-menu__sub a { padding: 10px; color: var(--ru-ink); }
.ru-menu__sub a:hover { color: var(--ru-blue); }
.ru-menu__sub .ru-menu__more { height: 39px; margin-left: 0; color: var(--ru-ink); }
/* A third level opens in place, inside the panel, instead of flying out
   sideways -- a fly-out from the last items would leave the screen. */
.ru-menu__sub .ru-menu__sub { flex: 1 1 100%; background: var(--ru-bg); }
.ru-menu__sub .ru-menu__sub a { padding-left: 24px; }

.ru-menu li.is-open > .ru-menu__sub { display: block; }
/* Without the script there is nothing to open a third level, so show it. */
html:not(.ru-js) .ru-menu__sub .ru-menu__sub { display: block; }

.ru-nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 49px; margin-left: -10px; padding: 0;
  background: none; border: 0; color: #fff;
}
.ru-nav__ham, .ru-nav__ham::before, .ru-nav__ham::after {
  display: block; width: 23px; height: 2px; background: currentColor;
}
.ru-nav__ham { position: relative; }
.ru-nav__ham::before, .ru-nav__ham::after { content: ''; position: absolute; left: 0; }
.ru-nav__ham::before { top: -7px; }
.ru-nav__ham::after { top: 7px; }

/* Site search: a <details>, so it opens without any script. */
.ru-search { position: relative; flex: 0 0 auto; margin-left: auto; }
.ru-search > summary {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 49px; margin-right: -14px; color: #fff; cursor: pointer; list-style: none;
}
.ru-search > summary::-webkit-details-marker { display: none; }
.ru-search > summary svg { display: block; }
/* Hidden unless open, stated here rather than left to the browser: some
   browsers hide a closed <details> with a display rule of their own, which
   the display: flex below would otherwise override. */
.ru-search__form {
  position: absolute; right: -14px; top: 100%; z-index: 20;
  display: none; width: 375px; max-width: calc(100vw - 20px); padding: 14px;
  background: #fff; box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
}
.ru-search[open] > .ru-search__form { display: flex; }
.ru-search__form input[type="search"] { flex: 1 1 auto; min-width: 0; border-right: 0; }
.ru-search__form :focus-visible { outline-color: var(--ru-blue); outline-offset: 2px; }

@media (min-width: 993px) {
  .ru-menu { display: flex; flex-wrap: wrap; }
  .ru-menu > li { flex-wrap: nowrap; }
  .ru-menu > li:first-child > a { padding-left: 0; }

  /* The line under the item being pointed at, and under the current section. */
  .ru-menu > li > a { position: relative; }
  .ru-menu > li > a::after {
    content: ''; position: absolute; left: 15px; right: 15px; bottom: 0; height: 3px;
    background: #fff; transform: scaleX(0); transition: transform 0.075s ease-in;
  }
  .ru-menu > li:first-child > a::after { left: 0; }
  .ru-menu > li > a:hover::after,
  .ru-menu > li > a:focus-visible::after,
  .ru-menu > li.is-current > a::after { transform: scaleX(1); }

  .ru-menu > li > .ru-menu__sub {
    position: absolute; left: 0; top: 100%; z-index: 10; width: 250px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
  }
  .ru-menu > li > .ru-menu__sub--right { left: auto; right: 0; }
  .ru-menu > li:hover > .ru-menu__sub { display: block; }
  html:not(.ru-js) .ru-menu > li:focus-within > .ru-menu__sub { display: block; }
}

@media (max-width: 992px) {
  .ru-topbar .ru-wrap { justify-content: center; }

  .ru-nav__bar { flex-wrap: wrap; align-items: center; gap: 0; min-height: 49px; }
  .ru-js .ru-nav__toggle { display: inline-flex; }

  /* The menu becomes a white list under the bar, edge to edge. With the
     script it is folded behind the menu button; without, it is just there. */
  .ru-menu { order: 3; flex: 1 1 100%; margin: 0 -20px; background: #fff; }
  .ru-js .ru-menu { display: none; }
  .ru-js .ru-nav.is-open .ru-menu { display: block; }
  .ru-menu li { border-top: 1px solid var(--ru-line); }
  .ru-menu a { padding: 13px 20px; color: var(--ru-ink); }
  .ru-menu .ru-menu__more { width: 48px; height: 45px; margin-left: 0; color: var(--ru-ink); }
  .ru-menu__sub { flex: 1 1 100%; background: var(--ru-bg); }
  .ru-menu__sub a { padding: 13px 20px 13px 36px; }
  .ru-menu__sub .ru-menu__sub { background: #ececec; }
  .ru-menu__sub .ru-menu__sub a { padding-left: 52px; }
  html:not(.ru-js) .ru-menu__sub { display: block; }
  .ru-nav .ru-menu :focus-visible { outline-color: var(--ru-blue); }
}

@media (max-width: 640px) {
  .ru-brand__title { font-size: 28px; }
}

/* ----- Breadcrumbs, content box, footer -------------------------------- */
.ru-crumbs { margin-top: 20px; padding: 15px 20px; background: #fff; box-shadow: var(--ru-shadow); font-size: 14px; }
.ru-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.ru-crumbs li + li::before { content: '/'; margin: 0 7px; }
.ru-crumbs a { color: var(--ru-ink); text-decoration: none; }
.ru-crumbs a:hover { color: var(--ru-blue); text-decoration: underline; }

.ru-main { margin-top: 20px; }
.ru-box { background: #fff; box-shadow: var(--ru-shadow); padding: clamp(20px, 5vw, 60px) clamp(20px, 7vw, 100px); }
.ru-col { max-width: var(--ru-col); margin: 0 auto; }
.ru-col > :last-child { margin-bottom: 0; }

.ru-footer { margin-top: 20px; background: var(--ru-footer); color: #fff; font-size: 14px; }
.ru-footer__info { padding: 10px 0; background: var(--ru-red); text-align: center; }
.ru-footer a { color: #fff; }

@media (max-width: 576px) {
  .ru-wrap { padding: 0 10px; }
  .ru-menu { margin: 0 -10px; }
  /* The gutter is 10px here, so the search button and its panel may only
     reach 10px outwards or the page starts to scroll sideways. */
  .ru-search > summary { margin-right: -10px; }
  .ru-search__form { right: -10px; max-width: 100vw; }
  .ru-footer__info .ru-wrap { padding: 0 20px; }
}

/* ----- Shared components ----------------------------------------------
   The theme is flat: square corners, a hairline border, blue for anything
   you can press. */

/* Form fields */
.ru-col input[type="text"],
.ru-col input[type="search"],
.ru-col input[type="date"],
.ru-col select,
.ru-search__form input[type="search"] {
  min-height: 38px; padding: 0 14px; font-size: 16px; line-height: 1.4;
  color: var(--ru-ink); background: #fff; border: 1px solid var(--ru-field); border-radius: 0;
}

/* Buttons */
.ru-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 38px; padding: 0 1.2em; font-size: 14px; font-weight: 700; line-height: 1.2;
  color: #fff; background: var(--ru-blue); border: 1px solid var(--ru-blue); border-radius: 0;
  text-decoration: none; cursor: pointer; transition: background 0.075s ease, color 0.075s ease, border-color 0.075s ease;
}
.ru-btn:hover { color: #fff; background: var(--ru-blue-dark); border-color: var(--ru-blue-dark); }
/* The theme's outlined "Read more" button. */
.ru-btn--ghost { color: var(--ru-ink); background: #fff; border-color: rgba(0, 0, 0, 0.3); }
.ru-btn--ghost:hover { color: #fff; background: var(--ru-blue); border-color: var(--ru-blue); }

/* A row of buttons or links */
.ru-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1.5rem; }

/* Search row: field, button, optional "clear" */
.ru-searchbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.ru-searchbar input[type="text"], .ru-searchbar input[type="search"] { flex: 1 1 12rem; min-width: 0; }

/* Entries: one bordered block per item, blue edge on the left */
.ru-card {
  margin: 0 0 1.5rem; padding: 1.25rem 1.5rem;
  background: #fff; border: 1px solid var(--ru-line); border-left: 4px solid var(--ru-blue);
}
.ru-card > :last-child { margin-bottom: 0; }

/* Tinted panel with an optional picture beside the text */
.ru-intro {
  display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; padding: 1rem 1.25rem;
  background: var(--ru-bg); border: 1px solid var(--ru-line); font-size: 0.9rem;
}
.ru-intro > div { min-width: 0; }
.ru-intro p { margin: 0 0 0.5em; }
.ru-intro p:last-child { margin-bottom: 0; }

/* Filter chips and page numbers */
.ru-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.ru-chips a, .ru-pagination a, .ru-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 0.8rem; font-size: 0.85rem; font-weight: 700; line-height: 1.2;
}
.ru-chips a, .ru-pagination a {
  color: var(--ru-blue); background: #fff; border: 1px solid var(--ru-blue); text-decoration: none;
}
.ru-chips a:hover, .ru-chips a.active, .ru-chips a[aria-current],
.ru-pagination a:hover { color: #fff; background: var(--ru-blue); }

.ru-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 1.5rem 0 0; }
.ru-pagination a, .ru-pagination span { min-width: 38px; min-height: 38px; }
.ru-pagination [aria-current] { color: #fff; background: var(--ru-blue); border: 1px solid var(--ru-blue); }
.ru-pagination span:not([aria-current]) { min-width: 0; padding: 0 0.1rem; color: var(--ru-muted); }

/* Notices and small print */
.ru-notice { margin: 0 0 1.5rem; padding: 0.8rem 1.1rem; background: #fff8ec; border: 1px solid #e6c98a; color: #5c4011; font-size: 0.92rem; }
.ru-hint { margin: 1.5rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--ru-line); color: var(--ru-muted); font-size: 0.85rem; }
.ru-muted { color: var(--ru-muted); }
.ru-empty { padding: 2rem 0; text-align: center; color: var(--ru-muted); }

@media (max-width: 600px) {
  .ru-card { padding: 1rem; }
  .ru-intro { flex-direction: column; text-align: center; }
  /* Fingers need more than a mouse pointer does. */
  .ru-btn, .ru-chips a, .ru-pagination a, .ru-pagination [aria-current] { min-height: 44px; }
  .ru-pagination a, .ru-pagination [aria-current] { min-width: 44px; }
  .ru-col input[type="text"], .ru-col input[type="search"], .ru-col input[type="date"], .ru-col select { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .ru-btn, .ru-menu__more::before, .ru-menu > li > a::after { transition: none; }
}

@media print {
  body { background: #fff; }
  .ru-topbar, .ru-nav, .ru-crumbs, .ru-footer, .ru-skip { display: none; }
  .ru-box { box-shadow: none; padding: 0; }
}
