.tacho-tool {
  display: grid;
  gap: 22px;
  margin: 0 auto 56px;
}

.tacho-help,
.tacho-field-card,
.tacho-result,
.tacho-legal {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.tacho-help {
  padding: 20px;
}

.tacho-help-title {
  margin: 0 0 16px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.tacho-help-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  align-items: start;
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  font-size: 0.92rem;
}

.tacho-help-list li {
  margin: 0;
  padding: 0.35rem 0.45rem;
}

.tacho-help-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-left: 4px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.1);
  font-weight: 700;
  line-height: 1.55;
}

.tacho-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.tacho-form h2,
.tacho-actions {
  grid-column: 1 / -1;
}

.tacho-form h2 {
  margin-bottom: 0;
}

.tacho-field-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px;
}

.tacho-field-card h3 {
  min-height: 2.6em;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.tacho-time-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.tacho-mini-field,
.tacho-select-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

.tacho-mini-field span,
.tacho-select-field span {
  display: block;
}

.tacho-field-card input,
.tacho-field-card select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 42, 15, 0.18);
  border-radius: 6px;
  box-sizing: border-box;
  font: inherit;
}

.tacho-compact-input {
  width: 7.4rem;
  max-width: 100%;
}

.tacho-select-field {
  width: min(100%, 20rem);
}

.tacho-select-field select {
  width: 100%;
}

.tacho-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 2px;
}

.tacho-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 132px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tacho-cta:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.tacho-cta:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.42);
  outline-offset: 3px;
}

.tacho-result,
.tacho-legal {
  padding: 18px;
}

.tacho-result h2 {
  margin-top: 0;
}

.tacho-status {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-weight: 700;
}

.tacho-status[data-status="correct"] {
  background: rgba(0, 120, 70, 0.16);
}

.tacho-status[data-status="warning"] {
  background: rgba(190, 135, 0, 0.2);
}

.tacho-status[data-status="breach"] {
  background: rgba(180, 35, 24, 0.2);
}

.tacho-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.tacho-result-card {
  display: flex;
  flex-direction: column;
  min-height: 118px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.tacho-result-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.3;
}

.tacho-result-card p,
.tacho-legal p {
  margin: 0;
  line-height: 1.55;
}

.tacho-result-card[data-level="correct"] {
  border-left: 5px solid #5ecb8b;
}

.tacho-result-card[data-level="warning"] {
  border-left: 5px solid #d7a520;
}

.tacho-result-card[data-level="breach"] {
  border-left: 5px solid #d96b5f;
}

@media (min-width: 1100px) {
  .tacho-help-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
    row-gap: 0.85rem;
  }
}

@media (max-width: 760px) {
  .tacho-grid,
  .tacho-result-grid {
    grid-template-columns: 1fr;
  }

  .tacho-field-card h3 {
    min-height: auto;
  }

  .tacho-actions {
    align-items: stretch;
  }

  .tacho-cta {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .tacho-time-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tacho-compact-input {
    width: 100%;
  }
}
