/* FloorQuote — an estimate sheet on a showroom counter: warm paper, oak accent,
   numbers in mono. Deliberately unlike the hub and unlike every other section. */
:root {
  --bg: #faf7f2;
  --paper: #ffffff;
  --fg: #1c1a17;
  --muted: #6d6459;
  --line: #e4ddd2;
  --line-2: #cfc5b6;
  --accent: #a8622a;
  --accent-soft: #f4e7da;
  --ok: #2f7d52;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.62 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 20px; }

/* top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.bar a { color: var(--muted); text-decoration: none; }
.bar a:hover { color: var(--fg); }
.bar .id { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.bar .id img { width: 26px; height: 26px; border-radius: 7px; display: block; }

/* hero */
.hero { padding: clamp(34px, 8vw, 60px) 0 clamp(20px, 5vw, 34px); }
h1 {
  font-size: clamp(1.95rem, 6.2vw, 2.85rem);
  line-height: 1.09; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 700;
}
h2 { font-size: clamp(1.3rem, 4vw, 1.6rem); letter-spacing: -0.02em; margin: 2.2em 0 0.6em; }
h3 { font-size: 1.08rem; margin: 1.6em 0 0.4em; }
.sub { font-size: clamp(1.04rem, 3.2vw, 1.2rem); color: var(--muted); margin: 0 0 24px; max-width: 34rem; }
.lede { color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 650;
  text-decoration: none; padding: 12px 20px; border-radius: 11px;
}
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }

/* calculator */
.calc {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin: 26px 0; box-shadow: 0 1px 2px rgba(28, 26, 23, 0.04);
}
.calc h2 { margin-top: 0; }
.units { display: flex; gap: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; width: max-content; margin-bottom: 18px; }
.units button {
  appearance: none; border: 0; background: transparent; font: inherit; font-size: 0.92rem;
  padding: 8px 16px; cursor: pointer; color: var(--muted);
}
.units button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }

.rooms { display: grid; gap: 10px; }
.room {
  display: grid; grid-template-columns: 1fr 5.5rem 5.5rem 6.5rem 2rem; gap: 8px; align-items: end;
}
.room .lbl { font-size: 0.76rem; color: var(--muted); display: block; margin-bottom: 3px; letter-spacing: 0.01em; }
.room input { width: 100%; }
.room .area { font-family: var(--mono); font-size: 0.95rem; padding-bottom: 9px; color: var(--muted); }
.room .drop {
  appearance: none; border: 0; background: transparent; color: var(--line-2);
  font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 0 7px;
}
.room .drop:hover { color: var(--accent); }
@media (max-width: 560px) {
  .room { grid-template-columns: 1fr 1fr; grid-template-areas: "name name" "len wid" "area drop"; }
  .room > :nth-child(1) { grid-area: name; }
  .room > :nth-child(2) { grid-area: len; }
  .room > :nth-child(3) { grid-area: wid; }
  .room .area { grid-area: area; }
  .room .drop { grid-area: drop; justify-self: end; }
}

input, select {
  font: inherit; font-size: 0.98rem; padding: 9px 10px; border: 1px solid var(--line-2);
  border-radius: 9px; background: var(--paper); color: var(--fg); width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.addrow {
  appearance: none; background: transparent; border: 1px dashed var(--line-2); color: var(--muted);
  font: inherit; font-size: 0.9rem; padding: 9px 14px; border-radius: 9px; cursor: pointer; margin-top: 10px;
}
.addrow:hover { border-color: var(--accent); color: var(--accent); }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 12px; margin-top: 20px; }
.fields label { display: block; }
.fields .lbl { font-size: 0.76rem; color: var(--muted); display: block; margin-bottom: 4px; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 8px 0 0; }

/* result */
.out { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-bottom: 14px; }
.headline .big { font-family: var(--mono); font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; }
.headline .unit { color: var(--muted); font-size: 1rem; }
.lines { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.lines th, .lines td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); }
.lines td:last-child, .lines th:last-child { text-align: right; font-family: var(--mono); }
.lines tr.sum td { font-weight: 650; border-bottom: 0; padding-top: 11px; }
.lines tr.sum td:last-child { font-size: 1.12rem; }
.lines .sub td { color: var(--muted); }

.note { background: var(--accent-soft); border-radius: 11px; padding: 14px 16px; margin: 20px 0; font-size: 0.94rem; }
.note b { font-weight: 650; }

/* content */
section { margin: 2.4em 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
li { margin: 0.4em 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1em 0; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.data th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.data td:not(:first-child) { font-family: var(--mono); }
code { font-family: var(--mono); font-size: 0.92em; background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; }

.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; margin: 1.1em 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0.05em;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-weight: 650; font-size: 0.88rem;
  display: grid; place-items: center;
}
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 0.96rem; }

.shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.shots img { width: 232px; height: auto; border-radius: 14px; border: 1px solid var(--line); flex: none; }

.reviewed { color: var(--muted); font-size: 0.85rem; }
footer { border-top: 1px solid var(--line); margin-top: 3em; padding: 20px 0 40px; color: var(--muted); font-size: 0.9rem; }
footer a { color: var(--muted); }
table.data td.wrap-ok { font-family: inherit; }
