:root {
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: #142339;
  background: #f4f7fc;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header, footer { padding: 1rem max(5vw, 1rem); }
header { background: #121f33; color: #fff; display: flex; align-items: center; justify-content: space-between; }
header a { color: inherit; text-decoration: none; font-size: 1.2rem; }
main { max-width: 75rem; padding: 2rem clamp(1rem, 4vw, 3rem); margin: auto; }
h1 { line-height: 1.1; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.035em; margin: 0 0 .65rem; }
h2 { margin: 0 0 .9rem; font-size: 1.35rem; }
p { margin: .45rem 0 .9rem; }
form, .card { background: white; border: 1px solid #d6e0ed; border-radius: 1rem; padding: clamp(1rem, 3vw, 1.7rem); }
form { max-width: 31rem; margin-top: 1.5rem; }
#workspace { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(22rem, 1.58fr); gap: 1rem; align-items: start; }
label { font-size: .89rem; font-weight: 650; display: block; margin: .95rem 0 .32rem; }
input, select { display: block; width: 100%; max-width: 100%; padding: .66rem .75rem; color: #142339; border: 1px solid #a9b8ce; border-radius: .55rem; background: #fff; font: inherit; }
button { border: 1px solid transparent; border-radius: .58rem; background: #234f9c; color: white; font: inherit; font-weight: 650; cursor: pointer; padding: .59rem .8rem; }
form button, #load-insights { margin-top: 1rem; }
button:disabled { color: #50627e; background: #e6edf6; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #498bdc; outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; }
#connection-note, #result-note, #native-post { color: #4b5d76; font-size: .92rem; }
#status:empty, #connection-note:empty, #result-note:empty, #native-post:empty { display: none; }
#status { background: #e5eefb; border: 1px solid #a8c5f3; border-radius: .6rem; padding: .55rem .75rem; }
#status[data-error="true"] { background: #fdf0ee; border-color: #db9c95; color: #872e25; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .65rem; }
.metric { background: #edf3ff; border: 1px solid #d7e4fa; border-radius: .7rem; padding: .72rem; }
.metric strong { display: block; font-size: 1.65rem; }
.metric small { color: #3e5371; display: block; }
a { color: #1f4f99; }
@media (max-width: 46rem) { #workspace { grid-template-columns: 1fr; } }
