/* Shared styles — home-improvement calculator portfolio */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #16202a;
  --muted: #5b6774;
  --border: #e2e6eb;
  --brand: #0d7a6f;
  --brand-ink: #0a5f56;
  --brand-soft: #e2f4f1;
  --accent: #f0a020;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,32,42,.04), 0 6px 20px rgba(16,32,42,.06);
  --maxw: 880px;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1418; --surface: #151d23; --surface-2: #1c262d;
    --text: #e8edf1; --muted: #9aa7b2; --border: #263139;
    --brand: #2bb3a3; --brand-ink: #4fd0c0; --brand-soft: #16302c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6; font-size: 17px;
}
a { color: var(--brand-ink); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--brand); }
nav.site a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: .95rem; }
nav.site a:hover { color: var(--text); }

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.02em; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}
.calc { margin: 24px 0; }
.calc-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); padding: 7px 14px;
  border-radius: 7px; cursor: pointer; font-size: .9rem; font-weight: 600;
}
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field .row { display: flex; gap: 10px; }
input[type="number"], select {
  width: 100%; padding: 10px 12px; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
}
input[type="number"]:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.result { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.result h2 { margin: 0 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-ink); }
.result .big { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.result .big small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.result ul { list-style: none; padding: 0; margin: 14px 0 0; }
.result li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--border); font-size: .95rem; }
.result li span:first-child { color: var(--muted); }
.result li b { font-weight: 700; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 12px; }

.prose { margin: 40px 0; }
.prose h2 { font-size: 1.5rem; margin: 32px 0 10px; letter-spacing: -.01em; }
.prose h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--text); }
.prose .muted { color: var(--muted); }
details { border-top: 1px solid var(--border); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; margin: 24px 0; }
.tile { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: transform .08s ease; }
.tile:hover { transform: translateY(-2px); }
.tile b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: .9rem; }
.tile.soon { opacity: .55; }
.tile.soon:hover { transform: none; }

footer.site { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: .88rem; }
footer.site a { color: var(--muted); }
.disc { font-size: .8rem; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 10px 14px; margin: 18px 0; }
