/* ibsclue.com — brand colours from the app (GutWise/Theme.swift) */
:root {
  --paper: #F3F1EA; --paper2: #ECE9DF; --white: #fff; --ink: #1E2621; --mute: #5F665F; --line: #E4E1D6;
  --sage: #4F7A63; --sage-dk: #3D6550; --sage-lt: #E3ECE5; --rust: #B8613F; --rust-lt: #F6E6DE; --amber: #8A6D12;
  --serif: ui-serif, "New York", Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
  --radius: 22px; --shadow: 0 18px 40px -18px rgba(30, 38, 33, .35);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-dk); text-underline-offset: 3px; }
a:hover { color: var(--sage); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 58px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--rust); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--mute); }
.muted { color: var(--mute); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 16px; font-weight: 600; text-decoration: none; }
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-dk); color: #fff; }
.btn-ghost { border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.badge-store { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 14px; text-decoration: none; line-height: 1.15; }
.badge-store small { display: block; font-size: 11px; opacity: .8; }
.badge-store b { font-size: 18px; }
.badge-store svg { width: 24px; height: 24px; fill: #fff; }

/* header */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(243, 241, 234, .9); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 20px var(--serif); }
.logo svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; opacity: .8; }
.nav a:hover { opacity: 1; color: var(--sage-dk); }
.nav .cta { opacity: 1; background: var(--sage); color: #fff; padding: 8px 14px; border-radius: 12px; font-weight: 600; }
@media (max-width: 760px) { .nav a:not(.keep) { display: none; } .nav { gap: 14px; } }

/* hero */
.hero { padding: 64px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin: 16px 0 18px; }
.hero .lead { max-width: 560px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; font-size: 14px; color: var(--mute); }
.trust span::before { content: "✓"; color: var(--sage); font-weight: 700; margin-right: 6px; }
.phones { position: relative; height: 600px; }
.phone { position: absolute; width: 270px; border-radius: 40px; background: #fff; padding: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.phone img { border-radius: 31px; }
.phones .p1 { left: 4%; top: 0; transform: rotate(-4deg); }
.phones .p2 { right: 2%; top: 70px; transform: rotate(4deg); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 470px; } .phone { width: 210px; border-radius: 32px; } .phone img { border-radius: 24px; }
}

/* sections */
section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { margin: 12px 0 12px; }
.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.alt .step { background: var(--paper); }
.step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-weight: 700; }
.step .shot { margin-top: auto; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); max-height: 420px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step .shot { max-height: 380px; } }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 36px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .media { order: -1; }
.feature h3 { font-size: clamp(24px, 3vw, 32px); margin: 10px 0 12px; }
.feature ul { padding-left: 20px; margin: 14px 0 0; color: var(--mute); }
.feature ul li { margin: 6px 0; }
.feature .media { display: flex; justify-content: center; }
.feature .media .phone { position: static; width: 300px; }
.feature .media .sheet { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 24px; } .feature.flip .media { order: 0; } }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid3, .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid3, .grid4 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.alt .card { background: var(--paper); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--mute); font-size: 15.5px; }
.card .src { margin-top: 12px; font-size: 13px; color: var(--mute); }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card img.thumb { border-radius: 14px; aspect-ratio: 16/10; object-fit: cover; width: 100%; margin-bottom: 14px; }
.diagram { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.langs { display: flex; flex-wrap: wrap; gap: 10px; }
.langs span { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 16px; }

/* comparison */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15.5px; }
.compare th, .compare td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th { font: 600 14px var(--sans); color: var(--mute); background: var(--paper); }
.compare thead th.us { color: #fff; background: var(--sage); }
.compare td.us { background: var(--sage-lt); font-weight: 600; }
.compare tr:last-child td { border-bottom: 0; }
.yes { color: var(--sage-dk); font-weight: 700; }
.no { color: #A8A69C; }
.part { color: var(--amber); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .compare { min-width: 680px; }

/* faq */
details { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--sage); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { padding: 0 0 16px; color: var(--mute); }

/* download band */
.band { background: var(--sage); color: #F3F1EA; border-radius: 32px; padding: 48px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; }
.band h2 { color: #fff; }
.band p { opacity: .9; margin-top: 10px; }
.band .badge-store { background: #fff; color: var(--ink); }
.band .badge-store svg { fill: var(--ink); }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 32px 24px; } }

/* articles */
.crumbs { font-size: 14px; color: var(--mute); padding: 26px 0 0; }
.crumbs a { color: var(--mute); }
.article-head { padding: 18px 0 8px; }
.article-head h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 12px; }
.meta { font-size: 14px; color: var(--mute); }
.takeaways { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--sage); border-radius: 16px; padding: 18px 22px; margin: 26px 0; }
.takeaways b { font-family: var(--serif); font-size: 18px; }
.takeaways ul { margin: 8px 0 0; padding-left: 20px; }
.takeaways li { margin: 5px 0; }
.toc { font-size: 15px; margin: 0 0 28px; padding: 16px 22px; border: 1px solid var(--line); border-radius: 16px; }
.toc b { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.prose { font-size: 18px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: clamp(25px, 3vw, 31px); margin-top: 44px; scroll-margin-top: 84px; }
.prose h3 { margin-top: 28px; scroll-margin-top: 84px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose .lede { font-size: 20px; color: var(--ink); }
.prose sup a { text-decoration: none; font-size: 12px; }
.prose figure { margin: 30px 0; }
.prose figure img { border-radius: 18px; border: 1px solid var(--line); background: #fff; margin: 0 auto; }
.prose figcaption { font-size: 14px; color: var(--mute); margin-top: 8px; text-align: center; }
.prose figcaption .credit { display: block; font-size: 12px; opacity: .85; }
.prose .tbl { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--white); border-radius: 14px; overflow: hidden; }
.prose .tbl th, .prose .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose .tbl thead th { background: var(--paper2); font-size: 14px; }
.prose .tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose aside.note { background: var(--rust-lt); border-radius: 14px; padding: 14px 18px; font-size: 16px; }
.app-cta { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 44px 0; }
.app-cta h3 { font-size: 20px; margin-bottom: 4px; }
.app-cta p { color: var(--mute); font-size: 15.5px; }
@media (max-width: 640px) { .app-cta { grid-template-columns: 1fr; } }
.sources { font-size: 14.5px; color: var(--mute); margin-top: 48px; border-top: 1px solid var(--line); padding-top: 18px; }
.sources ol { padding-left: 22px; }
.sources li { margin: 8px 0; scroll-margin-top: 84px; word-break: break-word; }
.disclaimer { font-size: 13.5px; color: var(--mute); background: var(--paper2); border-radius: 14px; padding: 14px 18px; margin: 28px 0 0; }
.faq-block { margin-top: 44px; }
.faq-block h2 { font-size: 28px; margin-bottom: 10px; }

/* footer */
.site-foot { margin-top: 80px; padding: 48px 0 40px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--mute); }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-foot h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: var(--mute); text-decoration: none; }
.site-foot a:hover { color: var(--sage-dk); }
.site-foot .fine { margin-top: 32px; font-size: 13px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }

/* grid and flex children may shrink below their content's intrinsic width (wide diagrams, tables) */
.hero .wrap > *, .feature > *, .steps > *, .grid3 > *, .grid4 > *, .band > *, .site-foot .cols > * { min-width: 0; }
.feature .media > * { min-width: 0; max-width: 100%; }
@media (max-width: 420px) { .nav a.keep:not(.cta) { display: none; } .logo { font-size: 18px; } }
.prose figure img[src^="/img/app/"]:not([src$="report.webp"]) { max-width: 320px; border-radius: 30px; box-shadow: var(--shadow); }
.card img.thumb[src$=".svg"] { object-fit: contain; background: var(--paper); }
.card img.thumb[src^="/img/app/"] { object-position: top; }
