/* SAVISUL for your browser (extension.html): the extension's own page, as it looked inside the extension, in the
   site's type and colours. The controls (segments, switches, keys) keep the system face, as inside the extension. */

.ext {
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.075);
  --field: rgba(0, 0, 0, 0.28);
  --rim: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) 40px; overflow-x: clip;
}
.ext .grow { flex: 1; min-width: 0; }
.ext .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext .muted { color: var(--ink-2); }
.ext .faint { color: var(--ink-3); }

/* MARK: Hero */

.ext-hero { position: relative; padding: 72px 0 8px; text-align: center; }
/* The extension's own notch hangs at the top of the window: the page leaves it the room the drawn one took. */
.ext-hero.live { padding-top: 132px; }
.ext-hero::before {
  content: ""; position: absolute; inset: -60px -20% auto; height: 560px; z-index: -1; pointer-events: none;
  background: radial-gradient(640px 300px at 50% 32%, rgba(219, 199, 163, 0.16), transparent 72%);
}
/* The notch hangs from the header's edge and breathes open now and then, as the extension's does on a page. */
.ext-notch {
  position: relative; margin: -72px auto 46px; width: 132px; height: 30px; border-radius: 0 0 15px 15px;
  background: linear-gradient(180deg, #1f1d1a, #0d0c0b); display: grid; place-items: center; color: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8), inset 0 -0.5px 0 rgba(255, 255, 255, 0.16), 0 0 0 0.5px rgba(219, 199, 163, 0.24);
  animation: ext-breathe 6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.ext-notch::before, .ext-notch::after { content: ""; position: absolute; top: 0; width: 10px; height: 10px; }
.ext-notch::before { left: -10px; background: radial-gradient(circle at 0 100%, transparent 9.5px, #1f1d1a 10px); }
.ext-notch::after { right: -10px; background: radial-gradient(circle at 100% 100%, transparent 9.5px, #1f1d1a 10px); }
@keyframes ext-breathe {
  0%, 58%, 100% { width: 132px; height: 30px; border-radius: 0 0 15px 15px; }
  68%, 88% { width: 320px; height: 46px; border-radius: 0 0 23px 23px; }
}
.ext-hero h1 { margin: 0 auto; max-width: 14ch; font: 600 clamp(44px, 6.4vw, 86px)/0.98 var(--display); font-variation-settings: var(--sharp-display); letter-spacing: -0.035em; text-wrap: balance; }
.ext-lead { margin: 24px auto 0; max-width: 60ch; color: var(--ink-2); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; text-wrap: pretty; }
.ext-cta { margin-top: 34px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ext-keys { margin-top: 24px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: 14px; }
.ext-keys span { margin-left: 6px; }
.ext kbd {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px;
  font: 600 13px/1 var(--keys); color: var(--ink); background: var(--card); box-shadow: var(--rim), 0 1px 0 var(--hair-strong);
}
/* Whether this browser has the extension: the first thing the page answers. */
.ext-status {
  margin: 34px auto 0; max-width: 680px; padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; text-align: left;
  border-radius: 16px; font-size: 15px; line-height: 1.5; background: var(--card); box-shadow: var(--rim);
}
.ext-status b { font-weight: 600; }
.ext-status span { color: var(--ink-2); }
.ext-status.on { background: color-mix(in srgb, var(--mint) 9%, var(--card)); box-shadow: var(--rim), inset 0 0 0 1px color-mix(in srgb, var(--mint) 24%, transparent); }
.ext-status .status-dot { margin-top: 7px; }

/* MARK: The page's own contents */

.ext-nav {
  position: sticky; top: 52px; z-index: 40; margin: 56px calc(var(--gutter) * -1) 0; padding: 10px var(--gutter);
  display: flex; gap: 4px; justify-content: center; overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(180deg, rgba(11, 10, 9, 0.92), rgba(11, 10, 9, 0.78)); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0.5px 0 var(--hair);
}
.ext-nav::-webkit-scrollbar { display: none; }
.ext-nav a { flex: none; color: var(--ink-2); font-size: 14px; font-weight: 550; padding: 7px 13px; border-radius: 999px; text-decoration: none; transition: background 0.2s ease, color 0.2s ease; }
.ext-nav a:hover { color: var(--ink); background: var(--card); }
.ext-nav a[aria-current="true"] { color: var(--on-champagne); background: var(--champagne); }

.ext section { margin-top: 112px; scroll-margin-top: 120px; }
.ext h2.display { margin: 0 0 14px; font: 580 clamp(32px, 3.5vw, 50px)/1.05 var(--display); font-variation-settings: var(--sharp-heading); letter-spacing: -0.03em; text-wrap: balance; }
.ext h2.label-head {
  margin: 0; font: 600 13px/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; row-gap: 14px;
}
.ext h2.label-head .count { font-weight: 500; letter-spacing: 0; text-transform: none; }
.ext h2.label-head .button { text-transform: none; letter-spacing: 0; }
/* Settings sit on the demo's grid: their name on the left, the controls on the right. */
.narrow { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 44px; align-items: start; }
.narrow > * { grid-column: 2; }
.narrow > h2.label-head { grid-column: 1; grid-row: 1 / span 4; padding-top: 22px; }
.ext section.narrow + section.narrow { margin-top: 56px; }
.ext-note { margin-top: 14px; color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }

/* MARK: Controls, as in the extension */

.ext .card { border-radius: 22px; background: var(--card); box-shadow: var(--rim); }
.ext .list { overflow: hidden; }
.ext .item { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 20px; }
.ext .item + .item { box-shadow: 0 -0.5px 0 var(--hair); }
.ext .item .label { font-weight: 600; font-size: 15px; }
.ext .item .detail { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.ext .item > .faint { font-size: 14px; }
.ext .empty { padding: 28px 20px; text-align: center; color: var(--ink-3); font-size: 14.5px; }

.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; border-radius: 999px; background: var(--field); box-shadow: inset 0 0 0 0.5px var(--hair); }
.seg button {
  height: 30px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--ink-2); font: 550 13px/1 var(--ui); transition: background 0.2s ease, color 0.2s ease;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--ground); font-weight: 650; }
.switch {
  position: relative; width: 44px; height: 26px; flex: none; border: 0; border-radius: 999px; cursor: pointer; padding: 0;
  background: rgba(245, 241, 234, 0.16); box-shadow: inset 0 0 0 0.5px var(--hair-strong); transition: background 0.25s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: translate 0.45s var(--spring);
}
.switch[aria-checked="true"] { background: linear-gradient(180deg, var(--champagne), var(--champagne-deep)); }
.switch[aria-checked="true"]::after { translate: 18px 0; }
.field {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0; outline: none; background: var(--field);
  box-shadow: inset 0 0 0 0.5px var(--hair-strong); color: var(--ink); font: 15px/1 var(--text); min-width: 0;
}
.field:focus { box-shadow: inset 0 0 0 1.5px var(--champagne); }
.icon-button {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; cursor: pointer;
  color: var(--ink-2); background: transparent; transition: background 0.15s ease, color 0.15s ease, transform 0.25s var(--spring);
}
.icon-button:hover { color: var(--ink); background: var(--card-hover); }
.icon-button:active { transform: scale(0.92); }
.icon-button.danger:hover, .icon-button.armed { color: var(--rose); background: rgba(255, 122, 107, 0.12); }
.ext .button.glass.warn { color: var(--rose); }
.ext .button:disabled { opacity: 0.5; cursor: default; transform: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 1.8px solid currentColor; border-right-color: transparent; animation: ext-spin 0.8s linear infinite; flex: none; }
@keyframes ext-spin { to { rotate: 360deg; } }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; box-shadow: 0 0 0 4px rgba(245, 241, 234, 0.08); }
.status-dot.on { background: var(--mint); box-shadow: 0 0 0 4px rgba(140, 214, 176, 0.2); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 186, 102, 0.2); }

/* MARK: Live demo */

.demo { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; align-items: start; }
.demo-side { position: sticky; top: 120px; padding-top: 6px; }
.demo-side > p { margin: 0 0 22px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.demo-steps { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; padding: 0; list-style: none; }
.step {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: transparent;
  text-align: left; cursor: pointer; color: var(--ink); font: inherit; transition: background 0.18s ease, transform 0.3s var(--spring);
}
button.step:hover { background: var(--card); }
button.step:active { transform: scale(0.985); }
.step-icon { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: rgba(219, 199, 163, 0.13); color: var(--champagne); transition: background 0.2s ease, color 0.2s ease; }
.step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 1px; }
.step-title { font-weight: 600; font-size: 15px; }
.step-detail { color: var(--ink-3); font-size: 13.5px; line-height: 1.4; }
.step[aria-pressed="true"] { background: var(--card-hover); box-shadow: var(--rim); }
.step[aria-pressed="true"] .step-icon { background: var(--champagne); color: var(--on-champagne); }
.step[aria-pressed="true"] .step-detail { color: var(--ink-2); }
.demo-reset { color: var(--ink-2); }

.demo-window { position: relative; }
.demo-window::before {
  content: ""; position: absolute; inset: 8% -6% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(219, 199, 163, 0.15), transparent); filter: blur(10px);
}
.browser { border-radius: 14px; overflow: hidden; background: #1b1a18;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.85), 0 18px 40px -20px rgba(0, 0, 0, 0.6), inset 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
.browser-top { display: flex; align-items: flex-end; gap: 18px; height: 40px; padding: 0 14px; background: #121110; }
.lights { display: flex; gap: 8px; align-self: center; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.25); }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.browser-tab { display: flex; align-items: center; gap: 8px; max-width: 300px; height: 32px; padding: 0 14px; border-radius: 10px 10px 0 0;
  background: #1b1a18; color: #e9e5dd; font: 500 12.5px/1 var(--ui); }
.browser-fav { width: 16px; height: 16px; flex: none; border-radius: 4px; background: #9b3d2a; color: #fff; display: grid; place-items: center; font: 700 10px/1 Georgia, serif; }
.browser-bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; background: #1b1a18; box-shadow: inset 0 -0.5px 0 rgba(255, 255, 255, 0.08); color: #a8a29a; }
.omnibox { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border-radius: 999px; background: #262422; font: 13px/1 var(--ui); }
.omnibox .host { color: #ece8e1; }
.omnibox .path { color: #8b857c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-ext { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--champagne); background: rgba(219, 199, 163, 0.12); }
.demo-stage { position: relative; background: #fbf9f4; }
.demo-frame { display: block; width: 100%; height: 760px; border: 0; background: #fbf9f4; }
.demo-picture { display: block; width: 100%; height: auto; }
.demo-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #6d675d; font-size: 14px; background: #fbf9f4; }
.demo-loading[hidden] { display: none; }
.demo-caption { margin-top: 14px; color: var(--ink-3); font-size: 13.5px; text-align: center; }

/* MARK: Everything in the notch */

.groups { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px 40px; margin-top: 34px; }
.group h3 { margin: 0 0 8px; padding-bottom: 12px; font: 600 13px/1 var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); box-shadow: inset 0 -0.5px 0 var(--hair-strong); }
.feature-list { list-style: none; margin: 0; padding: 0; }
.group:first-child .feature-list { columns: 2; column-gap: 32px; }
.feature { display: flex; gap: 12px; padding: 11px 0; break-inside: avoid; }
.feature-icon { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--champagne); background: rgba(219, 199, 163, 0.12); }
.feature-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feature-name .shortcut { display: inline-flex; gap: 3px; }
.feature-name kbd { min-width: 0; height: 19px; padding: 0 5px; font-size: 11px; border-radius: 5px; }
.feature-detail { color: var(--ink-2); font-size: 14px; line-height: 1.45; }

/* MARK: Panels: the Mac and the account */

.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.pair-copy > p { margin: 0 0 22px; max-width: 52ch; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; align-items: center; font-weight: 550; }
.checks .icon { color: var(--mint); flex: none; }
.panel-card { border-radius: 24px; background: var(--card); box-shadow: var(--rim), 0 30px 60px -36px rgba(0, 0, 0, 0.7); overflow: hidden; }
.panel-head { display: flex; gap: 16px; align-items: center; padding: 22px; }
.panel-head .row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.panel-title { font-weight: 650; font-size: 16px; }
.panel-glyph { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: linear-gradient(180deg, #2a2724, #121110); color: var(--ink); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14); }
.panel-row { display: flex; align-items: center; gap: 16px; padding: 18px 22px; box-shadow: inset 0 0.5px 0 var(--hair); }
.panel-row .label { font-weight: 600; margin-bottom: 2px; }
.panel-row .value { color: var(--ink-2); font-size: 14px; }
.panel-row.problem { color: var(--amber); }
.panel-row.done { color: var(--mint); }
.panel-row.panel-actions { gap: 10px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 18px; }
/* The words a row of actions belongs to sit right above it, without a rule between. */
.panel-head + .panel-actions, .panel-row:not(.panel-actions) + .panel-actions { box-shadow: none; padding-top: 0; }
.follow { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.panel-head .cab-avatar { width: 52px; height: 52px; font-size: 22px; flex: none; }

/* MARK: Notes, hidden elements, dark sites */

.notes-tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.notes-tools .field { flex: 1 1 220px; }
.note { padding: 14px 20px; }
.note + .note { box-shadow: 0 -0.5px 0 var(--hair); }
.note-head { display: flex; align-items: center; gap: 10px; }
.note-title { font-weight: 650; }
.note-scope { font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px;
  color: var(--champagne); background: rgba(219, 199, 163, 0.14); flex: none; }
.note-when { color: var(--ink-3); font-size: 12.5px; flex: none; font-variant-numeric: tabular-nums; }
.note-url { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-url:hover { color: var(--champagne); }
.note-text { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.note-controls { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s ease; }
.note:hover .note-controls, .note:focus-within .note-controls { opacity: 1; }
.rule { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); padding: 2px 0; overflow-wrap: anywhere; }
.site-mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); background: var(--card-hover); }

/* MARK: Adding the extension */

.install-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.install-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.install-steps li::before {
  counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 600 15px/1 var(--display); color: var(--champagne); background: rgba(219, 199, 163, 0.12);
}

/* MARK: Toast */

.ext-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60; translate: -50% 18px; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 18px; border-radius: 999px;
  background: rgba(24, 22, 20, 0.92); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7), var(--rim); font-weight: 550; font-size: 14px;
  transition: opacity 0.25s ease, translate 0.5s var(--spring);
}
.ext-toast.on { opacity: 1; translate: -50% 0; }
.ext-toast .icon { color: var(--mint); }

/* MARK: Narrow screens */

@media (max-width: 1080px) {
  .demo { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .demo-side { position: static; }
  .demo-steps { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: thin; }
  .step { flex: 0 0 230px; background: var(--card); }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group:first-child { grid-column: 1 / -1; }
  .pair { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .narrow { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .narrow > h2.label-head { grid-column: 1; grid-row: auto; padding-top: 0; }
  .narrow > * { grid-column: 1; }
}
@media (max-width: 640px) {
  .ext-hero { padding-top: 64px; }
  .ext-nav { justify-content: flex-start; }
  .groups { grid-template-columns: minmax(0, 1fr); }
  .group:first-child .feature-list { columns: 1; }
  .ext .item { flex-wrap: wrap; }
  .demo-frame { height: 620px; }
  .note-controls { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ext-notch { animation: none; }
}
