/* NoteInSite — сайт расширения. Один файл стилей, без внешних зависимостей. */

:root {
  --bg:        #f4f6fb;
  --bg-soft:   #ffffff;
  --bg-sunken: #eef1f8;
  --ink:       #1b1f2a;
  --ink-soft:  #4b5468;
  --ink-mute:  #737e93;
  --line:      #dde2ee;
  --accent:    #2f6bff;
  --accent-ink:#ffffff;
  --accent-sof:#e7edff;
  --note-1:    #fff3a8;
  --note-2:    #cfe6ff;
  --note-3:    #d6f5d6;
  --note-4:    #ffd9e2;
  --danger:    #c8352c;
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(20, 28, 48, .06), 0 10px 30px rgba(20, 28, 48, .07);
  --shadow-lg: 0 2px 6px rgba(20, 28, 48, .08), 0 24px 60px rgba(20, 28, 48, .14);
  --maxw:      1080px;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:      ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #101319;
    --bg-soft:   #171b24;
    --bg-sunken: #1d222d;
    --ink:       #e8ecf5;
    --ink-soft:  #b3bbcd;
    --ink-mute:  #8b93a6;
    --line:      #2a3040;
    --accent:    #6b95ff;
    --accent-ink:#0d1017;
    --accent-sof:#1e2740;
    --note-1:    #e8d77a;
    --note-2:    #a8c8ee;
    --note-3:    #a9dcaa;
    --note-4:    #eeb6c4;
    --danger:    #ff8a80;
    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 24px 60px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.1rem); }
h3 { font-size: 1.16rem; }
p  { margin: 0 0 1em; }

.muted { color: var(--ink-mute); }
.lead  { font-size: 1.12rem; color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem;
  padding: 8px 11px; border-radius: 9px;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-sunken); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-sunken); }
.nav-links .btn { color: var(--accent-ink); }

.burger {
  display: none; margin-left: auto; width: 42px; height: 38px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-soft); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center; font-size: 18px; line-height: 1;
}

@media (max-width: 860px) {
  .burger { display: inline-flex; }
  .nav-links {
    position: absolute; left: 12px; right: 12px; top: 62px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 14px; padding: 10px; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; }
  .nav-links .btn { justify-content: center; margin-top: 6px; }
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { box-shadow: var(--shadow); }
.btn-sm { padding: 9px 15px; font-size: .9rem; border-radius: 10px; }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

/* ---------- Первый экран ---------- */

.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -160px 0 auto 0; height: 520px; z-index: 0;
  background:
    radial-gradient(60% 60% at 18% 20%, color-mix(in srgb, var(--note-1) 55%, transparent) 0%, transparent 70%),
    radial-gradient(50% 50% at 82% 10%, color-mix(in srgb, var(--note-2) 60%, transparent) 0%, transparent 70%);
  filter: blur(10px); opacity: .75; pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } .hero { padding-top: 46px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-sof); color: var(--accent);
  border-radius: 999px; padding: 6px 14px; font-size: .83rem; font-weight: 600;
  margin-bottom: 18px;
}
.hero p.lead { max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--ink-mute); }

/* Демонстрация: страница со стикерами */
.mock {
  position: relative; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-sunken); }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-url { margin-left: 10px; font-size: .78rem; color: var(--ink-mute); font-family: var(--mono); }
.mock-body { position: relative; padding: 22px 20px 30px; min-height: 290px; }
.mock-line { height: 10px; border-radius: 5px; background: var(--bg-sunken); margin: 12px 0; }
.mock-line.w40 { width: 40%; } .mock-line.w70 { width: 70%; }
.mock-line.w90 { width: 90%; } .mock-line.w55 { width: 55%; }
.mock-line.title { height: 16px; width: 58%; background: color-mix(in srgb, var(--ink) 18%, var(--bg-sunken)); }

