/* SOLVLET — Lab / おうちのメンテ手帳
   Page-only additions. Colours come only from the tokens in /style.css,
   so dark mode follows by itself. No animation anywhere. */

.ie-block {
  max-width: var(--frame);
  margin: 0 0 clamp(2rem, 5vw, 2.75rem);
}

.ie-h {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.ie-help {
  max-width: var(--measure);
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.ie-help--tight { margin: 0; }

/* ---- 家のこと ---- */

.ie-rows {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
}

.ie-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}

@media (min-width: 600px) {
  .ie-rows { gap: 0.75rem; }
  .ie-row {
    grid-template-columns: 13em minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
  }
}

.ie-label {
  font-size: 0.95rem;
  color: var(--ink);
}

.ie-ctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-width: 0;
}
.ie-ctrl--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.ie-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 0.95rem;
}

.ie-select.field {
  width: auto;
  padding-inline: 0.5rem;
}

.ie-check {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--accent);
}
.ie-row .ie-ctrl:has(.ie-check) { min-height: 44px; }

/* Year + month selects side by side. */
.ie-ym {
  display: inline-flex;
  gap: 0.25rem;
}
.ie-ym .field {
  width: auto;
  min-width: 0;
  padding-inline: 0.4rem;
}

/* ---- 設備 ---- */

.ie-scroll {
  position: relative; /* keeps the hidden .vh headers inside the scroll box */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
}

.ie-table,
.ie-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.ie-table { min-width: 42rem; }
.ie-result-table { min-width: 34rem; }

.ie-table th,
.ie-result-table thead th {
  padding: 0.25rem 0.5rem 0.25rem 0;
  font-weight: 500;
  text-align: left;
  color: var(--ink-muted);
  white-space: nowrap;
}

.ie-table td {
  padding: 0.25rem 0.5rem 0.25rem 0;
  vertical-align: middle;
  white-space: nowrap;
}

.ie-table th:nth-child(3) { width: 6em; white-space: normal; line-height: 1.4; }
.ie-table th:nth-child(5),
.ie-table td:nth-child(5) { width: 1%; }

.ie-table .field[list] { width: 100%; min-width: 9em; padding-inline: 0.4rem; }
.ie-table .field[type="number"] { width: 100%; min-width: 4em; padding-inline: 0.4rem; }

.ie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.5rem;
}
.ie-actions .btn { white-space: nowrap; }

.ie-status {
  min-height: 1.6em;
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ---- 結果 ---- */

.ie-empty {
  max-width: var(--measure);
  color: var(--ink-muted);
}

.ie-summary {
  margin: 0 0 1rem;
  font-variant-numeric: tabular-nums;
}

.ie-result-table tbody th,
.ie-result-table td {
  padding: 0.5rem 1rem 0.5rem 0;
  border-top: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}
.ie-result-table tbody th { min-width: 9em; }
.ie-result-table .ie-date,
.ie-result-table .ie-left { white-space: nowrap; }
.ie-result-table .ie-basis {
  min-width: 14em;
  padding-right: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.ie-result-table .is-over .ie-left { color: var(--accent-ink); font-weight: 600; }
.ie-result-table .is-soon .ie-left { color: var(--ink); }
.ie-result-table .is-later .ie-left,
.ie-result-table .is-later .ie-date { color: var(--ink-muted); }
.ie-result-table .is-note th,
.ie-result-table .is-note td { color: var(--ink-muted); }
