/* SnipLang — Mac / Spell Checker page styles. Loaded after site.css (tokens live there). */
/* ============ store-note (shared, used by Mac hero) ============ */
.store-note {
  flex-basis: 100%;
  font: 400 12px/1.4 var(--sl-sans);
  color: var(--sl-mute-2);
  margin-top: 12px;
}
.mac-hero .store-note { text-align: left; }

/* ============================================================
   MAC PAGE — multilingual spell + grammar checker
   ============================================================ */

/* ---- hero ---- */
.mac-hero { padding: 80px 0 110px; position: relative; }
.mac-hero-grid {
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  gap: 64px; align-items: center;
}
@media (max-width: 1000px) {
  .mac-hero-grid { grid-template-columns: 1fr; gap: 52px; }
}
.mac-platform-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--sl-mute-2);
  margin-bottom: 32px;
}
.mac-platform-tag svg { width: 14px; height: 16px; fill: var(--sl-ink-2); }
.mac-hero-title {
  font-family: var(--sl-serif);
  font-weight: 400;
  font-size: clamp(46px, 6.6vw, 86px);
  line-height: 0.99;
  letter-spacing: -2.4px;
  color: var(--sl-ink);
  margin: 0 0 32px;
  text-wrap: balance;
}
.mac-hero-title em { font-style: normal; color: var(--wm-primary); }
.mac-hero-sub {
  font: 400 17px/1.55 var(--sl-sans);
  color: var(--sl-mute);
  max-width: 480px;
  margin: 0 0 36px;
  text-wrap: pretty;
}