.sticky-note {
  position: absolute; width: 168px; padding: 12px 13px; border-radius: 6px;
  font-size: .86rem; line-height: 1.4; color: #232733;
  box-shadow: 0 6px 18px rgba(20, 28, 48, .18);
  animation: float 7s ease-in-out infinite;
}
.sticky-note b { font-weight: 700; }
.sticky-note.n1 { background: var(--note-1); top: 40px;  right: 24px; transform: rotate(2deg); }
.sticky-note.n2 { background: var(--note-2); top: 138px; left: 26px;  transform: rotate(-3deg); animation-delay: -2.4s; }
.sticky-note.n3 { background: var(--note-3); bottom: 18px; right: 52px; transform: rotate(-1.5deg); animation-delay: -4.6s; }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -7px; }
}
@media (prefers-reduced-motion: reduce) { .sticky-note { animation: none; } }
@media (max-width: 520px) { .sticky-note { width: 140px; font-size: .8rem; } }

/* ---------- Секции ---------- */

.section { padding: 62px 0; }
.section-sunken { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 34px; }
.section-head.center { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.section-sunken .card { background: var(--bg); }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--accent-sof);
}
.card-icon.y { background: color-mix(in srgb, var(--note-1) 60%, var(--bg-soft)); }
.card-icon.g { background: color-mix(in srgb, var(--note-3) 60%, var(--bg-soft)); }
.card-icon.p { background: color-mix(in srgb, var(--note-4) 60%, var(--bg-soft)); }

/* Скриншоты. Ширина ограничена размером самого файла: если растянуть
   картинку больше её пикселей, она становится мыльной. */
.shots { display: grid; gap: 34px; }
.shot figure { margin: 0; }
.shot img {
  width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); background: var(--bg-soft);
}
.shot figcaption { margin-top: 12px; color: var(--ink-mute); font-size: .93rem; }
.shot-narrow { display: flex; justify-content: center; }
.shot-narrow figure { max-width: 374px; }
.shot-narrow figcaption { text-align: center; }

/* Шаги */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
}
.step p { margin: 0; }
.step h3 { margin: 0 0 .2em; font-size: 1.02rem; }

/* Клавиши и таблицы */
kbd {
  font-family: var(--font); font-size: .82em; font-weight: 600;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; white-space: nowrap;
  color: var(--ink);
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); background: var(--bg-sunken); white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq { display: grid; gap: 10px; }
details.qa {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 4px 18px;
}
.section-sunken details.qa { background: var(--bg); }
details.qa > summary {
  cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::after { content: "+"; color: var(--ink-mute); font-size: 1.3rem; font-weight: 400; }
details.qa[open] > summary::after { content: "–"; }
details.qa > div { padding-bottom: 14px; color: var(--ink-soft); }
details.qa > div p:last-child { margin-bottom: 0; }

/* Плашка-призыв */
.cta {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 22px;
  padding: 40px 30px; text-align: center; box-shadow: var(--shadow);
}
.cta h2 { margin-bottom: .3em; }
.cta .hero-actions { justify-content: center; }

/* ---------- Текстовые страницы ---------- */

.page-head { padding: 52px 0 10px; }
.page-head h1 { margin-bottom: .25em; }
.prose { max-width: 74ch; padding-bottom: 60px; }
.prose h2 { margin-top: 1.7em; padding-top: .2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg-sunken); padding: 2px 6px; border-radius: 6px; }
.prose blockquote {
  margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft);
}
.prose .table-wrap { margin: 1.3em 0; }
.callout {
  background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 1.4em 0;
}
.callout p:last-child { margin-bottom: 0; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 34px; }
.toc p { font-weight: 600; margin-bottom: .5em; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: .3em; }

.badge {
  display: inline-block; font-size: .8rem; font-weight: 600;
  background: var(--bg-sunken); color: var(--ink-soft);
  border-radius: 999px; padding: 4px 12px; border: 1px solid var(--line);
}

/* ---------- Подвал ---------- */

.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 44px 0 30px; margin-top: 10px; font-size: .94rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin-bottom: .9em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5em; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: var(--ink-mute); font-size: .88rem;
}

/* Появление блоков при прокрутке */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
