:root {
  color-scheme: light;
  --page: #f4f6f3;
  --card: #fff;
  --ink: #142b2a;
  --muted: #516763;
  --accent: #106e61;
  --line: #dce6df;
  --pale: #e8f4ed;
  --warm: #fbefde;
  --paper: #f9fbf8;
  --radius: 20px;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
h2, h3, strong { font-weight: 700; }
a { color: var(--accent); text-underline-offset: .17em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
:focus-visible { outline: 3px solid #18754f; outline-offset: 4px; }
main, section, #vannstand { scroll-margin-top: 1.5rem; }
.shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: 1rem; z-index: 5; transform: translateY(-160%); padding: .7rem 1rem; background: white; color: var(--ink); }
.skip:focus { transform: none; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 750; font-size: 1.19rem; letter-spacing: -.045em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--accent); margin-left: -.64rem; }
.top nav { display: flex; gap: clamp(.5rem, 2.4vw, 2rem); align-items: center; }
.top nav a { display: block; padding: .48rem .7rem; text-decoration: none; color: var(--muted); font-weight: 650; font-size: .95rem; border-radius: 9px; }
.top nav a:hover, .top nav .nav-active { color: var(--accent); background: #ecf4ef; }
.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: .5rem; font-weight: 650; padding: .55rem .85rem; border-radius: 10px; border: 1px solid var(--line); background: white; color: var(--ink); text-decoration: none; font-size: .9rem; }
.button:hover { background: var(--pale); }
.button.primary { color: #fff; background: #146259; border-color: #146259; }
.button.primary:hover { background: #0a4942; }
.ic { width: 20px; height: 20px; display: inline-grid; place-items: center; flex-shrink: 0; }
.ic svg { display: block; width: 100%; height: 100%; }
.main { padding-block: 28px 42px; }
.hero { background: #103634; background-image: linear-gradient(90deg, #0b292bee 0%, #0b292bbf 35%, #0b292b25 85%), url("/assets/kyst.jpg"); background-position: center, center 53%; background-size: cover; color: #fff; border-radius: 24px; padding: 29px 34px 31px; min-height: 232px; display: flex; align-items: center; }
.hero-content { width: 100%; }
.hero-context { display: inline-flex; gap: .45rem; align-items: center; color: #e1f2ec; font-size: .88rem; font-weight: 700; padding: .29rem .65rem; background: #d7f3e51c; border: 1px solid #d7f3e541; border-radius: 7px; }
.hero-context .ic { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(2.7rem, 5.9vw, 4.45rem); line-height: 1.01; font-weight: 750; letter-spacing: -.07em; margin: .42rem 0 .35rem; overflow-wrap: anywhere; }
.hero p { color: #e1f2ed; font-size: 1rem; }
.hero p::first-letter { text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.hero-button { color: white; background: #0b292b56; border-color: #d7f3e558; }
.hero-button:hover, .hero-button[aria-pressed=true] { color: #fff; background: #27665c; }
.hero-button .ic { width: 16px; height: 16px; }
.hero-button:focus-visible { outline-color: #d3f7e8; }
.notice { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; background: #fff0d7; color: #58400e; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); min-width: 0; box-shadow: 0 3px 10px #10302505; }
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 17px 0; }
.metric { padding: 17px 20px; min-height: 145px; }
.metric-label { display: flex; align-items: center; gap: .63rem; }
.metric h2 { font-size: .95rem; }
.badge-icon { width: 36px; height: 36px; border-radius: 10px; color: #176254; background: var(--pale); }
.badge-icon svg { width: 20px; height: 20px; }
.low .badge-icon { color: #80501c; background: var(--warm); }
.current .badge-icon { color: #295e78; background: #e7f2f7; }
.metric-readout { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.metric-readout strong { font-size: clamp(1.82rem, 3.6vw, 2.65rem); line-height: 1.18; letter-spacing: -.065em; }
.metric-readout span { color: var(--muted); font-size: .94rem; font-weight: 600; }
.metric p, .section-head p, .weather p, .shortcuts p, .block > p, .week-days p, #plan-results p { color: var(--muted); font-size: .91rem; }
.metric p { margin-top: .3rem; }
.details-grid { display: grid; grid-template-columns: minmax(0, 2.46fr) minmax(0, 1fr); gap: 16px; }
.chart-card, .weather, .shortcuts, .block { padding: 21px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.section-head h2, .shortcuts h2 { font-size: 1.22rem; letter-spacing: -.04em; line-height: 1.22; }
.section-head p { margin-top: .16rem; }
.segments { display: flex; background: #edf3ee; border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-shrink: 0; }
.segments button { border: 0; border-radius: 7px; padding: .36rem .65rem; background: transparent; color: var(--muted); font-size: .85rem; font-weight: 700; }
.segments button[aria-pressed=true] { color: var(--accent); background: #fff; box-shadow: 0 1px 4px #16362b18; }
#figure { margin-top: .9rem; }
#chart { display: block; width: 100%; height: 215px; }
#chart-status { color: var(--muted); font-size: .85rem; }
#chart-status:not(:empty) { padding: .3rem 0; }
.legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .84rem; color: var(--muted); margin-top: .1rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend span::before { display: inline-block; content: ""; width: 19px; border-top: 2px solid #176f60; }
.legend .forecast::before { border-top: 2px dashed #305b9e; }
.legend .prediction::before { border-top: 2px dotted #99702f; }
details summary { cursor: pointer; color: var(--accent); font-size: .9rem; font-weight: 700; padding-block: .45rem; }
#chart-details { margin-top: .45rem; }
.side-stack { display: grid; gap: 16px; align-content: start; }
.weather { background: #eaf4ef; }
.weather-readout { font-size: 2.45rem; font-weight: 730; font-variant-numeric: tabular-nums; letter-spacing: -.07em; line-height: 1.22; margin-top: .63rem; }
.weather-icon { color: #176b5a; width: 34px; height: 34px; }
.wind { display: flex; gap: .5rem; align-items: center; border-top: 1px solid #d0e3d8; padding-top: .6rem; margin-top: .65rem; color: #285c51; font-size: .92rem; }
.shortcuts p { margin-top: .4rem; }
.favorite-row { display: flex; align-items: center; gap: .45rem; margin-top: .35rem; justify-content: space-between; }
.favorite-row a { overflow-wrap: anywhere; font-size: .92rem; font-weight: 650; }
.favorite-row button { min-height: 35px; min-width: 37px; padding: .3rem; }
.block { margin-top: 17px; }
.block > p { margin-top: .75rem; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; margin-top: .8rem; }
.day { padding: .67rem .72rem; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; }
.day h3 { font-size: .88rem; text-transform: capitalize; padding-bottom: .34rem; font-weight: 750; }
.events { list-style: none; padding: 0; margin: 0; }
.event { display: grid; gap: .25rem; grid-template-columns: 15px 1fr; align-items: center; padding-block: .3rem; border-top: 1px solid #e8eee8; font-size: .83rem; font-variant-numeric: tabular-nums; }
.event .ic { width: 14px; height: 14px; color: var(--accent); }
.event.event-low .ic { color: #80501c; }
.event span:last-child { color: var(--muted); white-space: nowrap; }
.event time { font-weight: 750; margin-right: .2em; }
.planner-form, .coordinates-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; margin-top: .8rem; }
label { display: block; font-weight: 650; font-size: .9rem; }
input, select { min-height: 42px; border: 1px solid #bdcec2; padding: .48rem .65rem; border-radius: 9px; background: white; color: var(--ink); font-size: 1rem; }
label select, label input { display: block; margin-top: .25rem; max-width: 100%; }
#plan-results { margin-top: .9rem; }
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.plan-row h3 { font-size: .95rem; }
.plan-row .button { flex-shrink: 0; }
footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 77px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1.3rem; padding-block: .8rem; color: var(--muted); font-size: .87rem; }
.footer-inner .brand { font-size: 1rem; }
dialog { width: min(550px, calc(100% - 28px)); max-height: 85vh; overflow: auto; border: 1px solid var(--line); border-radius: 20px; padding: 1.35rem; color: var(--ink); background: #fff; box-shadow: 0 30px 85px #122c2977; }
dialog::backdrop { background: #11282597; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.icon-only { min-width: 42px; padding: .42rem; }
.search-line { display: flex; gap: .5rem; margin-top: .3rem; }
.search-line input { min-width: 0; flex: 1; }
.location-actions { margin: .7rem 0; }
#search-status { color: var(--muted); font-size: .9rem; margin: .5rem 0; }
.place-list { display: grid; gap: .35rem; max-height: 42vh; overflow-y: auto; }
.place-result { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; gap: .5rem; padding: .52rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.place-result:hover { background: var(--pale); }
.place-result span { color: var(--muted); font-size: .81rem; text-align: right; }
.manual { margin-top: .65rem; }
.coordinates-form label { flex: 1 1 135px; }
.coordinates-form input { width: 100%; min-width: 0; }
.table-wrap { overflow: auto; max-height: 250px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; font-variant-numeric: tabular-nums; }
td, th { padding: .35rem .45rem; border-bottom: 1px solid var(--line); }
th { background: var(--paper); position: sticky; top: 0; }
.article { max-width: 770px; }
.article section { padding: 1.3rem 0; }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.05em; }
.article h2 { font-size: 1.24rem; margin-bottom: .3rem; }
.article p + p { margin-top: .55rem; }
@media (max-width: 980px) {
  .week-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 30px); }
  .main { padding-top: 16px; }
  .top-inner { gap: 7px; padding-block: .58rem .44rem; flex-wrap: wrap; min-height: 0; }
  .top nav { order: 3; flex-basis: 100%; gap: .35rem; }
  .top nav a { padding: .36rem .65rem; }
  .hero { padding: 22px 19px; min-height: 208px; border-radius: 18px; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 3.9rem); }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-block: 11px; }
  .metric { min-height: 0; padding: 12px; border-radius: 14px; }
  .metric h2 { font-size: .86rem; }
  .metric .badge-icon { width: 29px; height: 29px; }
  .metric .badge-icon svg { width: 17px; height: 17px; }
  .metric-readout span, .metric p { font-size: .8rem; }
  .current { grid-column: span 2; }
  .details-grid { grid-template-columns: 1fr; gap: 11px; }
  .side-stack { grid-template-columns: 1fr 1fr; gap: 9px; }
  .chart-card, .weather, .shortcuts, .block { padding: 14px; border-radius: 15px; }
  .week-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-row .button { white-space: normal; }
}
@media (max-width: 365px) {
  .shell { width: calc(100% - 22px); }
  .brand { font-size: 1.07rem; }
  .side-stack { grid-template-columns: 1fr; }
  .plan-row { flex-wrap: wrap; }
}
.clear-location { margin-top: .65rem; }
.planner-mode { margin-top: .75rem; }
#height-value { width: 10rem; }
#location-nearby { margin-top: .65rem; }
#choose-nearby { margin-top: .65rem; }
