:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172026;
  background: #f6f7f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f7f9;
}

.hero {
  display: grid;
  min-height: 56vh;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(75, 12, 44, 0.92), rgba(20, 108, 95, 0.7)),
    url("https://images.unsplash.com/photo-1503676260728-1c00da094a0b?auto=format&fit=crop&w=1800&q=80");
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.content,
.details-grid,
.app-tool {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.content {
  padding: 46px 0 54px;
}

.logo-panel {
  display: flex;
  width: min(100%, 980px);
  margin-bottom: 32px;
  padding: 18px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.logo-panel img {
  display: block;
  width: 100%;
  max-height: 78px;
  object-fit: contain;
  object-position: left center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f2b544;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.intro {
  max-width: 640px;
  margin: 18px 0 26px;
  color: #eef3f6;
  font-size: 18px;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.primary {
  background: #f2b544;
  color: #13212c;
}

.small {
  margin: 14px 0 0;
  color: #dfe9ee;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.details-band {
  padding: 34px 0;
  background: #f6f7f9;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.details-grid article {
  min-height: 168px;
  padding: 22px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.06);
}

.details-grid span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #0d7769;
  color: #ffffff;
  font-weight: 800;
}

.details-grid h2 {
  margin: 18px 0 8px;
  color: #172026;
  font-size: 20px;
}

.details-grid p {
  margin: 0;
  color: #51606d;
  font-size: 15px;
  line-height: 1.55;
}

.timer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
  padding-top: 34px;
  padding-bottom: 36px;
}

.timer-shell[hidden] {
  display: none;
}

.timer-card,
.settings {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.timer-card {
  display: grid;
  gap: 24px;
  place-items: center;
  min-height: 560px;
  padding: 30px;
}

.ring {
  position: relative;
  width: min(72vh, 520px);
  aspect-ratio: 1;
}

.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 14;
}

.track {
  stroke: #dce3e7;
}

.progress {
  stroke: #0d7769;
  stroke-linecap: round;
  stroke-dasharray: 603.19;
  stroke-dashoffset: 0;
  transition: stroke 240ms ease, stroke-dashoffset 240ms ease;
}

.time {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

#timeDisplay {
  color: #172026;
  font-size: clamp(64px, 11vw, 132px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 0.9;
}

#statusText {
  margin-top: 14px;
  color: #51606d;
  font-size: 18px;
  font-weight: 800;
}

.controls,
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.controls button {
  padding: 0 18px;
  background: #9b124d;
  color: #ffffff;
}

.controls button:nth-child(2) {
  background: #0d7769;
}

.controls button:nth-child(3) {
  background: #f2b544;
  color: #13212c;
}

.settings {
  padding: 24px;
}

.settings h2 {
  margin: 0 0 16px;
  color: #841349;
  font-size: 22px;
}

.presets {
  justify-content: start;
}

.presets button {
  min-width: 84px;
  padding: 0 12px;
  border: 1px solid #d1d9de;
  background: #ffffff;
  color: #172026;
}

.presets button[data-active="true"] {
  border-color: #9b124d;
  background: #f8e9f0;
  color: #841349;
}

.custom {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  color: #51606d;
  font-weight: 800;
}

.custom input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d1d9de;
  border-radius: 8px;
  font: inherit;
  font-size: 18px;
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: #34424d;
  font-weight: 750;
  line-height: 1.35;
}

.toggle input {
  width: 18px;
  height: 18px;
}

#tooltip {
  position: fixed;
  z-index: 10;
  display: none;
  max-width: 240px;
  padding: 7px 9px;
  border-radius: 7px;
  background: #172026;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  font: 700 12px/1.3 system-ui, sans-serif;
  pointer-events: none;
}

body.is-done .progress {
  stroke: #9b124d;
}

body.is-warning .progress {
  stroke: #f2b544;
}

@media (max-width: 900px) {
  .intro-card {
    grid-template-columns: 1fr;
  }

  .intro-card button {
    width: 100%;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .timer-shell {
    grid-template-columns: 1fr;
  }

  .timer-card {
    min-height: 440px;
  }
}
