/* GigaPRS — styled after ldak-kvik.com: Open Sans, white background, LDAK blue */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  --bg: #ffffff; --card: #ffffff; --ink: #222; --muted: #666; --line: #dee2e6; --soft: #f5f7fa;
  --accent: #30638e; --accent-dark: #254d6f; --accent2: #eaf1f7; --red: #d95040; --err: #b0322a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Open Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* header + nav: LDAK-blue bar with the LDAK logo */
.top { background: var(--accent); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.top-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; }
.brand img { height: 40px; width: auto; background: #fff; border-radius: 4px; padding: 2px; }
.brand:hover { color: #fff; }
.brand small { font-weight: 400; font-size: 13px; opacity: .8; }
nav { display: flex; gap: 2px; margin-left: auto; }
nav a { text-decoration: none; color: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 3px; font-weight: 600; font-size: 15px; }
nav a:hover { color: #fff; background: rgba(255,255,255,.12); }
nav a.active { color: #fff; background: rgba(255,255,255,.2); }
.repo { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.9); text-decoration: none; font-size: 13px; line-height: 1.25; white-space: nowrap; }
.repo:hover { color: #fff; }
.repo svg { width: 24px; height: 24px; flex: none; }
.repo b { display: block; font-weight: 600; }
.repo small { display: block; font-size: 12px; opacity: .85; min-height: 15px; }

main { max-width: 1080px; margin: 0 auto; padding: 36px 16px 64px; }
h1 { font-size: 32px; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.lede { color: var(--muted); margin: 0 0 28px; font-size: 17px; max-width: 800px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; margin-bottom: 18px; }
h2 { font-size: 21px; font-weight: 600; color: var(--accent); margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 600; margin: 18px 0 6px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
code { background: var(--soft); border: 1px solid #e3e7ec; padding: 0 4px; border-radius: 3px; font-size: 13.5px; color: #333; }
pre.code { background: #f6f8fa; color: #24292e; border: 1px solid var(--line); padding: 12px 14px; border-radius: 4px; overflow: auto; font-size: 13.5px; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink); font-weight: 600; font-size: 14px; border-bottom: 2px solid var(--line); }
select, input[type=number], input[type=text], input[type=search] { font: inherit; font-size: 15px; padding: 5px 9px; border: 1px solid #ced4da; border-radius: 3px; background: #fff; }
label.opt { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
label.opt input { margin-top: 5px; }

button { font: inherit; font-weight: 600; padding: 9px 18px; border-radius: 3px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button:hover { background: var(--accent-dark); }
button:disabled { opacity: .45; cursor: default; }
button.secondary { background: #fff; color: var(--accent); padding: 5px 12px; }
button.secondary:hover { background: var(--accent2); }
button.bin { background: none; border: 0; color: var(--muted); padding: 4px 6px; line-height: 0; }
button.bin:hover { color: var(--red); background: #fbeceb; }
button.bin svg { width: 17px; height: 17px; }

.status { margin-left: 12px; color: var(--muted); }
.err { color: var(--err); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 0 6px; border-radius: 3px; border: 1px solid #c9d8e6; background: var(--accent2); color: var(--accent); vertical-align: 1px; }
.badge.ok { background: #edf6ee; border-color: #b9dcbd; color: #2e7d32; }
.quick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--accent2); border: 1px solid #c9d8e6; border-radius: 4px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; }
.quick span { flex: 1; min-width: 240px; color: #333; }
ol.steps { padding-left: 22px; margin: 6px 0; } ol.steps li { margin-bottom: 10px; } ol.steps pre.code { margin: 6px 0; }
.note { background: #fff8e6; border: 1px solid #f0d58c; border-radius: 4px; padding: 10px 14px; margin-top: 12px; font-size: 15px; }
.note button { margin-left: 8px; }
details.logwrap { margin-top: 12px; } details.logwrap summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.badge.local { background: #fff; border-color: var(--line); color: var(--muted); }
pre.log { background: #f6f8fa; color: #24292e; border: 1px solid var(--line); padding: 12px; border-radius: 4px; max-height: 340px; overflow: auto; font-size: 12.5px; white-space: pre-wrap; margin: 12px 0 0; }
.downloads a { display: inline-block; margin: 10px 10px 0 0; font-weight: 600; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
dl.inputs { margin: 6px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 15px; }
dl.inputs dt { font-weight: 600; }
dl.inputs dd { margin: 0; color: #444; }

/* home */
.hero { padding: 12px 0 4px; }
.hero h1 { font-size: 38px; }
.cta { display: flex; gap: 12px; margin: 18px 0 30px; flex-wrap: wrap; }
.cta a { text-decoration: none; font-weight: 600; padding: 9px 18px; border-radius: 3px; border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.cta a:hover { background: var(--accent-dark); }
.cta a.ghost { background: #fff; color: var(--accent); }
.cta a.ghost:hover { background: var(--accent2); }
.figure { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 12px; text-align: center; }
.figure img { max-width: 100%; height: auto; }
.figure figcaption { color: var(--muted); font-size: 14px; text-align: left; margin-top: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.grid3 section { margin: 0; border-top: 3px solid var(--accent); }
.stat { font-size: 28px; font-weight: 700; color: var(--accent); }

/* traits / scores */
.traits-table tr.trait { cursor: pointer; }
.traits-table tr.trait:hover td { background: var(--soft); }
.traits-table tr.sel td { background: var(--accent2); }
.plotwrap { position: relative; }
canvas { display: block; width: 100%; }
.tip { position: absolute; pointer-events: none; background: #222; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 3px; white-space: nowrap; display: none; z-index: 5; }

footer { color: var(--muted); font-size: 14px; text-align: center; padding: 24px 16px 40px; border-top: 1px solid var(--line); }
footer img { height: 46px; display: block; margin: 0 auto 6px; }

/* wide tables and equations scroll inside their card on small screens */
.scroll { overflow-x: auto; }
@media (max-width: 720px) {
  .top-inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 6px; gap: 4px 12px; }
  .brand img { height: 32px; }
  nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  nav a { white-space: nowrap; font-size: 14px; padding: 6px 8px; }
  .repo { margin-left: auto; order: 1; } .repo b { display: none; }
  nav { order: 2; }
  .katex { white-space: normal; }
  dl.inputs { grid-template-columns: 1fr; }
  dl.inputs dd { margin-bottom: 6px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  th:nth-child(n+5), td:nth-child(n+5) { display: none; }
  table.res { font-size: 12px; }
  table.res th, table.res td { padding: 5px 4px; }
}
