/* hengitystutkimus.fi palette and type (site/src/styles/global.css); light only, like the site */
:root {
  --navy: #1a4468; --blue: #235787; --blue-l: #2c6ea3;
  --bg: #ffffff; --gray: #f5f7fa; --slate: #e8edf4;
  --text: #1a202c; --muted: #4a5570; --border: #cdd6e4;
  --heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 6px; --shadow-sm: 0 1px 3px rgba(26, 68, 104, 0.06);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.page-hero { background: var(--navy); color: #fff; padding: 28px 0 32px; }
.page-hero h1 { font-family: var(--heading); color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; line-height: 1.3; }
.page-hero p { color: rgba(255, 255, 255, 0.8); margin: 8px 0 0; max-width: 680px; }
main { padding-top: 24px; }
h2 { font-family: var(--heading); color: var(--navy); font-size: 1.15rem; margin: 0 0 10px; line-height: 1.3; }
.card { background: var(--gray); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin-bottom: 18px; min-width: 0; }
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.f { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); min-width: 0; }
.f.site, .f.search, .found { grid-column: 1 / -1; }
.f.wide { grid-column: span 2; }
.search { flex-direction: row; gap: 8px; }
.search input { min-width: 0; flex: 1; }
select, input { font: inherit; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; width: 100%; }
.btn { font: inherit; font-weight: 600; background: var(--blue); color: #fff; border: 0; border-radius: var(--radius); padding: 8px 16px; cursor: pointer; flex: none; }
.btn:hover { background: var(--navy); }
.found:empty { display: none; }
.chip { font: inherit; background: var(--slate); color: var(--text); border: 0; border-radius: 16px; padding: 4px 10px; margin: 0 6px 6px 0; cursor: pointer; }
.days { padding: 12px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { font-size: .8rem; font-weight: 700; color: var(--muted); text-align: center; }
.day { display: flex; flex-direction: column; gap: 2px; font: inherit; text-align: left; min-width: 0;
  background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 8px; cursor: pointer; }
.day.off { background: transparent; border-style: dashed; color: #9aa6b8; cursor: default; }
.day.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--slate); }
.day .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 4px; }
.day .d { font-weight: 700; }
.day .wx { width: 26px; height: 26px; flex: none; }
.day .tt { color: var(--muted); font-size: .8rem; }
.day .m { color: var(--blue); font-weight: 600; font-size: .8rem; }
@media (max-width: 600px) { .day { padding: 4px; } .day .wx { width: 20px; height: 20px; } .day .tt, .day .m { font-size: .7rem; } }
.status { color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; background: #fff; border-radius: var(--radius); }
.chart .grid { stroke: var(--slate); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 12px; }
.chart .axt { fill: var(--navy); font-size: 13px; font-weight: 700; }
.chart .room { fill: #a6b0b8; opacity: .75; }
.chart .now { fill: #454d63; opacity: .9; }
.chart .lroom { fill: #6b7680; font-size: 13px; }
.chart .lnow { fill: var(--navy); font-size: 13px; font-weight: 700; }
.chart .row { fill: #6b7680; font-size: 14px; font-weight: 700; }
.chart .row.on { fill: var(--navy); }
.chart .dot { fill: #1f2a44; }
.chart .dl { fill: #1f2a44; font-size: 12px; }
.chart .you { stroke: var(--navy); stroke-width: 3; }
.chart .yl { fill: var(--navy); font-size: 12px; font-weight: 700; }
/* A white halo keeps value labels legible where they cross the drying-limit bands */
.chart .dl, .chart .yl { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.chart .narrow .ax, .chart .narrow .yl { font-size: 14px; }
.chart .narrow .dl { font-size: 13px; }
.chart .narrow .axt, .chart .narrow .row { font-size: 15px; }
.lead2 { margin: 0 0 10px; }
.legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li > span:last-child { flex: 1; }
.sw { display: inline-block; width: 16px; height: 14px; flex: none; }
.sw.now { background: #454d63; }
.sw.room { background: #a6b0b8; }
.sw.dotk { width: 10px; height: 10px; border-radius: 50%; background: #1f2a44; margin: 0 3px; }
.sw.youk { width: 3px; height: 16px; background: var(--navy); margin: 0 6px; }
.best-line { margin: 6px 0 0; color: var(--text); font-weight: 600; }
.vals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0 0 14px; }
.v dt { color: var(--muted); font-size: .85rem; }
.v dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.v small { display: block; font-size: .85rem; font-weight: 600; color: var(--blue); }
.headline { font-weight: 700; color: var(--blue); font-size: 1.6rem; }
.headline .unit { font-size: 1rem; color: var(--muted); margin-left: 6px; }
.small { font-size: .85rem; color: var(--muted); }
.foot { border-top: 1px solid var(--border); padding: 12px 0 28px; }
.foot p { margin: 4px 0; }
@media (max-width: 600px) {
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f.wide { grid-column: 1 / -1; }
  .vals { grid-template-columns: 1fr; }
}

/* Embedded mode (?embed=1): no own title band, no outer scroll */
.embed .page-hero { display: none; }
.embed body, .embed html { overflow: hidden; }
.embed main { padding-top: 16px; }
/* On a phone the host page drops its own margins, so the cards run edge to edge */
@media (max-width: 600px) {
  .embed main.wrap { padding: 8px 0 0; }
  .embed .card { border-left: 0; border-right: 0; border-radius: 0; padding: 14px 10px; margin-bottom: 10px; }
  .embed .foot { padding-left: 10px; padding-right: 10px; }
}
