.climate-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.85fr) minmax(0, 2.35fr);
  gap: 1.25rem;
  align-items: start;
}
.climate-card {
  min-width: 0;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border: 1px solid #cbd6da;
  border-radius: 1rem;
  background: #fff;
  color: #172a35;
}
.climate-card h2 { margin: 0 0 0.5rem; }
.climate-card p { margin: 0.5rem 0 0.85rem; }
.climate-note, .climate-key-help { color: #455867; font-size: 0.9rem; }
#climate-source { margin: 1rem 0; }
#climate-source div { padding: 0.35rem 0; border-top: 1px solid #e1e8ec; }
#climate-source dt { font-size: 0.9rem; }
#climate-source dd { margin: 0.2rem 0 0; }
#climate-source button { cursor: grab; }
.climate-data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.climate-data caption { text-align: left; font-weight: 750; margin-bottom: 0.35rem; }
.climate-data th, .climate-data td { padding: 0.28rem; text-align: center; }
.climate-data th:first-child { text-align: left; }
.climate-data thead { background: #e8f0f3; font-size: 0.875rem; }
.climate-data tbody tr:nth-child(even) { background: #f2f6f7; }
.climate-card .temp { color: #a7193d; fill: #a7193d; }
.climate-card .rain { color: #154e9e; fill: #154e9e; }
.climate-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.climate-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.5rem; margin-top: 0.9rem; }
.climate-button, .climate-field {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #8499a4;
  border-radius: 0.55rem;
  background: #f5f8fa;
  color: #172a35;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.climate-field { text-align: left; background: #fff; border-style: dashed; }
.climate-field span, .climate-field strong { display: block; }
.climate-field span { font-size: 0.88rem; font-weight: 500; }
.climate-button[aria-pressed="true"] { border-color: currentColor; box-shadow: inset 0 0 0 2px currentColor; background: #e6eef7; }
.climate-button.temp[aria-pressed="true"] { background: #fbe8ed; }
.climate-button:focus-visible, .climate-field:focus-visible, #climate-chart:focus-visible { outline: 3px solid #975104; outline-offset: 3px; }
#climate-chart { display: block; width: 100%; height: auto; margin: 0.5rem 0 0.8rem; cursor: crosshair; touch-action: manipulation; user-select: none; }
#climate-chart text { font-size: 20px; text-anchor: middle; dominant-baseline: middle; }
#climate-chart .axis-left { text-anchor: end; }
#climate-chart .axis-right { text-anchor: start; }
.chart-paper { fill: #fafcfd; }
.grid-minor { stroke: #c6ced4; stroke-width: 0.6; }
.grid-major { stroke: #667888; stroke-width: 1; }
.grid-zero { stroke: #263d4f; stroke-width: 2; }
.rain-bar { fill: #6a9bc4; }
.rain-upper { fill: #254a9a; }
.temp-line { stroke: #a7193d; stroke-width: 3; }
.temp-point { fill: #a7193d; stroke: #fff; stroke-width: 1.5; }
.keyboard-point { fill: none; stroke: #172a35; stroke-width: 2; }
.climate-button.check { background: #143649; color: #fff; border-color: #143649; }
#climate-result:not([hidden]) { margin-top: 1rem; padding: 0.9rem; border-radius: 0.6rem; background: #eaf2f6; }
#climate-result h3 { margin: 0; }
#climate-result summary { cursor: pointer; min-height: 44px; align-content: center; }
@media (max-width: 680px) {
  .climate-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
  .climate-key-help { display: none; }
}

.climate-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #cbd6da;
}
.climate-tabs button {
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0.5rem 0.5rem 0 0;
  background: transparent;
  color: #23483e;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.climate-tabs button[aria-selected="true"] {
  border-bottom-color: #20715c;
  background: #e0efe9;
}
.climate-tabs button:focus-visible { outline: 3px solid #975104; outline-offset: -3px; }

.climate-reading {
  max-width: 930px;
}
.reading-chart { margin: 0 0 1.25rem; }
.reading-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin: 0.75rem 0 0.45rem;
}
.reading-summary dt { font-size: 0.9rem; }
.reading-summary dd { margin: 0; font-size: 1.15rem; font-weight: 750; }
#reading-chart { display: block; width: 100%; height: auto; }
#reading-chart text { font-size: 20px; }
.reading-chart figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
  font-weight: 650;
}
#reading-values summary { display: block; min-height: 44px; padding: 0.6rem 0; cursor: pointer; color: #23483e; }
#reading-values summary::before { content: "+ "; }
#reading-values[open] summary::before { content: "− "; }
.reading-table { width: 100%; border-collapse: collapse; }
.reading-table caption { margin-top: 0.5rem; }
.reading-table th, .reading-table td { padding: 0.5rem; border-bottom: 1px solid #dfe7ea; }
.reading-form .reading-table th { text-align: left; }
.reading-table thead { background: #e8f0f3; }
.reading-form .reading-table { margin-bottom: 1.6rem; }
.reading-answer { display: inline-flex; flex-direction: column; vertical-align: middle; max-width: 100%; }
.reading-answer input, .reading-answer select {
  min-height: 44px;
  max-width: 100%;
  width: 10rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #8499a4;
  border-radius: 0.45rem;
  background: #fff;
  color: #172a35;
  font: inherit;
}
.reading-answer :focus-visible { outline: 3px solid #975104; outline-offset: 2px; }
.reading-answer [data-checked="right"] { border-color: #20715c; background: #eaf5ee; }
.reading-answer [data-checked="retry"] { border-color: #a7193d; background: #fdf2f4; }
.reading-feedback { font-size: 0.85rem; }
.reading-feedback:empty { display: none; }
.reading-text {
  padding: 0.55rem 0.9rem;
  margin: 0 0 1rem;
  border-left: 3px solid #5a9886;
  background: #f1f7f5;
}
.reading-text p { line-height: 2.4; }
.reading-text .reading-answer { margin: 0.15rem 0; }
.reading-text input[inputmode="decimal"] { width: 5rem; }
#reading-result:empty { display: none; }
#reading-result { font-weight: 700; }
@media (max-width: 500px) {
  .reading-table th, .reading-table td { padding: 0.4rem 0.2rem; }
  .reading-form .reading-table { table-layout: fixed; }
  .reading-form .reading-table th:first-child { width: 58%; }
  .reading-table thead { overflow-wrap: anywhere; }
  #reading-chart text { font-size: 23px; }
}
