/* Shared styles for QueryOS sub-pages (blog, legal, contact). Same language as the home page:
   white paper, petrol accent, system SF type, Apple-style reading column. */
:root {
  --paper: #ffffff;
  --mist: #f2f5f5;
  --ink: #1b1f20;
  --ink-2: #5d6669;
  --ink-3: #8b9497;
  --petrol: #0b6e79;
  --petrol-deep: #085a63;
  --petrol-wash: #e6f1f2;
  --hair: rgba(12, 34, 37, .1);
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --f-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --nav-h: 58px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--f-text); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
a { color: var(--petrol); text-underline-offset: 3px; }
a:hover { color: var(--petrol-deep); }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; text-wrap: balance; margin: 0; color: var(--ink); }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--nav-h); background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hair); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 9px; font: 600 19px var(--f-display); letter-spacing: -.02em; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand svg { width: 24px; height: 24px; }
.nav a.nl { font-size: 14.5px; font-weight: 500; color: var(--ink); text-decoration: none; opacity: .8; letter-spacing: -.005em; }
.nav .btn-sm { font-size: 14px; font-weight: 500; padding: 8px 18px; }
.nav a.nl:hover, .nav a.nl[aria-current="page"] { opacity: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--petrol); color: #fff; border-radius: 980px; padding: 11px 22px; font: 400 16px/1.2 var(--f-text); text-decoration: none; border: 0; }
.btn:hover { background: var(--petrol-deep); color: #fff; }
.btn-sm { font-size: 12px; padding: 5px 12px; }
@media (max-width: 760px) { .nav a.nl { display: none; } }
@media (max-width: 960px) { .nav-in { gap: 20px; } .nav a.nl { font-size: 13.5px; } }

/* ---------- phone menu ---------- */
.menu-btn { display: none; position: relative; flex: none; width: 40px; height: 40px; margin-right: -9px; padding: 0; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .35s cubic-bezier(.22,.8,.2,1), top .35s cubic-bezier(.22,.8,.2,1); }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span { top: 19px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.mnav { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - var(--nav-h)); max-height: calc(100svh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-bottom: 1px solid var(--hair); box-shadow: 0 28px 40px -30px rgba(4, 30, 34, .35); padding: 4px max(22px, env(safe-area-inset-right, 0px)) 26px max(22px, env(safe-area-inset-left, 0px)); animation: mnav-in .32s cubic-bezier(.22,.8,.2,1); }
.mnav[hidden] { display: none; }
.mnav a.ml { display: block; padding: 14px 0; border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none; font: 600 21px/1.25 var(--f-display); letter-spacing: -.015em; opacity: 1; }
.mnav a.ml[aria-current="page"] { color: var(--petrol); }
.mnav .btn { display: flex; width: 100%; margin-top: 20px; padding: 13px 22px; font-size: 17px; }
@keyframes mnav-in { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 760px) { .menu-btn { display: block; } .nav-in { gap: 14px; } }
@media (min-width: 761px) { .mnav { display: none !important; } }

/* page header */
.crumbs { font-size: 13px; color: var(--ink-3); margin: 40px 0 0; }
.crumbs a { color: var(--ink-2); text-decoration: none; display: inline-block; padding-block: 8px; }
.crumbs a:hover { text-decoration: underline; }
.page-head { padding-block: 18px 34px; border-bottom: 1px solid var(--hair); }
.eyebrow { font: 600 15px var(--f-display); color: var(--petrol); margin: 0 0 10px; }
.page-head h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.07; letter-spacing: -.03em; max-width: 18em; }
.dek { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; color: var(--ink-2); margin: 18px 0 0; max-width: 36em; text-wrap: pretty; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; font-size: 13px; color: var(--ink-3); }

/* reading column */
.article { max-width: 720px; padding-block: 36px 96px; }
.article > * + * { margin-top: 1.1em; }
.article h2 { font-size: clamp(25px, 2.6vw, 31px); line-height: 1.18; letter-spacing: -.02em; margin-top: 2.1em; }
.article h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.015em; margin-top: 1.7em; }
.article p, .article li { font-size: 18px; line-height: 1.6; text-wrap: pretty; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: .4em; }
.article code { overflow-wrap: anywhere; font: .88em var(--f-mono); background: var(--mist); padding: .1em .35em; border-radius: 5px; }
.article pre.code-block { background: #0f1314; color: #dfe6e7; border-radius: 14px; padding: 16px 18px; overflow-x: auto; font: 13.5px/1.65 var(--f-mono); letter-spacing: 0; }
.article pre.code-block code { background: none; padding: 0; color: inherit; font: inherit; }
.article hr { border: 0; border-top: 1px solid var(--hair); margin: 2.4em 0; }
.small { font-size: 14px !important; color: var(--ink-3); }

/* answer box, disclosure, callouts */
.answer { background: var(--petrol-wash); border-radius: 18px; padding: 22px 24px; }
.answer h2 { font-size: 15px !important; margin: 0 !important; color: var(--petrol); letter-spacing: 0; font-family: var(--f-text); }
.answer p { margin: 8px 0 0; font-size: 18px; }
.answer ol { margin: 8px 0 0; }
.disclosure { font-size: 14px !important; color: var(--ink-2); border-left: 3px solid var(--hair); padding-left: 14px; }

/* ranked tool cards */
.tool { border: 1px solid var(--hair); border-radius: 20px; padding: 22px 24px; margin-top: 1.6em; }
.tool.top { border-color: color-mix(in srgb, var(--petrol) 45%, transparent); box-shadow: 0 18px 40px -28px rgba(8, 60, 66, .45); }
.tool-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tool-head .rank { font: 700 15px var(--f-display); color: var(--petrol); font-variant-numeric: tabular-nums; }
.tool-head h3 { margin: 0 !important; font-size: 23px; }
.tool-head .verdict { font-size: 14px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; margin: 16px 0 4px; padding: 14px 0; border-block: 1px solid var(--hair); }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }
.facts dd { margin: 2px 0 0; font-size: 15px; line-height: 1.35; }
.tool p { font-size: 17px; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.proscons h4 { margin: 0 0 4px; font: 600 14px var(--f-text); color: var(--ink-2); }
.proscons ul { margin: 0; padding-left: 1.1em; }
.proscons li { font-size: 15.5px; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } .proscons { grid-template-columns: 1fr; } }

