/* Halcira Search: the Halcira design (glacier and ink, cyan only as a fill), light and dark. */
:root {
  --cyan: #00D4E8; --deep: #007483; --petrol: #0B4F5C; --ink: #0A1A20;
  --text: #0A1A20; --body: #3B4F58; --sub: #5B6F78; --ground: #F3F7F9;
  --card: rgba(255, 255, 255, .78); --line: rgba(11, 79, 92, .12); --link: #007483;
  --shadow: 0 12px 40px rgba(11, 79, 92, .08); --btn: #0A1A20; --btn-text: #fff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #EEF3F5; --body: #C3D2D8; --sub: #8FA6AF; --ground: #071318;
    --card: rgba(16, 36, 44, .78); --line: rgba(238, 243, 245, .10); --link: #5FE3F0;
    --shadow: 0 12px 40px rgba(0, 0, 0, .35); --btn: #EEF3F5; --btn-text: #0A1A20;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--ground); color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.55 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-image: radial-gradient(60vw 40vw at 100% -10%, rgba(0, 212, 232, .22), transparent 70%),
                    radial-gradient(50vw 40vw at -10% 110%, rgba(0, 116, 131, .16), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--link); }

.bar { position: sticky; top: 0; z-index: 2; display: flex; gap: 16px; align-items: center; padding: 14px 24px; backdrop-filter: blur(18px) saturate(140%); background: color-mix(in srgb, var(--ground) 72%, transparent); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 600; letter-spacing: -.02em; font-size: 17px; flex: none; }
.brand img { border-radius: 8px; }
.box { flex: 1; max-width: 720px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; box-shadow: var(--shadow); }
.box:focus-within { box-shadow: var(--shadow), 0 0 0 3px rgba(0, 212, 232, .45); }
.box svg { width: 19px; height: 19px; fill: none; stroke: var(--sub); stroke-width: 2; stroke-linecap: round; flex: none; }
.box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 11px 0; }

.tabs { display: flex; gap: 6px; padding: 10px 24px 0 calc(24px + 112px); overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--sub); font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); }
.tabs button:focus-visible, .pill:focus-visible, .results a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

main { flex: 1; width: 100%; max-width: 760px; padding: 16px 24px 32px calc(24px + 112px); }
.hero { text-align: center; padding: 10vh 0 0; }
.hero img { border-radius: 16px; }
.hero h1 { margin: 14px 0 6px; font-weight: 500; letter-spacing: -.035em; font-size: clamp(32px, 6vw, 48px); }
.hero p { color: var(--body); margin: 0 auto; max-width: 460px; }

.lisa { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin: 4px 0 18px; box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(140%); }
.lisa-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.lisa-head img { border-radius: 6px; }
.lisa-head span { color: var(--sub); }
#lisaBody { color: var(--body); white-space: pre-wrap; }
#lisaBody sup a { text-decoration: none; font-size: 11px; padding: 0 3px; border-radius: 4px; background: rgba(0, 212, 232, .18); color: var(--text); }
.lisa-src { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--sub); }
.lisa-src a { color: var(--sub); }

