/* Kaikkien neljän sivun yhteinen ulkoasu. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #e7edf0;
  color: #080e20;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}
.app {
  max-width: 440px;
  min-height: 100vh;
  margin: auto;
  padding-bottom: 100px;
  background: #f7f9fb;
}
header {
  padding: 18px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e5ebf2;
}
.brand {
  margin: 0;
  color: #065f49;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}
h1 {
  margin: 0;
  font-size: 22px;
}
main {
  padding: 20px;
}
h2 {
  margin: 0 0 18px;
  font-size: 26px;
}
h3 {
  margin: 0 0 12px;
  font-size: 15px;
}
h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
}
p {
  margin: 8px 0;
}
.card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #e5ebf2;
  border-radius: 22px;
  background: #ffffff;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.metrics > div {
  padding: 12px 8px;
  border-radius: 14px;
  font-size: 13px;
}
.sleep {
  background: #f0f1ff;
}
.energy {
  background: #fff4cf;
}
.exercise {
  background: #d2fbe9;
}
.items {
  margin: 0;
  padding: 0;
  list-style: none;
}
.items li {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid #e5ebf2;
  border-radius: 12px;
  background: #f7f9fb;
}
.items .completed {
  background: #eafff5;
  border-color: #96e9c5;
}
.muted {
  color: #52627a;
  font-size: 14px;
}
.large {
  font-size: 26px;
  font-weight: bold;
}
.eyebrow {
  color: #065f49;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: #d2fbe9;
  color: #205c4b;
  font-size: 12px;
}
.yellow {
  background: #fff4cf;
  color: #704621;
}
.insight {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #f5ce62;
  border-radius: 18px;
  background: #fffae9;
  color: #684421;
}
.link-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 24px;
  background: #065f49;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}
.wide {
  display: block;
}
.break-title {
  text-align: center;
}
.break-title h2 {
  margin-top: 12px;
}
.timer {
  width: 180px;
  height: 180px;
  margin: 30px auto;
  border: 10px solid #1c4133;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timer strong {
  font-size: 34px;
}
.timer p {
  margin: 0;
  color: #52627a;
}
.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.distribution {
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.distribution li {
  margin-bottom: 14px;
}
.track {
  height: 9px;
  margin-top: 5px;
  border-radius: 10px;
  background: #e3e9f1;
  overflow: hidden;
}
.track span {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: #065f49;
}
.orange span {
  background: #e49a00;
}
.light span {
  background: #2dcc94;
}
/* Alavalikon linkit näyttävät painikkeilta. */
nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 10px 8px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e5ebf2;
  background: #ffffff;
}
nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 14px;
  background: #d2fbe9;
  color: #205c4b;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}
nav a[aria-current="page"] {
  background: #05091a;
  color: #ffffff;
}
a:hover {
  filter: brightness(0.95);
}
a:focus-visible {
  outline: 3px solid #a65b00;
  outline-offset: 3px;
}
/* Pienet puhelimet. */
@media (max-width: 350px) {
  main {
    padding: 14px;
  }
  .card {
    padding: 14px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: 1fr;
  }
}
/* Puhelin vaaka-asennossa ja leveämmät näytöt. */
@media (min-width: 600px) {
  .app, nav {
    max-width: 720px;
  }
  main {
    padding: 24px;
  }
  .metrics > div {
    padding: 18px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  header {
    padding: 10px 20px;
  }
  main {
    padding-top: 14px;
  }
  nav {
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .timer {
    width: 140px;
    height: 140px;
    margin: 20px auto;
  }
}

/* Muokkaus ja ajastin ovat tässä versiossa pelkkiä malleja. */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.section-heading h2, .section-heading h3 {
  margin: 0;
}
button {
  padding: 8px 12px;
  border: 1px solid #dce5ed;
  border-radius: 16px;
  background: #eafff5;
  color: #205c4b;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
}
button:disabled {
  opacity: 1;
}
.green-button {
  background: #065f49;
  color: #ffffff;
  border-color: #065f49;
}
.model-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.timer-buttons {
  justify-content: center;
  margin-bottom: 18px;
}
.duration button {
  flex: 1;
  padding: 8px 4px;
}
@media (max-width: 350px) {
  .section-heading {
    flex-wrap: wrap;
  }
}