/* comparison tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--hair); border-radius: 14px; margin-top: 1.4em; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--hair); vertical-align: top; }
thead th { background: var(--mist); font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--hair); padding: 14px 0; }
.faq summary { cursor: pointer; padding-block: 4px; font: 600 18px/1.35 var(--f-display); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

/* CTA */
.cta { margin-top: 2.6em; background: var(--mist); border-radius: 22px; padding: 28px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cta p { margin: 0; font-size: 18px; max-width: 26em; }
.cta strong { font-family: var(--f-display); font-size: 21px; display: block; letter-spacing: -.015em; }

/* blog index */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-block: 36px 96px; }
.post-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 22px; background: var(--mist); text-decoration: none; color: var(--ink); transition: transform .3s cubic-bezier(.22,.8,.2,1), box-shadow .3s; min-width: 0; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(8, 60, 66, .4); color: var(--ink); }
.post-card .tag { font: 600 12px var(--f-text); color: var(--petrol); letter-spacing: .02em; }
.post-card h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.02em; }
.post-card p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.post-card time { margin-top: auto; font-size: 13px; color: var(--ink-3); padding-top: 8px; }
.post-card.lead { grid-column: 1 / -1; background: #0d1314; color: #f2f5f5; }
.post-card.lead h2 { color: #f2f5f5; font-size: clamp(26px, 3vw, 34px); }
.post-card.lead p { color: #a3adb0; max-width: 40em; }
.post-card.lead .tag { color: #4cbcc8; }
@media (max-width: 720px) { .posts { grid-template-columns: minmax(0, 1fr); } }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-block: 36px 24px; }
.card { background: var(--mist); border-radius: 22px; padding: 28px; min-width: 0; }
.card h2 { font-size: 23px; letter-spacing: -.02em; }
.card p { margin: 10px 0 0; color: var(--ink-2); font-size: 16.5px; }
.card .big { font: 600 22px var(--f-display); color: var(--ink); margin-top: 14px; user-select: all; font-variant-numeric: tabular-nums; }
.card .btn { margin-top: 18px; }
.card-wide { grid-column: 1 / -1; }
.wa { background: #1f9d55; }
.wa:hover { background: #17864a; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* footer */
.foot { background: var(--mist); padding-block: 40px 30px; font-size: 12px; color: var(--ink-2); letter-spacing: 0; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--hair); }
.foot-cols p { max-width: 28em; line-height: 1.6; margin: 0; }
.foot h4 { font: 600 12px var(--f-text); color: var(--ink); margin: 0 0 8px; }
.foot a { display: block; text-decoration: none; line-height: 2; color: var(--ink-2); }
.foot a:hover { text-decoration: underline; color: var(--ink); }
.foot .social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.foot .social a { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; line-height: 1; background: #fff; color: var(--ink-2); border: 1px solid var(--hair); transition: color .2s, background .2s, border-color .2s, transform .25s cubic-bezier(.22,.8,.2,1); }
.foot .social a:hover { color: #fff; background: var(--petrol); border-color: var(--petrol); text-decoration: none; transform: translateY(-2px); }
.foot .social svg { width: 12px; height: 12px; fill: currentColor; }
.foot-legal { padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--ink-3); }
@media (max-width: 720px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-cols > div:first-child { grid-column: 1 / -1; } }

/* phones: bigger footer targets (kept last so it wins) */
@media (max-width: 640px) {
  .foot { font-size: 14px; }
  .foot h4 { font-size: 13px; }
  .foot a { line-height: 2.75; }
  .foot .social { gap: 12px; }
  .foot .social a { width: 38px; height: 38px; }
  .foot .social svg { width: 15px; height: 15px; }
}

/* phones: comparison tables */
.swipe-hint { display: none; }
@media (max-width: 640px) {
  .table-wrap table.cols-2, .table-wrap table.cols-3 { min-width: 0; }
  .table-wrap table.cols-3 td:first-child { white-space: normal; }
  .table-wrap th:first-child, .table-wrap td:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--hair); }
  .table-wrap thead th:first-child { background: var(--mist); }
  .table-wrap th, .table-wrap td { padding: 10px 12px; }
  .article .swipe-hint { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); text-align: right; }
}