/* ---- the macOS spell-check window ---- */
.mac-win {
  background: var(--sl-panel);
  border-radius: 12px;
  border: 0.5px solid var(--sl-hair);
  box-shadow:
    0 1px 2px rgba(10,14,28,0.04),
    0 24px 60px -14px rgba(10,14,28,0.16),
    0 50px 120px -40px rgba(0,123,255,0.12);
  overflow: hidden;
}
.mac-win .mw-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  background: rgba(248,249,252,0.85);
  border-bottom: 0.5px solid var(--sl-hair);
}
.mac-win .mw-light { width: 12px; height: 12px; border-radius: 50%; }
.mac-win .mw-light.red    { background: #FF5F57; }
.mac-win .mw-light.amber  { background: #FEBC2E; }
.mac-win .mw-light.green  { background: #28C840; }
.mac-win .mw-title {
  margin-left: 10px;
  font: 500 12px/1 var(--sl-sans);
  color: var(--sl-mute);
  letter-spacing: 0.2px;
}
.mac-win .mw-lang-chip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 10px/1 var(--sl-sans);
  letter-spacing: 0.6px;
  color: var(--wm-primary);
  background: var(--wm-primary-08);
  border: 0.5px solid rgba(0,123,255,0.16);
  padding: 5px 9px; border-radius: 9999px;
}
.mac-win .mw-lang-chip .pip {
  width: 5px; height: 5px; border-radius: 50%; background: var(--wm-primary);
}

.mac-win .mw-doc {
  padding: 30px 32px 34px;
  position: relative;
}
/* reserve room so the anchored correction popover is never clipped */
@supports (anchor-name: --a) {
  .mac-win .mw-doc:has(.mac-correction) { padding-bottom: 190px; }
}
.mac-win .mw-doc-meta {
  font: 500 10px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--sl-mute-2);
  margin-bottom: 16px;
}
.mac-win .mw-text {
  font: 400 19px/1.85 var(--sl-sans);
  color: var(--sl-ink);
  letter-spacing: -0.1px;
  text-wrap: pretty;
}

/* squiggle underlines */
.sq {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: default;
}
.sq-spell   { text-decoration-color: #EF4444; }
.sq-grammar { text-decoration-color: var(--wm-primary); }
.sq-active  {
  background: var(--wm-primary-08);
  border-radius: 3px;
  box-shadow: 0 0 0 2px var(--wm-primary-08);
}

/* correction popover floating over the doc */
.mac-correction {
  position: absolute;
  right: 26px; bottom: 26px;
  width: 290px;
  background: #fff;
  border: 0.5px solid var(--sl-hair);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(10,14,28,0.05),
    0 24px 54px -14px rgba(10,14,28,0.22);
  padding: 16px 16px 14px;
}
.mac-correction::before {
  content: "";
  position: absolute;
  top: -7px; left: 28px;
  width: 14px; height: 14px;
  background: #fff;
  border-left: 0.5px solid var(--sl-hair);
  border-top: 0.5px solid var(--sl-hair);
  transform: rotate(45deg);
}
/* anchor the popover directly under the word being corrected */
@supports (anchor-name: --a) {
  .mw-doc .mac-correction {
    right: auto; bottom: auto;
    top: calc(anchor(bottom) + 13px);
    left: anchor(left);
    margin-left: -14px;
  }
  /* when the word is near the right edge, extend leftward instead */
  .mw-doc .mac-correction.anchor-right {
    left: auto; margin-left: 0;
    right: anchor(right); margin-right: -14px;
  }
  .mac-correction.anchor-right::before { left: auto; right: 28px; }
}
.mac-correction .mc-cat {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 10px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--wm-primary);
  margin-bottom: 12px;
}
.mac-correction .mc-cat svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; }
.mac-correction .mc-diff {
  font: 400 17px/1.4 var(--sl-sans);
  color: var(--sl-ink);
  margin-bottom: 12px;
}
.mac-correction .mc-diff del {
  text-decoration: line-through;
  text-decoration-color: #EF4444;
  text-decoration-thickness: 1.5px;
  color: var(--sl-mute-2);
  margin-right: 6px;
}
.mac-correction .mc-diff ins {
  text-decoration: none;
  background: rgba(101,196,102,0.14);
  color: var(--wm-green-2);
  font-weight: 600;
  padding: 1px 6px; border-radius: 4px;
}
.mac-correction .mc-rule {
  font: 400 12.5px/1.5 var(--sl-sans);
  color: var(--sl-mute);
  padding: 12px 0 0;
  border-top: 0.5px solid var(--sl-hair);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.mac-correction .mc-rule b { color: var(--sl-ink-2); font-weight: 600; }
.mac-correction .mc-actions { display: flex; gap: 8px; }
.mac-correction .mc-apply {
  flex: 1;
  background: var(--wm-primary);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 9999px;
  font: 600 12px/1 var(--sl-sans);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.mac-correction .mc-apply svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.6; fill: none; }
.mac-correction .mc-ignore {
  background: var(--sl-bg-2);
  border: 0.5px solid var(--sl-hair);
  color: var(--sl-mute);
  padding: 9px 14px;
  border-radius: 9999px;
  font: 500 12px/1 var(--sl-sans);
}

/* ---- language strip ---- */
.mac-langs {
  border-top: 0.5px solid var(--sl-hair);
  border-bottom: 0.5px solid var(--sl-hair);
  padding: 64px 0;
  background: rgba(255,255,255,0.4);
}
.mac-langs-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 28px; margin-bottom: 36px; flex-wrap: wrap;
}
.mac-langs-head h2 {
  font-family: var(--sl-serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.1; letter-spacing: -1px;
  color: var(--sl-ink); margin: 8px 0 0; max-width: 22ch;
  text-wrap: balance;
}
.mac-langs-head p {
  font: 400 14px/1.5 var(--sl-sans);
  color: var(--sl-mute); margin: 0; max-width: 30ch;
  text-wrap: pretty;
}
.mac-lang-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.mac-lang-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sl-panel);
  border: 0.5px solid var(--sl-hair);
  border-radius: 9999px;
  padding: 9px 15px;
  font: 500 13px/1 var(--sl-sans);
  color: var(--sl-ink-2);
}
.mac-lang-pill .code {
  font: 600 10px/1 var(--sl-mono);
  letter-spacing: 0.4px;
  color: var(--sl-mute-2);
}
.mac-lang-pill.more {
  background: transparent;
  color: var(--sl-mute);
  border-style: dashed;
}

