/* RF-Behavior project site. Palette: Aalto black and yellow, figures in blues. */
:root {
  --bg: #ffffff; --bg-2: #f6f6f4; --panel: #ffffff; --ink: #121417; --ink-2: #4b5159; --muted: #757b84;
  --line: #e4e5e8; --accent: #f5c400; --accent-ink: #121417; --blue: #2b6cb0; --code: #f1f2f4;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --bg-2: #15181c; --panel: #1a1e23; --ink: #e8e9eb; --ink-2: #b7bcc3; --muted: #8c929b;
    --line: #2a2f36; --accent: #f5c400; --accent-ink: #121417; --blue: #7fb3ea; --code: #1f242a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --bg-2: #15181c; --panel: #1a1e23; --ink: #e8e9eb; --ink-2: #b7bcc3; --muted: #8c929b;
  --line: #2a2f36; --accent: #f5c400; --accent-ink: #121417; --blue: #7fb3ea; --code: #1f242a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden;
       font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--code); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px;
      overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 12px; }
h2 { font-size: 28px; margin-top: 0; }
h3 { font-size: 18px; margin-top: 24px; }
p { margin: 0 0 14px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
section.alt { background: var(--bg-2); }
.kicker { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
          margin: 0 0 8px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 760px; }

/* top bar */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
             backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; font-size: 17px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 12px; height: 12px; background: var(--accent); border-radius: 3px; display: inline-block; }
nav.menu { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.top-logos { display: flex; align-items: center; gap: 14px; margin-left: 18px; }
.top-logos img { height: 44px; width: auto; display: block; }
.top-logos img.group { height: 26px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .top-logos img { background: #fff; padding: 3px 5px; border-radius: 4px; }
}
:root[data-theme="dark"] .top-logos img { background: #fff; padding: 3px 5px; border-radius: 4px; }
@media (max-width: 720px) { .top-logos { margin-left: auto; } .top-logos img { height: 34px; } .top-logos img.group { height: 20px; } }
nav.menu a { color: var(--ink-2); }
nav.menu a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { nav.menu { display: none; } }

/* hero */
.hero { padding: 72px 0 56px; border-top: 0; background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--bg)) 0%, var(--bg) 100%); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 14px; }
.hero h1 span { background: linear-gradient(transparent 62%, var(--accent) 62%); }
.hero .authors { color: var(--ink-2); margin-bottom: 4px; }
.hero .affil { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 34px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px;
       border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 14px;
       box-shadow: var(--shadow); }
.btn:hover { text-decoration: none; border-color: var(--ink-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn svg { width: 16px; height: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }

/* two columns, cards, tables */
.cols { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: start; }
.cols > * { min-width: 0; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.figure { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
          box-shadow: var(--shadow); }
.figure img { width: 100%; height: auto; display: block; border-radius: 6px; background: #fff; }
.figure figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { color: var(--ink-2); font-size: 14px; margin: 0; }
.card .tag { display: inline-block; font-size: 12px; color: var(--muted); margin-top: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num { font-variant-numeric: tabular-nums; }

/* gallery */
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
            background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
label.ctl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
select { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
         border-radius: 6px; padding: 7px 8px; }
.gallery-figure { margin: 18px 0 0; }
.gallery-figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line);
                      border-radius: 8px; background: #fff; }
.gallery-figure figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
#facts { margin-top: 14px; max-width: 820px; font-size: 14px; }
#facts td:first-child { color: var(--muted); white-space: nowrap; width: 150px; }

.controls input { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
                  border-radius: 6px; padding: 7px 8px; width: 100%; }
.controls .btn { align-self: end; justify-content: center; }
.btn-row { flex-direction: row; align-items: end; gap: 8px; }
.plot { margin-top: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 520px;
        padding: 6px; }
.status { color: var(--muted); font-size: 13px; margin-top: 8px; }

.range-ctl { grid-column: span 2; }
.dual { position: relative; height: 30px; margin-top: 4px; }
.dual-bar { position: absolute; left: 8px; right: 8px; top: 13px; height: 4px; background: var(--line); border-radius: 2px; }
.dual-fill { position: absolute; top: 0; height: 100%; background: var(--accent); border-radius: 2px; }
.dual input[type="range"] { position: absolute; left: 0; top: 0; width: 100%; height: 30px; margin: 0; padding: 0;
  background: none; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none; }
.dual input[type="range"]::-webkit-slider-runnable-track { height: 30px; background: none; }
.dual input[type="range"]::-moz-range-track { height: 30px; background: none; }
.dual input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin-top: 7px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink);
  cursor: pointer; }
.dual input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--ink); cursor: pointer; }

/* steps and notes */
ol.steps { padding-left: 20px; } ol.steps li { margin-bottom: 8px; }
.fine { color: var(--muted); font-size: 13px; margin-top: 6px; }
.note { border-left: 3px solid var(--accent); background: var(--bg-2); padding: 10px 14px; border-radius: 0 8px 8px 0;
        color: var(--ink-2); font-size: 15px; }
.copy { float: right; font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
        border: 1px solid var(--line); background: var(--panel); color: var(--ink); }

/* footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
footer .logos { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; margin-bottom: 22px; }
footer .logos img { height: 96px; width: auto; }
footer .logos img.group { height: 44px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) footer .logos img { background: #fff; padding: 8px; border-radius: 6px; }
}
:root[data-theme="dark"] footer .logos img { background: #fff; padding: 8px; border-radius: 6px; }
