/* Ihop: graphics kit for guides and comparison pages. Real text, not images, so Google reads it and it follows dark mode.
   Rules (adapted from Optimal's graphics skill): one strong colour (wine) for the thing the eye should land on, paper
   and ink for the rest; plain labels; no "01" numbering, no eyebrow labels; every graphic has a one-line caption that
   says what it shows and, for outside facts, the source. Reference with markup: /_review/graphics.html */

.ig { margin: var(--s-6) 0; padding: clamp(16px, 2.6vw, 28px); border-radius: var(--r-3); background: var(--sheet); border: 1px solid var(--rule); display: grid; gap: var(--s-4); }
.ig__cap { font-size: 14px; color: var(--ink2); margin: 0 !important; }
.ig__title { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); margin: 0 !important; }
.ig img { display: block; }

/* App logo (App Store icon) */
.ig-app { display: inline-grid; justify-items: center; gap: 6px; font-size: 13px; color: var(--ink); text-align: center; min-width: 64px; }
.ig-app img { width: 48px; height: 48px; border-radius: 11px; box-shadow: 0 0 0 1px var(--rule); }
.ig-app--lg img { width: 72px; height: 72px; border-radius: 16px; }
.ig-app--ihop img { box-shadow: 0 0 0 2px var(--accent); }
.ig-app small { color: var(--ink2); font-size: 12px; }

/* "X eller Ihop": two (or more) logos facing each other */
.ig-vs { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 4vw, 40px); flex-wrap: wrap; }
.ig-vs__or { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink2); }

/* Row of logos (alternatives in a guide) */
.ig-logos { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); justify-content: flex-start; }

/* Feature matrix: apps across, features down */
.ig-matrix { overflow-x: auto; }
.ig-matrix table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
.ig-matrix th, .ig-matrix td { padding: 10px 8px; border-bottom: 1px solid var(--rule); text-align: center; }
.ig-matrix tbody th { text-align: left; font-weight: 500; color: var(--ink); }
.ig-matrix thead th { vertical-align: bottom; }
.ig-matrix .y { color: var(--ok); font-weight: 700; }
.ig-matrix .n { color: var(--ink2); }
.ig-matrix .p { color: var(--ink); font-size: 12.5px; }
.ig-matrix .is-ihop { background: color-mix(in srgb, var(--accent) 7%, transparent); }

/* Steps in a row, stacking on phones */
.ig-flow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-3); counter-reset: none; }
.ig-step { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: var(--r-2); background: var(--ground); }
.ig-step b { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); }
.ig-step span { font-size: 14px; color: var(--ink2); }
.ig-step .ico { width: 26px; height: 26px; color: var(--accent); }
.ig-step:not(:last-child)::after { content: ""; position: absolute; right: -11px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--ink2); border-right: 2px solid var(--ink2); transform: translateY(-50%) rotate(45deg); opacity: .6; }
.ig-step.is-key { background: var(--accent); }
.ig-step.is-key b, .ig-step.is-key span, .ig-step.is-key .ico { color: var(--on-accent); }
@media (max-width: 720px) {
  .ig-flow { grid-auto-flow: row; }
  .ig-step:not(:last-child)::after { right: auto; left: 24px; top: auto; bottom: -10px; transform: rotate(135deg); }
}

/* A timeline (before the party, before the move): when, then what */
.ig-time { display: grid; gap: 0; }
.ig-time__row { display: grid; grid-template-columns: 120px 18px minmax(0, 1fr); gap: var(--s-3); }
.ig-time__when { font-weight: 600; font-size: 14px; color: var(--ink); padding-top: 2px; text-align: right; }
.ig-time__dot { position: relative; }
.ig-time__dot::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--rule); }
.ig-time__dot::after { content: ""; position: absolute; left: 50%; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--accent); }
.ig-time__row:last-child .ig-time__dot::before { bottom: auto; height: 12px; }
.ig-time__what { padding-bottom: var(--s-4); font-size: 15px; color: var(--ink2); }
.ig-time__what b { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .ig-time__row { grid-template-columns: 84px 18px minmax(0, 1fr); } .ig-time__when { font-size: 13px; } }

/* Split bar: how a cost is divided (lika / efter inkomst) */
.ig-split { display: grid; gap: var(--s-3); }
.ig-split__row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--s-3); align-items: center; font-size: 14px; }
.ig-split__lab { color: var(--ink); font-weight: 600; }
.ig-bar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; background: var(--ground); }
.ig-bar span { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.ig-bar .a { background: var(--accent); color: var(--on-accent); }
.ig-bar .b { background: var(--sand); color: #2A211C; }
.ig-bar .c { background: color-mix(in srgb, var(--ok) 70%, var(--sheet)); color: #fff; }
.ig-bar .d { background: var(--rule); color: var(--ink); }

/* Big numbers */
.ig-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); }
.ig-stat { padding: 16px; border-radius: var(--r-2); background: var(--ground); display: grid; gap: 4px; }
.ig-stat b { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 34px); color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ig-stat span { font-size: 14px; color: var(--ink2); }

/* Cost breakdown: label, amount, proportional bar */
.ig-costs { display: grid; gap: 8px; }
.ig-cost { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 4px var(--s-3); font-size: 14.5px; }
.ig-cost__lab { color: var(--ink); }
.ig-cost__amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.ig-cost__bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--ground); overflow: hidden; }
.ig-cost__bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--accent); border-radius: 4px; }
.ig-cost--sum { border-top: 1px solid var(--ink); padding-top: 8px; font-weight: 700; }

/* Phones talking to each other (calendar, lists): device, arrow, device */
.ig-devices { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: var(--s-3); text-align: center; }
.ig-dev { display: grid; justify-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.ig-dev__box { width: 72px; height: 120px; border-radius: 16px; border: 3px solid var(--ink); display: grid; place-items: center; background: var(--ground); }
.ig-dev__box img { width: 40px; height: 40px; border-radius: 9px; }
.ig-dev--hub .ig-dev__box { width: 96px; height: 96px; border-radius: 50%; border-color: var(--accent); }
.ig-link { display: grid; justify-items: center; gap: 4px; font-size: 12.5px; color: var(--ink2); min-width: 60px; }
.ig-link::before { content: ""; width: 100%; min-width: 40px; height: 0; border-top: 2px dashed var(--ink2); }
.ig-link.is-no::before { border-top-color: var(--accent); }
.ig-link.is-no { color: var(--accent); font-weight: 600; }
@media (max-width: 560px) { .ig-devices { grid-template-columns: 1fr; } .ig-link::before { width: 0; height: 28px; min-width: 0; border-top: 0; border-left: 2px dashed var(--ink2); } .ig-link.is-no::before { border-left-color: var(--accent); } }

/* Two columns: before / after, or "på papper" / "i Ihop" */
.ig-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.ig-two > div { padding: 16px; border-radius: var(--r-2); background: var(--ground); display: grid; gap: 8px; align-content: start; }
.ig-two > div:last-child { background: color-mix(in srgb, var(--accent) 9%, var(--sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.ig-two h4 { margin: 0; font-family: var(--serif); font-size: 18px; color: var(--ink); }
.ig-two ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--ink2); display: grid; gap: 4px; }
@media (max-width: 600px) { .ig-two { grid-template-columns: 1fr; } }

/* Comparison hero logos */
.cmp-hero .ig-vs { justify-content: flex-start; margin-top: var(--s-2); }
