/* Bernuncia: warm black on warm bone, one colour, like the landing and the mark. */
:root {
  --paper: #f3ecdf;
  --surface: #f8f4ec;
  --ink: #11110f;
  --muted: #5c574e;
  --line: #d6ccb9;
  --land: #e3d9c6;
  --bad: #8f2d1f;
  --radius: 6px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); }
a { color: inherit; }
main, .top, .foot { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--ink); color: var(--paper); }

/* header */
.top { padding-top: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 22px/1 var(--serif); text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 54px; height: auto; display: block; }

/* hero */
.hero {
  padding: 48px 0 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 0 40px; align-items: center;
}
.hero > :not(.hero-mark) { grid-column: 1; }
.hero-mark { grid-column: 2; grid-row: 1 / span 6; width: 100%; height: auto; display: block; user-select: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: rise 1.6s ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .hero-mark { grid-column: 1; grid-row: auto; width: min(78%, 320px); margin: 0 0 28px; order: -1; }
}
h1 { font: 500 clamp(36px, 6vw, 58px)/1.02 var(--serif); letter-spacing: -0.02em; margin: 0 0 18px; max-width: 12em; }
.lead { color: var(--muted); font-size: 18px; max-width: 32em; margin: 0 0 28px; }
.lead b { color: var(--ink); font: 500 16px var(--mono); }

/* search */
.search { display: flex; gap: 8px; max-width: 560px; }
.search input {
  flex: 1; min-width: 0; font: 500 19px var(--mono); padding: 14px 16px; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--surface);
}
.search input::placeholder { color: #9b9385; }
.search input:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
button {
  font: 500 15px var(--sans); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 12px 20px;
  background: var(--ink); color: var(--paper); cursor: pointer;
}
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; color: var(--ink); }
.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.hint.bad { color: var(--bad); }

/* location suggestion */
.sugestao { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 15px; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 11px; font: 500 13px var(--mono); border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.chip:hover { background: var(--ink); color: var(--paper); }
button.link { background: none; border: 0; color: var(--ink); padding: 4px 0; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* results */
.results { padding: 8px 0; }
.group h2 { font: 500 26px/1.2 var(--serif); margin: 36px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: stretch; }

/* card: same rows for every extension */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 16px; display: flex; flex-direction: column; min-height: 196px;
}
.card.near { border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.card.flash { outline: 3px solid var(--ink); outline-offset: 2px; }
.card.off { opacity: .55; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tag { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--ink); }
.tag.pix { background: var(--ink); color: var(--paper); }
.tag.partner { background: transparent; color: var(--ink); }
.tag.taken { background: transparent; color: var(--bad); border-color: currentColor; }
.uf-code { font: 500 12px var(--mono); letter-spacing: .06em; color: var(--muted); }
.domain {
  font: 500 17px/1.3 var(--mono); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.domain .tld { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.place { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.origin { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot {
  margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--line);
}
.cost { font-weight: 600; white-space: nowrap; }
.cost small { color: var(--muted); font-weight: 400; font-size: 13px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; min-width: 108px; height: 36px; padding: 0 14px;
  font: 500 14px var(--sans); border-radius: var(--radius); text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
}
.act.alt { background: transparent; color: var(--ink); }
.act.alt:hover { background: var(--ink); color: var(--paper); }
.more summary { cursor: pointer; font-weight: 500; margin: 14px 0 0; text-decoration: underline; text-underline-offset: 3px; }
.more .grid { margin-top: 12px; }

/* map */
.mapa { padding: 40px 0 8px; border-top: 1.5px solid var(--ink); margin-top: 40px; }
.mapa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.mapa-head h2 { margin: 0; font: 500 30px/1.15 var(--serif); }
.toggle { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px; }
.toggle button { background: none; border: 0; color: var(--ink); padding: 6px 16px; border-radius: 999px; font-size: 14px; }
.toggle button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.mapa-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .mapa-body { grid-template-columns: 1fr; } }
.mapa-svg svg { width: 100%; height: auto; display: block; }
.uf { stroke: var(--paper); stroke-width: 1.5; cursor: pointer; transition: opacity .15s; }
.uf:hover, .uf:focus { opacity: .8; outline: none; }
.uf.m-pix { fill: var(--ink); }
.uf.m-lista { fill: url(#hatch); }
.uf.m-none, .uf.m-base { fill: var(--land); }
.uf.sel { stroke: var(--ink); stroke-width: 5; paint-order: stroke; }
.uf.m-pix.sel { fill: #4a463f; }
.hatch-bg { fill: var(--land); }
.hatch-line { stroke: var(--ink); stroke-width: 2.6; }
.lbl { font: 500 19px var(--mono); text-anchor: middle; dominant-baseline: middle; pointer-events: none; fill: var(--muted); }
.lbl.m-pix { fill: var(--paper); }
.lbl.m-lista { fill: var(--ink); paint-order: stroke; stroke: var(--land); stroke-width: 6px; }
.pin { cursor: pointer; }
.pin.m-pix { fill: var(--ink); stroke: var(--paper); stroke-width: 2.5; }
.pin.m-br { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.pin.near { stroke: var(--ink); stroke-width: 6; }
.legenda { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legenda li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 13px; height: 13px; border-radius: 3px; display: inline-block; background: var(--land); }
.dot.m-pix { background: var(--ink); }
.dot.m-lista { background: repeating-linear-gradient(45deg, var(--ink) 0 2px, var(--land) 2px 5px); }
.dot.m-br { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 50%; }

/* state panel */
.painel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 8px; max-height: 640px; overflow: auto; overscroll-behavior: contain; }
.painel > .muted { margin: 4px 0 12px; }
.painel h3 { margin: 0 0 4px; font: 500 24px/1.2 var(--serif); }
.painel .sub { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.painel .vazio, .muted { color: var(--muted); }
.exts { list-style: none; padding: 0; margin: 0; }
.ext {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.ext:first-child { border-top: 0; }
.ext-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ext b { font: 500 15px/1.3 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext-meta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.mini { padding: 6px 12px; font-size: 13px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); white-space: nowrap; }
button.mini:hover { background: var(--ink); color: var(--paper); }

/* how it works */
.how { padding: 40px 0 16px; border-top: 1.5px solid var(--ink); margin-top: 40px; }
.how h2 { margin: 0 0 12px; font: 500 30px/1.15 var(--serif); }
.how ol { padding-left: 20px; margin: 0 0 16px; }
.how li { margin: 6px 0; }
.fine { color: var(--muted); font-size: 14px; max-width: 46em; }

/* order dialog */
dialog {
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 6px 6px 0 var(--ink);
}
dialog::backdrop { background: rgba(17, 17, 15, .45); }
dialog h2 { margin: 0 0 4px; font: 500 22px/1.25 var(--mono); overflow-wrap: anywhere; }
dialog label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 0; }
dialog input {
  display: block; width: 100%; margin-top: 4px; font: inherit; padding: 10px 12px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
dialog input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
dialog .price { margin: 0; font-size: 15px; }
.error { color: var(--bad); font-size: 14px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* order status page */
.status { padding: 64px 0; max-width: 560px; }
.status h1 { font-size: clamp(30px, 5vw, 44px); overflow-wrap: anywhere; }
.status .state { font-size: 18px; }

.foot { color: var(--muted); font-size: 14px; padding-top: 24px; padding-bottom: 40px; }