/* ---- check-type trio ---- */
.mac-trio { padding: 130px 0; }
.mac-trio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  margin-top: 56px;
}
@media (max-width: 880px) { .mac-trio-grid { grid-template-columns: 1fr; gap: 20px; } }
.mac-check {
  background: var(--sl-panel);
  border: 0.5px solid var(--sl-hair);
  border-radius: 12px;
  padding: 30px 28px 32px;
  box-shadow: 0 1px 2px rgba(10,14,28,0.04), 0 16px 40px -16px rgba(10,14,28,0.10);
}
.mac-check .ck-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.mac-check .ck-icon svg { width: 20px; height: 20px; stroke-width: 2; fill: none; }
.mac-check.spell  .ck-icon { background: rgba(239,68,68,0.10); color: #EF4444; }
.mac-check.grammar .ck-icon { background: var(--wm-primary-08); color: var(--wm-primary); }
.mac-check.style  .ck-icon { background: rgba(101,196,102,0.12); color: var(--wm-green-2); }
.mac-check h3 {
  font-family: var(--sl-serif);
  font-weight: 400; font-size: 24px; letter-spacing: -0.6px;
  color: var(--sl-ink); margin: 0 0 12px;
}
.mac-check p {
  font: 400 14px/1.6 var(--sl-sans);
  color: var(--sl-mute); margin: 0; text-wrap: pretty;
}
.mac-check .ck-sample {
  margin-top: 20px; padding-top: 18px;
  border-top: 0.5px solid var(--sl-hair);
  font: 400 15px/1.6 var(--sl-sans);
  color: var(--sl-ink-2);
}

/* ---- feature rows reuse .feature-row / .fr-* from base ---- */
.mac-rows { padding: 0 0 40px; }

/* grammar-rule explainer card */
.surface.rule-card { padding: 0; overflow: hidden; }
.rule-card .rc-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(248,249,252,0.7);
  border-bottom: 0.5px solid var(--sl-hair);
  font: 500 11px/1 var(--sl-sans);
  color: var(--sl-mute-2); letter-spacing: 0.4px;
}
.rule-card .rc-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair); }
.rule-card .rc-bar .rc-bar-title { margin-left: 8px; }
.rule-card .rc-body { padding: 26px 28px 28px; }
.rule-card .rc-lang {
  font: 600 10px/1 var(--sl-mono);
  letter-spacing: 0.6px; color: var(--wm-primary);
  margin-bottom: 14px;
}
.rule-card .rc-sentence {
  font: 400 20px/1.6 var(--sl-sans);
  color: var(--sl-ink); letter-spacing: -0.2px;
  margin-bottom: 22px; text-wrap: pretty;
}
.rule-card .rc-rule-label {
  font: 500 10px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--sl-mute-2); margin-bottom: 10px;
}
.rule-card .rc-rule-name {
  font: 600 14px/1.4 var(--sl-sans);
  color: var(--sl-ink); margin-bottom: 8px;
}
.rule-card .rc-rule-text {
  font: 400 13.5px/1.6 var(--sl-sans);
  color: var(--sl-mute); text-wrap: pretty;
}
.rule-card .rc-rule-text b { color: var(--sl-ink-2); font-weight: 600; }
.rule-card .rc-examples {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 20px;
}
.rule-card .rc-ex {
  background: var(--sl-bg-2);
  border: 0.5px solid var(--sl-hair);
  border-radius: 8px; padding: 12px 13px;
}
.rule-card .rc-ex .ex-mark {
  font: 600 10px/1 var(--sl-sans); letter-spacing: 0.6px;
  margin-bottom: 7px;
}
.rule-card .rc-ex.good .ex-mark { color: var(--wm-green-2); }
.rule-card .rc-ex.bad  .ex-mark { color: #EF4444; }
.rule-card .rc-ex .ex-text { font: 400 13px/1.4 var(--sl-sans); color: var(--sl-ink-2); }

/* language-detect card (menubar style, reuse vibes) */
.surface.detect-card { padding: 0; overflow: hidden; }
.detect-card .dc-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(248,249,252,0.7);
  border-bottom: 0.5px solid var(--sl-hair);
  font: 500 11px/1 var(--sl-sans);
  color: var(--sl-mute-2);
}
.detect-card .dc-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sl-bg-2); border: 0.5px solid var(--sl-hair); }
.detect-card .dc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.detect-card .dc-line {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--sl-bg-2);
  border: 0.5px solid var(--sl-hair);
}
.detect-card .dc-line .dc-flag {
  font: 600 10px/1 var(--sl-mono);
  letter-spacing: 0.4px; color: var(--sl-mute-2);
  background: var(--sl-panel); border: 0.5px solid var(--sl-hair);
  border-radius: 6px; padding: 6px 8px; flex-shrink: 0;
}
.detect-card .dc-line .dc-snippet {
  font: 400 15px/1.5 var(--sl-sans);
  color: var(--sl-ink); flex: 1; text-wrap: pretty;
}
.detect-card .dc-line.active {
  background: var(--wm-primary-08);
  border-color: rgba(0,123,255,0.16);
}
.detect-card .dc-line.active .dc-flag { color: var(--wm-primary); border-color: rgba(0,123,255,0.16); }
.detect-card .dc-line .dc-status {
  font: 600 10px/1 var(--sl-sans); letter-spacing: 0.4px;
  color: var(--wm-green-2); display: inline-flex; align-items: center; gap: 5px;
  flex-shrink: 0;
}
.detect-card .dc-line .dc-status svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.detect-card .dc-line.active .dc-status { color: var(--wm-primary); }

