/* Quiet Lark Studio — bill-savings tools */
.tool-main {
  padding-bottom: 3.4rem;
}

.tool-header {
  padding: 3.2rem 0 1.2rem;
  max-width: 46rem;
}

.tool-header h1 {
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(2.05rem, 4.5vw, 3.15rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0.4rem 0 0.8rem;
}

.tool-header .dek {
  margin: 0;
  max-width: 40rem;
}

.tool-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 1rem;
}

.tool-copy {
  max-width: 70ch;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.75;
}

.tool-copy p { margin: 0 0 1.15rem; }
.tool-copy h2 {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2.2rem 0 0.8rem;
}
.tool-copy h3 {
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 1.8rem 0 0.6rem;
}
.tool-copy ul,
.tool-copy ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.tool-copy li + li { margin-top: 0.35rem; }

.tool-copy .faq-list { margin: 0 0 1.4rem; }
.tool-copy .faq-list + .faq-list { margin-top: 0; }
.faq-item { margin: 0 0 1.1rem; }
.faq-item h3 { margin-top: 0; }

.calculator {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.5rem;
  margin: 0 0 1.8rem;
}

.calculator form { margin: 0; }

.calc-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.calc-intro {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem;
  width: fit-content;
  max-width: 100%;
}

.segmented button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
}

.segmented button.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(27, 23, 19, 0.08);
}

.segmented button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1rem;
  margin: 0 0 1.05rem;
}

.field-grid-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field-span { grid-column: 1 / -1; }

.field label {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink);
}

.field .hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  width: 100%;
  line-height: 1.3;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 0.7rem;
  margin: 0 0 1rem;
}

.month-grid .field label { font-size: 0.8rem; }

.rate-meta {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0 0 1.05rem;
  line-height: 1.5;
}

.rate-meta p { margin: 0 0 0.45rem; }
.rate-meta p:last-child { margin-bottom: 0; }
.rate-headline {
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 650;
}

.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin: 0.2rem 0 0;
}

.calc-actions .btn { cursor: pointer; }

.results {
  margin-top: 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 1.1rem 1.15rem 1.15rem;
}

.results.is-save {
  background: var(--sage-soft);
  border-color: color-mix(in srgb, var(--sage) 28%, var(--line));
}

.results.is-more,
.results.is-warning {
  background: var(--callout);
  border-color: var(--callout-line);
}

.results.is-even { background: var(--bg); }

.result-heading {
  font-family: var(--serif);
  font-size: 1.28rem;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1rem;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.stat-value {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat-lead .stat-value { font-size: 1.85rem; color: var(--sage); }
.results.is-more .stat-lead .stat-value,
.results.is-warning .stat-lead .stat-value { color: var(--accent-dark); }

.stat-value small {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 0.15rem;
}

.result-note,
.result-fine,
.result-error {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.9rem 0 0;
  line-height: 1.5;
}

.result-error { color: var(--accent-dark); font-weight: 600; }

.result-alert {
  margin: 0.95rem 0 0;
  padding: 0.8rem 0.9rem;
  background: #fff;
  border: 1px solid var(--callout-line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
}

.solar-box {
  background: var(--sage-soft);
  border: 1px solid color-mix(in srgb, var(--sage) 22%, var(--line));
  border-radius: 14px;
  padding: 1.1rem 1.2rem 1.2rem;
  margin: 1.4rem 0 1.6rem;
  font-family: var(--sans);
}

.solar-box h2,
.solar-box .solar-title {
  font-family: var(--serif);
  font-size: 1.28rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.solar-box p { margin: 0 0 0.5rem; color: var(--ink); }
.solar-box p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.92rem; }

.shop-cta { margin: 0.4rem 0 1.2rem; }

.disclosure-block,
.disclaimer-block {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 1.8rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.disclosure-block h2,
.disclaimer-block h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.tools-index .hero h1 { max-width: 18ch; }

@media (max-width: 720px) {
  .tools-index .hero h1 { max-width: none; }
}

.tool-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 0 0 2.4rem;
}

.tool-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.35rem 1.4rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.tool-card h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0.15rem 0 0.4rem;
  letter-spacing: -0.02em;
}

.tool-card p { margin: 0; color: var(--muted); }

.utility-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 0 0 2.6rem;
}

.utility-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1.05rem 1.05rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

a.utility-card:hover { color: inherit; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.utility-card h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  margin: 0.15rem 0 0.25rem;
}

.utility-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

@media (min-width: 720px) {
  .tool-cards { grid-template-columns: 1fr 1fr; }
  .utility-grid { grid-template-columns: 1fr 1fr 1fr; }
  .month-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .calculator { padding: 1.1rem 0.95rem 1.2rem; }
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented { border-radius: 16px; }
  .stat-lead .stat-value { font-size: 1.6rem; }
  .site-nav { gap: 0.15rem 0.9rem; }
}

.cta-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem 1.3rem;
  margin: 0 0 1.6rem;
  font-family: var(--sans);
}
.cta-box h2 {
  font-family: var(--serif);
  font-size: 1.28rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}
.cta-box p { margin: 0 0 0.7rem; }
.cta-box p:last-child { margin-bottom: 0; }

.year-chart {
  margin: 1.15rem 0 0.4rem;
}
.year-chart svg {
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
}
.year-chart .axis { stroke: var(--line); stroke-width: 1; }
.year-chart .zero { stroke: color-mix(in srgb, var(--muted) 45%, transparent); stroke-width: 1; stroke-dasharray: 3 4; }
.year-chart .cost { stroke: var(--accent-dark); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.year-chart .savings { fill: none; stroke: var(--sage); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.year-chart text {
  font-family: var(--sans);
  font-size: 10px;
  fill: var(--muted);
}
.year-chart .axis-label { font-size: 11px; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  margin: 0.55rem 0 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
}
.swatch {
  display: inline-block;
  width: 1.1rem;
  height: 0.18rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  border-radius: 2px;
}
.swatch-savings { background: var(--sage); }
.swatch-cost {
  background: repeating-linear-gradient(90deg, var(--accent-dark), var(--accent-dark) 5px, transparent 5px, transparent 9px);
}

.year-table-wrap {
  margin: 0.9rem 0 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.year-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.year-table th,
.year-table td {
  padding: 0.45rem 0.7rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.year-table th:first-child,
.year-table td:first-child { text-align: left; }
.year-table th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: var(--bg);
}
.year-table tr:last-child td { border-bottom: 0; }
.year-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg) 70%, #fff); }

@media (min-width: 960px) {
  .tool-cards { grid-template-columns: 1fr 1fr 1fr; }
}
