/* Installation guide (iPhone, iPad, Android). Tokens come from .s2 / .s2-sheet in session-v2.css. */

/* ---- Card on Today ---- */
.ig-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 44px; grid-template-areas: "icon copy close" ". action action"; align-items: start; gap: 10px 14px; margin: 0 0 14px; padding: 16px 8px 16px 16px; border-radius: 24px; background: var(--s2-glass-hi); border: 1px solid var(--s2-edge); box-shadow: var(--s2-shadow); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); }
body[data-view="today"] .ig-card { margin-top: 14px; }
.ig-card-icon { grid-area: icon; width: 48px; height: 48px; border-radius: 13px; box-shadow: 0 8px 18px -10px #14386e80; }
.ig-card-copy { grid-area: copy; min-width: 0; padding-top: 2px; }
.ig-card h2 { margin: 0 0 4px; font-size: 16px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; color: var(--s2-ink); }
.ig-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--s2-muted); }
.ig-card-close { grid-area: close; display: grid; place-items: center; width: 44px; height: 44px; margin: -8px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--s2-muted); cursor: pointer; }
.ig-card-close:hover { background: var(--s2-hair); }
.ig-card-close .ig-glyph { width: 18px; height: 18px; }
.ig-card-action { grid-area: action; justify-self: start; }
.ig-card :focus-visible { outline: 3px solid #75a7ff; outline-offset: 2px; }
@media (min-width: 640px) {
  .ig-card { grid-template-columns: 48px minmax(0, 1fr) auto 44px; grid-template-areas: "icon copy action close"; align-items: center; padding: 14px 10px 14px 18px; }
  .ig-card-close { margin: 0; }
}

/* ---- Glyphs ---- */
.ig-glyph { width: 20px; height: 20px; flex-shrink: 0; }
.ig-glyph.is-faint { color: var(--ig-faint, var(--s2-faint)); }

/* ---- Sheet ---- */
.ig-head { display: grid !important; grid-template-columns: 52px minmax(0, 1fr) 44px; align-items: center; gap: 12px !important; }
.ig-head-icon { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 10px 22px -12px #14386e8c; }
.ig-titles { min-width: 0; }
.ig-kicker { margin: 0 0 2px !important; font-size: 12.5px; font-weight: 700; color: var(--s2-link); }
.ig-head h2 { font-size: 20px; line-height: 1.2; text-wrap: balance; }
.ig-close { align-self: start; }
.ig-close .ig-glyph { width: 18px; height: 18px; }
.ig-intro { margin: 12px 0 4px !important; font-size: 14.5px; line-height: 1.5; }
.ig-body { gap: 16px; padding-bottom: 4px; }

.ig-perks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ig-perks li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.ig-perks .ig-glyph { box-sizing: content-box; width: 18px; height: 18px; padding: 7px; border-radius: 50%; background: var(--s2-soft); color: var(--s2-link); }

.ig-quick { display: grid; gap: 12px; padding: 16px; border-radius: 22px; background: var(--s2-soft); }
.ig-quick[hidden] { display: none; }
.ig-quick h3 { font-size: 16px; font-weight: 800; }
.ig-quick p { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--s2-muted); }
.ig-quick-btn { width: 100%; }
.ig-quick-btn .ig-glyph { width: 19px; height: 19px; }
.ig-quick.is-done { grid-template-columns: 40px minmax(0, 1fr); align-items: start; background: var(--s2-green-bg); }
.ig-quick-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--s2-green); color: #fff; }

.ig-browsers { min-width: 0; margin: 0; padding: 0; border: 0; }
.ig-browsers legend { margin: 0 0 8px; padding: 0; font-size: 13px; font-weight: 700; color: var(--s2-muted); }
.ig-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ig-chip { position: relative; display: block; cursor: pointer; }
.ig-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ig-chip-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--s2-line); background: var(--s2-glass-hi); font-size: 13.5px; font-weight: 650; color: var(--s2-ink); transition: background .2s var(--s2-ease), color .2s var(--s2-ease); }
.ig-chip-pill small { padding: 2px 7px; border-radius: 999px; background: var(--s2-soft); color: var(--s2-link); font-size: 11px; font-weight: 700; }
.ig-chip input:checked + .ig-chip-pill { background: var(--s2-blue); border-color: transparent; color: #fff; }
.ig-chip input:checked + .ig-chip-pill small { background: #ffffff2e; color: #fff; }
.ig-chip input:focus-visible + .ig-chip-pill { outline: 3px solid #75a7ff; outline-offset: 2px; }

.ig-steps-title { margin-top: 4px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.ig-steps { display: grid; gap: 12px; margin: -4px 0 0; padding: 0; list-style: none; }
.ig-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 16px 16px 16px 14px; border-radius: 22px; background: var(--s2-glass-hi); border: 1px solid var(--s2-edge); box-shadow: 0 10px 26px -22px #14386e80; }
.ig-step-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s2-blue); color: #fff; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ig-step-copy { min-width: 0; padding-top: 3px; }
.ig-step h4 { margin: 0; font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.ig-step p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--s2-muted); text-wrap: pretty; }

.ig-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--s2-hair); font-size: 13px; line-height: 1.5; color: var(--s2-muted); }
.ig-note .ig-glyph { width: 18px; height: 18px; color: var(--s2-link); margin-top: 1px; }
.ig-done { width: 100%; }