/* ---- system-wide menubar reuse of workflow card 3 ---- */
.mac-systemwide .surface { max-width: 480px; }
.feature-row.reverse .mac-systemwide .surface { margin-left: auto; margin-right: 0; }



/* ============ Mac Spell Checker promo band (home/landing) ============ */
/* Inline variant (used in the Features deep-dive, where the column is narrow):
   render the correction statically below the text so it never gets clipped. */
.mac-win.mw-inline { overflow: visible; }
.mac-win.mw-inline .mw-doc { padding: 26px 26px 28px; }
.mac-win.mw-inline .mw-doc:has(.mac-correction) { padding-bottom: 26px; }
.mac-win.mw-inline .mac-correction {
  position: static;
  width: auto;
  max-width: 300px;
  margin-top: 22px;
  right: auto; bottom: auto; left: auto;
}
.mac-win.mw-inline .mac-correction::before {
  top: -7px; left: 28px; right: auto;
}
/* tighter actions: Apply shouldn't stretch full width */
.mac-win.mw-inline .mac-correction .mc-apply {
  flex: 0 0 auto;
  padding-left: 16px; padding-right: 16px;
}

   HOME — Mac Spell Checker promo band
   ============================================================ */
.mac-promo { padding: 40px 0 130px; }
.mac-promo-band {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
  background: var(--sl-panel);
  border: 0.5px solid var(--sl-hair);
  border-radius: 16px;
  padding: 52px 56px;
  box-shadow: 0 1px 2px rgba(10,14,28,0.04), 0 28px 70px -28px rgba(10,14,28,0.14);
}
@media (max-width: 920px) {
  .mac-promo-band { grid-template-columns: 1fr; gap: 36px; padding: 40px 32px; }
}
.mac-promo-band .mp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 var(--sl-sans);
  text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--wm-primary);
  margin-bottom: 22px;
}
.mac-promo-band .mp-eyebrow svg { width: 13px; height: 15px; fill: var(--wm-primary); }
.mac-promo-band h2 {
  font-family: var(--sl-serif); font-weight: 400;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.04; letter-spacing: -1.2px;
  color: var(--sl-ink); margin: 0 0 18px; max-width: 16ch;
  text-wrap: balance;
}
.mac-promo-band h2 em { font-style: normal; color: var(--wm-primary); }
.mac-promo-band p {
  font: 400 16px/1.6 var(--sl-sans);
  color: var(--sl-mute); margin: 0 0 28px; max-width: 42ch;
  text-wrap: pretty;
}
.mac-promo-link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 14px/1 var(--sl-sans);
  color: var(--wm-primary); text-decoration: none;
}
.mac-promo-link i, .mac-promo-link svg { width: 17px; height: 17px; }
.mac-promo-link:hover { gap: 12px; }
