/* ClearQuip — soft slate + teal, light UI, mobile-first */
:root {
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --bg-elev: #f1f4f7;
  --bg-hover: #eef2f6;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  display: inline-block;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}
.brand-text { line-height: 1; }
.nav-toggle {
  display: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.nav-links {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 0.25rem 1.1rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.15rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 0.55rem 0; }
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}
.page-intro { margin-bottom: 1.5rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.page-intro h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.lede {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 40rem;
}
.tools-brand-sub {
  display: block;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.hero {
  text-align: left;
  padding: 1.5rem 0 0.5rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.hero .tagline {
  margin: 0.75rem 0 0;
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 32rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
}

.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.tools-hub-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tools-hub-card:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.12);
}
.tools-hub-card .card-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.tools-hub-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.tools-hub-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }

.section-title {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.prose { color: var(--muted); max-width: 40rem; }
.prose p { margin: 0 0 1rem; }
.prose h2 { color: var(--text); font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }

/* Tools */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.75rem;
}
@media (max-width: 820px) {
  .tool-layout { grid-template-columns: 1fr; }
}
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.tool-panel h2 { margin: 0 0 1rem; font-size: 1.1rem; }
.tool-form { display: flex; flex-direction: column; gap: 0.85rem; }
.tool-form .field-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tool-form .field { flex: 1 1 140px; }
.tool-form .field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.tool-form .field input,
.tool-form .field select,
.tool-form .field textarea {
  width: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.tool-form .field input:focus,
.tool-form .field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
.tool-form .field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0;
}
.checkbox-field label { margin: 0; font-weight: 500; color: var(--text); cursor: pointer; }
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.35rem;
}
.tool-result {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  min-height: 8rem;
}
.tool-result.is-empty { color: var(--muted); font-size: 0.95rem; }
.tool-result .result-hero {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0.5rem;
  color: var(--text);
}
.tool-result .result-hero .unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.25rem;
}
.tool-result .result-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.tool-result dl.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 0.75rem 0 0;
}
@media (max-width: 480px) {
  .tool-result dl.result-stats { grid-template-columns: 1fr; }
}
.tool-result dl.result-stats dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}
.tool-result dl.result-stats dd {
  margin: 0.15rem 0 0;
  font-weight: 650;
  font-size: 1.05rem;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
}
.badge-ok { background: rgba(16, 185, 129, 0.15); color: #047857; }
.badge-warn { background: rgba(245, 158, 11, 0.18); color: #b45309; }
.badge-no { background: rgba(239, 68, 68, 0.14); color: #b91c1c; }
.badge-info { background: rgba(14, 165, 233, 0.14); color: #0369a1; }
.status-line.is-error { color: #b91c1c; margin: 0; }

.tool-disclaimer {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}
.tool-disclaimer strong { color: var(--text); }

.sponsored-slot {
  margin: 1.75rem 0 0.5rem;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.sponsored-slot .sponsored-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  margin: 0 0 0.5rem;
}
.sponsored-slot .sponsored-box {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem;
  text-align: center;
}

.tool-nav-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
}
.tool-nav-extra a { color: var(--muted); }
.tool-nav-extra a:hover { color: var(--accent); }

.room-rows { display: flex; flex-direction: column; gap: 0.55rem; }
.room-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 0.5rem;
  align-items: end;
}
@media (max-width: 560px) {
  .room-row { grid-template-columns: 1fr 1fr; }
  .room-row .room-remove { grid-column: 1 / -1; }
}
.room-row label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.room-row input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
}
.btn-tiny {
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}
.btn-tiny:hover { color: var(--text); background: var(--bg-hover); }

.amort-table-wrap {
  max-height: 280px;
  overflow: auto;
  margin-top: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.amort-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.amort-table-wrap th,
.amort-table-wrap td {
  padding: 0.35rem 0.55rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.amort-table-wrap th:first-child,
.amort-table-wrap td:first-child { text-align: left; }
.amort-table-wrap th {
  position: sticky; top: 0;
  background: var(--bg-card);
  color: var(--muted);
  font-weight: 650;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.method-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
  line-height: 1.45;
}

.soft-cta {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  border: 1px solid rgba(13, 148, 136, 0.2);
  font-size: 0.95rem;
}
.soft-cta a { font-weight: 600; }
.coming-soon {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
}
