/* Light only, on purpose: a page that asks for a document and a price has to look like paper, and one theme is
   one thing to get right. Inter for everything; the weight does the work the serif used to. */
@font-face { font-family: Inter; src: url(/fonts/inter-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #faf8f4; --card: #ffffff; --ink: #16201c; --muted: #5f6b66; --line: #e6e0d6;
  --accent: #1f5c4a; --accent-ink: #ffffff; --accent-soft: #e8f1ec; --bad: #b3261e; --warm: #c8862a;
  --radius: 12px; --shadow: 0 1px 2px rgba(22,32,28,.05), 0 8px 24px rgba(22,32,28,.06);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 750; margin-bottom: 20px; }
h3 { font-size: 18px; font-weight: 700; }
.accent { color: var(--accent); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }

/* header and footer */
.top { max-width: 1120px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav .cta { color: var(--accent); font-weight: 600; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 72px; }
.foot div { max-width: 1120px; margin: 0 auto; padding: 28px 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* layout */
.page { max-width: 680px; margin: 0 auto; padding: 24px 20px; }
.page.narrow { max-width: 380px; }
.page.wide { max-width: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { margin-top: 88px; }
.lead { font-size: 19px; color: #36423d; max-width: 560px; margin: 20px 0 0; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; margin-top: 40px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 10px; font-weight: 650; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #184a3b; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #cfc7ba; }
.micro { margin-top: 16px; font-size: 14px; color: var(--muted); }
.micro span + span::before { content: "·"; margin: 0 8px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; margin-bottom: 20px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* the example result: what you get, shown before you give anything */
.sample { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 24px; }
.sample .tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warm); }
.sample .what { font-size: 15px; color: var(--muted); margin: 6px 0 18px; }
.sample .big { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.sample .big small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.range { position: relative; height: 10px; border-radius: 99px; margin: 26px 0 8px;
  background: linear-gradient(90deg, #cfe5da 0%, var(--accent-soft) 50%, #f3dcc0 100%); }
.range .band { position: absolute; left: 22%; right: 30%; top: 0; bottom: 0; border-radius: 99px; background: rgba(31,92,74,.28); }
.range .you { position: absolute; left: 58%; top: -7px; width: 4px; height: 24px; border-radius: 2px; background: var(--ink); }
.range .you::after { content: "il tuo"; position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.verdict { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 15px; }
.rows { list-style: none; padding: 0; margin: 18px 0 0; font-size: 14px; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rows b { font-weight: 650; }
.rows .m { color: var(--muted); grid-column: 1 / -1; }

/* steps, checks, closing */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; margin-bottom: 14px; }
.step p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 15px; }
.split { display: grid; grid-template-columns: 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.split > div { padding: 28px; }
.split > div + div { border-left: 1px solid var(--line); }
.split ul { margin: 14px 0 0; padding-left: 0; list-style: none; }
.split li { padding: 6px 0 6px 26px; position: relative; }
.split .yes li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.split .no li::before { content: "–"; position: absolute; left: 2px; color: var(--muted); font-weight: 800; }
.split .no li { color: var(--muted); }
.closing { background: var(--accent); color: var(--accent-ink); border-radius: 20px; padding: 48px; display: flex;
  justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.closing h2 { margin: 0; }
.closing p { margin: 8px 0 0; opacity: .85; }
.closing .btn { background: #fff; color: var(--accent); }

/* forms */
.form { display: grid; gap: 22px; margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow); }
.page h1 { font-size: clamp(28px, 4vw, 36px); margin-top: 8px; }
.field { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.field > label, legend { font-weight: 650; }
input:not([type=checkbox]):not([type=radio]), select { font: inherit; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
.opt-line, .field > .opt-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 2px 0; }
.opt-line input { margin-top: 4px; flex: none; }
.hint { color: var(--muted); font-size: 14px; font-weight: 400; margin: 0; }
.opt { color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; border: 1px solid var(--line);
  border-radius: 4px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; vertical-align: 2px; }
.note { font-size: 14px; background: #fbf6ec; border: 1px solid #f0e2c6; border-radius: 10px; padding: 12px 14px; margin: 4px 0 0; }
.err { color: var(--bad); font-size: 14px; margin: 0; }
.bad input, .bad select { border-color: var(--bad); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pair { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.sub { font-weight: 650; margin-top: 12px; }
.optional-box { border: 1px dashed #d5cdbf; border-radius: 12px; padding: 14px 16px; margin: 4px 0; display: grid; gap: 8px; }
.optional-box legend { font-weight: 650; padding: 0 6px; }
button { font: inherit; font-weight: 650; padding: 14px 22px; border: 0; border-radius: 10px; background: var(--accent); color: #fff;
  cursor: pointer; justify-self: start; }
button:hover { background: #184a3b; }
button.link { background: none; color: var(--accent); padding: 0; text-decoration: underline; font-weight: 400; }
form.inline { display: inline; }
.back { font-size: 15px; }

/* admin */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; font-size: 14px; background: var(--card); }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
tr.todo td:first-child { border-left: 3px solid var(--accent); }

@media (max-width: 860px) {
  .hero, .steps, .split { grid-template-columns: 1fr; }
  .hero { gap: 36px; margin-top: 16px; }
  .split > div + div { border-left: 0; border-top: 1px solid var(--line); }
  section { margin-top: 64px; }
  .closing { padding: 32px 24px; }
  .nav a:not(.cta) { display: none; }
  .form { padding: 20px; }
}
input[type=file] { padding: 10px; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 8px 14px; border: 0;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; width: 100%; resize: vertical; }
.form h3 { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.counters { display: flex; gap: 8px; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; border-radius: 999px; padding: 2px 10px; margin-left: 6px; white-space: nowrap; }
.badge.fill { background: #fbecd2; color: #8a5a12; }
.badge.reply { background: var(--accent-soft); color: var(--accent); }
.counters .badge { margin-left: 0; font-size: 13px; padding: 4px 12px; }
a.status { text-decoration: none; }
.stages { list-style: none; padding: 0; margin: 28px 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: st; }
.stages li { position: relative; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.stages li h3 { color: var(--ink); margin-top: 6px; }
.stages li p { margin: 8px 0 0; font-size: 15px; }
.stages .when { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.stages li.now { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.stages li.now .when { color: var(--accent); }
.stages li.now .when::after { content: " · siamo qui"; }
.stages li:not(.now) { background: transparent; border-style: dashed; }
@media (max-width: 860px) { .stages { grid-template-columns: 1fr; } }
.letter { white-space: pre-wrap; font: 14px/1.55 ui-monospace, Menlo, monospace; background: #fbfaf7; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.filters select { width: auto; }
.tables section { margin-top: 32px; }
.tables h2 { font-size: 20px; margin-bottom: 10px; }
tr.thin td { color: var(--muted); }
/* the appliance brand appears only once "Elettrodomestici" is ticked: CSS alone, no script */
.appliance-brand { display: none; margin: 4px 0 6px 28px; }
.field:has(input[name=inclAppliances]:checked) .appliance-brand { display: grid; gap: 6px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 2px 12px; }
/* two questions side by side read badly on a phone: one under the other (month and year stay side by side) */
@media (max-width: 560px) { .pair.stack { grid-template-columns: 1fr; } }

/* frequently asked questions on the home: plain text, one question after the other */
.faq h3 { font-size: 19px; margin: 28px 0 8px; }
.faq p { margin: 0; color: var(--muted); max-width: 72ch; }

/* admin: the three periods of the visits page */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 2px; }
.kpi b { font-size: 32px; line-height: 1.1; }
.kpi small { color: var(--muted); font-size: 13px; }

/* year and month of the quote: two labelled columns, the year first because it is the one required */
.pair.dates { grid-template-columns: 1fr 1fr; }
.pair.dates > div { display: grid; gap: 4px; }
.pair.dates .sub { margin-top: 0; font-size: 14px; }


/* the way across between the two paths, on top of each form: a card, not a grey line nobody reads */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 24px;
  padding: 14px 16px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft);
  color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.45; }
.switch b { display: block; color: var(--accent); }
.switch .go { flex: none; font-weight: 650; color: var(--accent); white-space: nowrap; }
.switch:hover { background: #dcebe3; }
@media (max-width: 560px) { .switch { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* admin: the reply draft, edited by hand before it goes */
textarea.reply { width: 100%; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }

/* "more than one quote?": the reason to send all of them, on the upload and thank-you pages */
.many { margin: 4px 0 24px; padding: 14px 16px; border-left: 3px solid var(--warm); background: #fbf6ec; border-radius: 0 10px 10px 0; font-size: 15px; }
.many p { margin: 0 0 10px; }
.many p:last-child { margin-bottom: 0; }

/* the guide: long text, so headings with air and lists that breathe */
.guide h2 { margin: 36px 0 10px; }
.guide h3 { font-size: 19px; margin: 22px 0 6px; }
.guide p, .guide li { line-height: 1.65; }
.guide li { margin: 4px 0; }
.guide .closing { margin-top: 40px; }

/* a form already sent: the button says so and does not take a second tap */
button:disabled { opacity: .65; cursor: wait; }

/* early access without an email: greyed out, and the line that says why shows only then */
.optional-box .need { display: none; }
.optional-box.off .opt-line { opacity: .5; }
.optional-box.off .need { display: block; color: var(--warm); }

/* yes / no / don't know on one row; on a phone the answers go under the question */
.three { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 4px 0; }
.three-a { display: flex; gap: 16px; }
.three-a label { display: flex; align-items: center; gap: 6px; font-weight: 400; white-space: nowrap; }
