/* myenfia: a tax document, not a landing page. Light only, hairline rules, square edges. */
:root {
  --ink: #111111;
  --ink-2: #3d3d3d;
  --muted: #767676;
  --rule: #111111;
  --hair: #dedede;
  --field: #c8c8c8;
  --bg: #ffffff;
  --tint: #f5f5f3;
  --accent: #12355b;     /* single institutional blue: selection, focus, map zone */
  --good: #1f5f3f;
  --display: "Sofia Sans Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --sans: "Sofia Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; border-radius: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--sans); font-feature-settings: "tnum" 1, "lnum" 1;
}
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* masthead */
.masthead { border-bottom: 1px solid var(--rule); background: var(--bg); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.wordmark { font: 600 22px/1 var(--display); letter-spacing: 0; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 13px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.lang button { background: none; border: 0; padding: 4px 0; margin-left: 12px; font: 500 13px var(--sans); color: var(--muted); cursor: pointer; letter-spacing: .04em; }
.lang button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--ink); }

/* intro: title + facts table on one band */
.intro { display: grid; grid-template-columns: 1fr; gap: 24px; padding-top: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
h1 { margin: 0; font: 500 clamp(40px, 6.5vw, 72px)/.95 var(--display); letter-spacing: -.015em; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hair); }
.facts div { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
@media (min-width: 960px) {
  .intro { grid-template-columns: 1fr auto; align-items: end; padding-top: 56px; }
  .facts { grid-template-columns: repeat(4, max-content); border-top: 0; }
  .facts dd { white-space: nowrap; }
  .facts div { padding-right: 20px !important; }
  .facts div { border-bottom: 0; border-left: 1px solid var(--hair); padding: 0 0 4px 14px; }
}

/* main grid */
.calc { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 960px) { .calc { grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: start; } }

.sheet { margin: 0; }
.part { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 28px 0 32px; border-bottom: 1px solid var(--hair); }
.part:last-child { border-bottom: 0; }
@media (min-width: 720px) { .part { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; } }
.part-title { margin: 0; font: 500 22px/1.15 var(--display); display: flex; gap: 12px; align-items: baseline; }
@media (min-width: 720px) { .part-title { flex-direction: column; gap: 6px; } }
.num { font: 500 12px var(--sans); color: var(--muted); letter-spacing: .06em; }
.num::before { content: "0"; }
.part-body { min-width: 0; }
.hint { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 4px 0 0; }
.part-body > .hint:first-child { margin: 0 0 12px; }

/* fields */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 20px 24px; align-content: start; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .span2 { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.narrow { max-width: 260px; margin-top: 10px; }
.label { font-size: 13px; font-weight: 500; color: var(--ink); }
input[type=number], input[type=text], select {
  width: 100%; height: 44px; padding: 0 12px; font: 400 16px var(--sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--field); outline: none; appearance: none; -moz-appearance: textfield;
  transition: border-color .12s;
}
input::placeholder { color: #a5a5a5; }
input:hover, select:hover { border-color: #8f8f8f; }
input:focus, select:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select { background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23111'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; cursor: pointer; }
.input-unit { position: relative; display: block; }
.input-unit input { padding-right: 56px; }
.input-unit span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.btn { height: 44px; padding: 0 20px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent); border-color: var(--accent); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--field); }
.seg label { position: relative; border-left: 1px solid var(--field); }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; text-align: center; min-height: 42px; padding: 4px 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.2; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding-top: 4px; }
.check input { position: absolute; opacity: 0; }
.check .box { flex: none; width: 18px; height: 18px; border: 1px solid var(--ink); margin-top: 1px; display: grid; place-items: center; }
.check input:checked + .box { background: var(--ink); }
.check input:checked + .box::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* search + map */
.search { position: relative; }
.search input { padding-left: 38px; }
.search input:focus { outline: none; }
.search-icon { position: absolute; left: 13px; top: 15px; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.6; pointer-events: none; }
.suggestions { position: absolute; left: 0; right: 0; top: 100%; z-index: 1100; margin: 0; padding: 0; list-style: none;
  background: var(--bg); border: 1px solid var(--ink); border-top: 0; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.suggestions li { padding: 9px 12px 9px 38px; cursor: pointer; border-top: 1px solid var(--hair); line-height: 1.3; }
.suggestions li:first-child { border-top: 0; }
.suggestions li.active { background: var(--tint); }
.s-main { display: block; font-size: 14.5px; color: var(--ink); }
.s-area { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.msg { min-height: 1.3em; margin: 8px 0 10px; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map { height: 360px; border: 1px solid var(--field); z-index: 0; }
.leaflet-container { font-family: var(--sans); background: var(--tint); }
.leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }
.leaflet-bar, .leaflet-bar a { border-radius: 0 !important; }
.leaflet-bar { border: 1px solid var(--field) !important; box-shadow: none !important; }
.leaflet-control-attribution { font-size: 10px; }
.zone-poly { fill: #12355b; fill-opacity: .08; stroke: #12355b; stroke-width: 2; }
.zone-line { stroke: #12355b; stroke-opacity: .9; stroke-dasharray: 6 5; }

.pin { width: 16px; height: 16px; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ink); border-radius: 50%; }
.zone { margin-top: 16px; }
.zone p { margin: 0; }
.zone-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.zone-table th { text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); padding: 10px 12px 2px 0; }
.zone-table td { padding: 0 12px 10px 0; font-weight: 500; vertical-align: bottom; }
.zone-table .price { text-align: right; padding-right: 0; font: 500 28px/1 var(--display); white-space: nowrap; }
.zone-table th:last-child { text-align: right; padding-right: 0; }
.zone-table small { font: 400 12px var(--sans); color: var(--muted); }
.note { margin-top: 10px !important; font-size: 12.5px; color: var(--ink-2); }
.note.strong { color: var(--ink); font-weight: 500; font-size: 13px; }
.warn { padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.choices { margin-top: 8px; border-top: 1px solid var(--hair); }
.choice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); cursor: pointer; font-size: 13.5px; }
.choice input { accent-color: var(--ink); margin: 0; }
.choice b { font-weight: 500; white-space: nowrap; }
.choice:has(input:checked) b { color: var(--accent); }
.manual { margin-top: 14px; }
.manual summary { cursor: pointer; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--field); list-style: none; }
.manual summary::-webkit-details-marker { display: none; }

/* statement (result) */
.statement { padding: 28px 0 40px; }
@media (min-width: 960px) { .statement { position: sticky; top: 0; padding-top: 28px; } }
.statement-inner { border-top: 3px solid var(--rule); }
.statement-head { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.amount { font: 500 60px/1 var(--display); letter-spacing: -.01em; margin: 22px 0 6px; }
.amount .cents { font-size: .5em; vertical-align: .62em; margin-left: 2px; }
.permonth { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.accuracy { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.placeholder { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.sect { margin: 28px 0 0; padding-bottom: 6px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
.line { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.line .l { color: var(--ink-2); }
.line .l small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.line .dots { flex: 1; border-bottom: 1px dotted #b5b5b5; transform: translateY(-4px); min-width: 12px; }
.line .v { white-space: nowrap; font-weight: 500; }
.line.indent .l { padding-left: 14px; }
.line.good .v { color: var(--good); }
.line.total { border-top: 1px solid var(--rule); border-bottom: 3px double var(--rule); margin-top: -1px; font-size: 15px; }
.line.total .l, .line.total .v { color: var(--ink); font-weight: 600; }
.params { margin: 20px 0 0; display: grid; grid-template-columns: 1fr auto; font-size: 12.5px; }
.params dt { color: var(--muted); padding: 5px 0; border-bottom: 1px solid var(--hair); }
.params dd { margin: 0; padding: 5px 0 5px 12px; text-align: right; border-bottom: 1px solid var(--hair); }

/* methodology */
.how { border-top: 1px solid var(--rule); padding-top: 40px; padding-bottom: 56px; }
.how h2 { margin: 0 0 24px; font: 500 34px/1.05 var(--display); letter-spacing: -.01em; }
.how-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 960px) { .how-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; } }
.how-text p { margin: 0 0 14px; color: var(--ink-2); max-width: 68ch; }
.how-text strong { color: var(--ink); font-weight: 600; }
.limits h3 { margin: 0; padding-bottom: 6px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
.limits ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.limits li { padding: 9px 0; border-bottom: 1px solid var(--hair); }
.disclaimer { margin: 28px 0 0; font-size: 12.5px; color: var(--muted); max-width: 80ch; }

.footer { border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--muted); padding: 18px 0 96px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }
@media (min-width: 960px) { .footer { padding-bottom: 24px; } }

.mobilebar { display: none; }
@media (max-width: 959px) {
  .mobilebar:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; }
  .mobilebar a { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; text-decoration: none; font-size: 13px; }
  .mobilebar strong { font: 500 24px var(--display); }
}
@media (max-width: 560px) {
  .map { height: 300px; }
  .amount { font-size: 48px; }
}