.note { color: var(--sub); }
.answer, .infobox { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.infobox img { float: right; max-width: 120px; max-height: 120px; border-radius: 8px; margin: 0 0 8px 12px; }
.infobox h2 { margin: 0 0 6px; font-size: 17px; }
.infobox p { margin: 0; color: var(--body); font-size: 14px; }

.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.results .host { color: var(--sub); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results h3 { margin: 2px 0 4px; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.results h3 a { text-decoration: none; }
.results h3 a:hover { text-decoration: underline; }
.results p { margin: 0; color: var(--body); font-size: 14px; overflow-wrap: anywhere; }
.results .meta { color: var(--sub); font-size: 12px; margin-top: 4px; }
/* Images: justified rows across the whole screen (best results first, left to right); each picture keeps its shape. */
.results.grid { display: flex; flex-wrap: wrap; gap: 10px; }
.results.grid::after { content: ""; flex-grow: 999; }
.results.grid li { border: 0; padding: 0; min-width: 0; }
.results.grid a { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--body); font-size: 12px; }
.results.grid img { display: block; width: 100%; height: auto; background: var(--line); object-fit: cover; }
.results.grid span { display: block; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results.grid .badge { position: absolute; top: 8px; left: 8px; padding: 1px 7px; border-radius: 6px; background: rgba(10, 26, 32, .78); color: #fff; font-size: 11px; font-weight: 600; }
.results.grid a:hover img { filter: brightness(1.04); }
.wide main { max-width: none; padding-left: 24px; padding-right: 24px; }
.wide .tabs { padding-left: 24px; }
.imgbar { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 24px 0; color: var(--sub); font-size: 14px; }
.imgbar select { margin-left: 6px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.tabs .by-img { margin-left: auto; color: var(--link); }

/* Site logos and Lisa's trust notes on results. */
.results .host { display: flex; align-items: center; gap: 7px; }
.results .host > span:not(.trust) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { width: 18px; height: 18px; border-radius: 4px; flex: none; object-fit: contain; background: #fff; }
.logo.letter { display: inline-grid; place-items: center; background: var(--line); color: var(--text); font-size: 11px; font-weight: 700; }
.trust { flex: none; font-size: 11.5px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--sub); }
.trust.caution { color: var(--text); border-color: var(--deep); font-weight: 600; }
.trust.danger { color: #fff; background: var(--ink); border-color: var(--ink); font-weight: 600; }
.trust-why { font-size: 12.5px; color: var(--text); margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--deep); }
.trust-why.danger { border-left-color: var(--ink); }

/* Videos: the picture first. */
.results li.video { display: flex; gap: 14px; align-items: flex-start; }
.results .thumb { position: relative; flex: none; width: 200px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--line); display: grid; place-items: center; }
.results .thumb img:not(.logo) { width: 100%; height: 100%; object-fit: cover; display: block; }
.results .thumb .logo, .results .thumb .logo.letter { width: 36px; height: 36px; font-size: 18px; border-radius: 8px; }
.results .thumb .len { position: absolute; right: 6px; bottom: 6px; padding: 0 6px; border-radius: 5px; background: rgba(10, 26, 32, .82); color: #fff; font-size: 12px; }
.vbody { min-width: 0; flex: 1; }

/* Maps: places with a small map tile, opening in Halcira Maps. */
.results li.place { display: flex; gap: 14px; align-items: flex-start; }
.mini { position: relative; flex: none; width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--line); }
.mini img { width: 100%; height: 100%; display: block; }
.mini::after { content: "© OpenStreetMap"; position: absolute; right: 3px; bottom: 2px; font-size: 8px; color: #3B4F58; background: rgba(255,255,255,.7); padding: 0 3px; border-radius: 3px; }
.mini .pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.pbody { min-width: 0; flex: 1; }
.pacts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pacts .pill { font-size: 13px; padding: 5px 14px; }
.maps-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.places { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px 4px; margin-bottom: 14px; }
.phead { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.places .results li:last-child { border-bottom: 0; }

/* Picture viewer and search by image. */
.viewer { width: min(1100px, 94vw); max-height: 90vh; display: none; gap: 18px; padding: 16px; }
.viewer[open] { display: flex; }
.viewer > img { flex: 1; min-width: 0; max-height: calc(90vh - 32px); object-fit: contain; border-radius: 10px; background: var(--line); }
.view-side { width: 280px; flex: none; display: flex; flex-direction: column; }
.view-side h2 { font-size: 16px; overflow-wrap: anywhere; }
.view-side .row { flex-wrap: wrap; } .view-side .row.left { justify-content: flex-start; margin-top: 4px; } .view-side .row:last-child { margin-top: auto; }
a.pill { text-decoration: none; display: inline-block; }
.rev-row { display: flex; gap: 8px; margin-bottom: 10px; }
.rev-row input { flex: 1; min-width: 0; }
label.file { display: inline-block; }
#revImg { display: block; max-width: 100%; max-height: 180px; border-radius: 10px; margin: 10px 0; }
.rev-links { display: flex; flex-wrap: wrap; gap: 8px; }
.small { font-size: 12px; }
.more { text-align: center; margin: 18px 0; }
.pill { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 8px 18px; font: inherit; font-size: 14px; cursor: pointer; }
.pill.ink { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.related { color: var(--sub); font-size: 14px; }
.related a { margin-right: 12px; }

dialog { border: 1px solid var(--line); border-radius: 16px; background: var(--ground); color: var(--text); width: min(400px, 92vw); padding: 22px; }
dialog::backdrop { background: rgba(10, 26, 32, .35); }
dialog h2 { margin: 0 0 8px; font-size: 18px; }
dialog p { color: var(--body); font-size: 14px; margin: 0 0 12px; }
dialog input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.foot { text-align: center; color: var(--sub); font-size: 12px; padding: 16px; }

@media (max-width: 760px) {
  .mini { width: 84px; height: 84px; }
  .results.grid { gap: 6px; }
  .results li.video { flex-direction: column; } .results .thumb { width: 100%; }
  .viewer[open] { flex-direction: column; overflow: auto; } .view-side { width: auto; }
  .imgbar { padding: 8px 12px 0; } .wide main { padding: 12px; }
  .bar { padding: 10px 12px; gap: 10px; }
  .brand span { display: none; }
  .tabs { padding: 8px 12px 0; }
  main { padding: 12px 16px 24px; }
}

/* Flow in: Lisa's card and each result rise out of a soft blur, one after another (one-shot). */
@keyframes flow-in { from { opacity: 0; transform: translateY(10px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
.hero, .lisa, .answer, .infobox, .results li { animation: flow-in .5s cubic-bezier(.22, .9, .24, 1) both; }
.results li:nth-child(2) { animation-delay: .04s; } .results li:nth-child(3) { animation-delay: .08s; } .results li:nth-child(4) { animation-delay: .12s; }
.results li:nth-child(5) { animation-delay: .16s; } .results li:nth-child(n+6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { .hero, .lisa, .answer, .infobox, .results li { animation: none; } }

/* Pictures fade in over a soft shimmer while they load (Oct 26 2026 polish). */
.results.grid img { opacity: 0; transition: opacity .25s ease; background: linear-gradient(90deg, var(--line) 25%, var(--card) 37%, var(--line) 63%); background-size: 400% 100%; animation: img-sk 1.3s ease infinite; }
.results.grid img.in { opacity: 1; animation: none; background: var(--line); }
.results.grid a:has(img:not(.in)) { background: linear-gradient(90deg, var(--line) 25%, var(--card) 37%, var(--line) 63%); background-size: 400% 100%; animation: img-sk 1.3s ease infinite; }
@keyframes img-sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .results.grid img, .results.grid a { animation: none !important; transition: none; } }