.ig-link { display: flex; gap: 8px; margin-top: 12px; }
.ig-link-field { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--s2-line); border-radius: 14px; background: var(--s2-field); color: var(--s2-ink); font: inherit; font-size: 14px; }
.ig-link-copy { flex-shrink: 0; min-height: 44px !important; }
.ig-link-copy .ig-glyph { width: 17px; height: 17px; }

/* ---- Sketches of the browser ---- */
.ig-visual { --ig-bg: #eef2f8; --ig-surface: #fff; --ig-skel: #d8e0eb; --ig-ink: #17233a; --ig-faint: #8996ab; --ig-hit: var(--s2-blue); margin-top: 12px; }
html[data-today-theme="dark"] .ig-visual { --ig-bg: #0e2435; --ig-surface: #183549; --ig-skel: #2b4a61; --ig-ink: #e9f1ff; --ig-faint: #87a0bf; }
.ig-screen { position: relative; display: flex; flex-direction: column; height: 150px; overflow: hidden; border-radius: 18px; border: 1px solid var(--s2-line); background: var(--ig-bg); color: var(--ig-ink); font-size: 12.5px; line-height: 1.2; }
.ig-screen.is-bottom { justify-content: flex-end; }
.ig-screen.is-dim { display: grid; place-items: center; background: linear-gradient(#08142259, #08142259), var(--ig-bg); }
.ig-screen.is-sheet { height: 166px; background: linear-gradient(#08142233, #08142233), var(--ig-bg); }
.ig-skel { display: block; width: 100%; height: 8px; border-radius: 4px; background: var(--ig-skel); }
.ig-skel.is-title { width: 58%; height: 11px; }
.ig-skel.is-short { width: 38%; }
.ig-skel.is-label { width: 70%; height: 5px; margin: 5px auto 0; }
.ig-page { display: grid; gap: 8px; align-content: start; flex: 1; padding: 16px 18px; }
.ig-screen.is-bottom .ig-page { flex: 1; }

.ig-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--ig-surface); }
.ig-toolbar.is-ios { padding: 0 10px 12px; background: none; }
.ig-toolbar.is-android { border-bottom: 1px solid var(--s2-hair); }
.ig-toolbar.is-tabbar { justify-content: space-around; border-top: 1px solid var(--s2-hair); }
.ig-toolbar.is-inapp { gap: 6px; border-bottom: 1px solid var(--s2-hair); }
.ig-round { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--ig-surface); box-shadow: 0 6px 16px -10px #0b1a2acc; color: var(--ig-ink); }
.ig-round.is-plain { width: 32px; height: 32px; background: none; box-shadow: none; }
.ig-round .ig-glyph { width: 19px; height: 19px; }
.ig-address { display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--ig-surface); box-shadow: 0 6px 16px -10px #0b1a2acc; }
.ig-toolbar:not(.is-ios) .ig-address { justify-content: flex-start; height: 32px; background: var(--ig-bg); box-shadow: none; }
.ig-address .ig-glyph { width: 15px; height: 15px; margin-left: auto; }
.ig-host { overflow: hidden; font-size: 12px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.ig-inapp-title { display: grid; gap: 5px; flex: 1; min-width: 0; }
.ig-inapp-title .ig-skel { width: 50%; height: 8px; }
.ig-inapp-title .ig-host { font-size: 10.5px; font-weight: 600; color: var(--ig-faint); }

.ig-popover { position: absolute; right: 10px; display: grid; gap: 2px; width: min(86%, 270px); padding: 6px; background: var(--ig-surface); border-radius: 18px; box-shadow: 0 18px 40px -18px #0b1a2ab3, 0 1px 3px #0b1a2a1f; }
.ig-popover.is-ios { bottom: 10px; }
.ig-popover.is-android { top: 8px; border-radius: 12px; }
.ig-popover.is-under { top: 54px; }
.ig-menu-icons { display: flex; justify-content: space-around; padding: 4px 4px 7px; margin-bottom: 2px; border-bottom: 1px solid var(--s2-hair); }
.ig-menu-icons .ig-glyph { width: 16px; height: 16px; }
.ig-row { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 0 10px; border-radius: 10px; font-weight: 650; }
.ig-row .ig-glyph { width: 17px; height: 17px; }
.ig-row .ig-skel { width: 55%; }
.ig-row-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ig-dot { display: block; width: 15px; height: 15px; flex-shrink: 0; border-radius: 5px; background: var(--ig-skel); }

.ig-sheet { position: absolute; inset: 14px 8px 0; padding: 10px 10px 0; border-radius: 16px 16px 0 0; background: var(--ig-surface); box-shadow: 0 -10px 30px -18px #0b1a2a99; }
.ig-sheet-head { display: flex; align-items: center; gap: 9px; padding: 0 2px 8px; border-bottom: 1px solid var(--s2-hair); }
.ig-mini-icon { width: 26px; height: 26px; border-radius: 7px; }
.ig-sheet-copy { display: grid; gap: 2px; }
.ig-sheet-copy b { font-size: 12px; }
.ig-sheet-copy span { font-size: 10.5px; color: var(--ig-faint); }
.ig-list { display: grid; gap: 4px; margin-top: 10px; padding: 6px; border-radius: 12px; background: var(--ig-bg); }

.ig-nav { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.ig-nav-link { padding: 4px 8px; border-radius: 999px; color: var(--s2-link); }
.ig-nav-link.is-strong { font-weight: 800; }
.ig-nav-title { font-size: 12px; }
.ig-add-card { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px; border-radius: 12px; background: var(--ig-bg); }
.ig-mid-icon { width: 34px; height: 34px; border-radius: 9px; }
.ig-add-fields { display: grid; gap: 3px; }
.ig-add-name { font-size: 13px; font-weight: 650; }
.ig-add-host { font-size: 10.5px; color: var(--ig-faint); }
.ig-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 12px; background: var(--ig-bg); font-size: 11.5px; font-weight: 600; }
.ig-switch { position: relative; width: 34px; height: 20px; flex-shrink: 0; border-radius: 999px; background: #34c759; }
.ig-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; }

.ig-screen.is-home { justify-content: center; background: linear-gradient(155deg, #c9dcff 0%, #e2ddff 52%, #ffe6d2 100%); }
html[data-today-theme="dark"] .ig-screen.is-home { background: linear-gradient(155deg, #12355a 0%, #2a2a58 55%, #4a3326 100%); }
.ig-home { display: grid; grid-template-columns: repeat(4, 40px); justify-content: space-around; gap: 12px 8px; padding: 12px 14px; }
.ig-home-app { display: grid; justify-items: center; }
.ig-home-tile { display: block; width: 40px; height: 40px; border-radius: 11px; background: #ffffffa6; }
.ig-home-tile.is-1, .ig-home-tile.is-4 { background: #ffffff73; }
.ig-home-tile.is-2, .ig-home-tile.is-6 { background: #ffffffc7; }
html[data-today-theme="dark"] .ig-home-tile { background: #ffffff26; }
.ig-home-app .ig-skel.is-label { width: 30px; background: #ffffff8c; }
.ig-home-ring { display: block; width: 40px; height: 40px; border-radius: 11px; }
.ig-home-icon { display: block; width: 40px; height: 40px; border-radius: 11px; }
.ig-home-name { margin-top: 3px; font-size: 10px; font-weight: 700; color: #17233a; }
html[data-today-theme="dark"] .ig-home-name { color: #fff; }

.ig-dialog { display: grid; gap: 10px; width: min(84%, 270px); padding: 14px 14px 12px; border-radius: 20px; background: var(--ig-surface); box-shadow: 0 20px 44px -20px #0b1a2acc; }
.ig-dialog-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ig-dialog-meta { display: grid; gap: 2px; font-size: 11px; color: var(--ig-faint); }
.ig-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.ig-text-btn { padding: 5px 6px; font-size: 12px; font-weight: 700; color: var(--s2-link); }
.ig-fill-btn { padding: 6px 14px; border-radius: 999px; background: var(--s2-blue); color: #fff; font-size: 12px; font-weight: 700; }

.ig-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 10px; }
.ig-tile { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 52px; padding: 4px; border-radius: 12px; }
.ig-tile .ig-dot { width: 18px; height: 18px; border-radius: 6px; }
.ig-tile .ig-skel.is-label { width: 60%; margin: 0; }
.ig-tile .ig-glyph { width: 19px; height: 19px; }
.ig-tile-label { font-size: 10.5px; font-weight: 700; text-align: center; }

/* The control to touch: a blue outline and a slow pulse around it. */
.ig-hit { position: relative; z-index: 1; box-shadow: 0 0 0 2px var(--ig-hit), 0 0 0 6px #0866ff26 !important; }
.ig-row.ig-hit, .ig-tile.ig-hit { background: var(--s2-soft); color: var(--s2-link); }
.ig-hit::after { content: ""; position: absolute; inset: -6px; border: 2px solid var(--ig-hit); border-radius: inherit; opacity: 0; pointer-events: none; animation: ig-pulse 2s var(--s2-ease) infinite; }
.ig-round.ig-hit::after, .ig-home-ring.ig-hit::after { border-radius: 50%; }
.ig-home-ring.ig-hit::after { border-radius: 15px; }
@keyframes ig-pulse { 0% { opacity: .6; transform: scale(.94); } 70%, 100% { opacity: 0; transform: scale(1.14); } }

@media (prefers-reduced-motion: reduce) { .ig-hit::after { animation: none; } .ig-chip-pill { transition: none; } }
body[data-today-motion="none"] .ig-hit::after { animation: none; }
