/* Scoped styles for /use-cases/ai-dictation-for-mac/. Uses --type-* tokens only. */
:lang(ko) .mac-guide-page,
:lang(ko) .mac-guide-page p,
:lang(ko) .mac-guide-page li,
:lang(ko) .mac-guide-page h1,
:lang(ko) .mac-guide-page h2,
:lang(ko) .mac-guide-page h3 {
  word-break: keep-all;
}

.mac-guide-page h1,
.mac-guide-page h2,
.mac-guide-page h3 {
  text-wrap: balance;
}

:lang(ja) .mac-guide-page h1,
:lang(ja) .mac-guide-page h2,
:lang(ja) .mac-guide-page h3,
:lang(zh-Hans) .mac-guide-page h1,
:lang(zh-Hans) .mac-guide-page h2,
:lang(zh-Hans) .mac-guide-page h3,
:lang(zh-Hant) .mac-guide-page h1,
:lang(zh-Hant) .mac-guide-page h2,
:lang(zh-Hant) .mac-guide-page h3 {
  text-wrap: auto;
  word-break: auto-phrase;
}

.mac-guide-page .eyebrow,
.mac-guide-page .mac-summary .summary-label,
.mac-guide-page .mac-spoken-label,
.mac-guide-page .mac-mode-card .mode-tag {
  text-transform: none;
  letter-spacing: 0.02em;
}

:lang(ja) .mac-guide-page .eyebrow,
:lang(ko) .mac-guide-page .eyebrow,
:lang(zh-Hans) .mac-guide-page .eyebrow,
:lang(zh-Hant) .mac-guide-page .eyebrow {
  font-family: inherit;
  font-weight: 600;
}

.use-case-hero {
  padding-top: 122px;
  padding-bottom: 48px;
}

.mac-summary {
  margin-top: 24px;
  padding: 20px 24px;
  border-left: 3px solid #55786e;
  border-radius: 12px;
  background: #eef3f1;
}
.mac-summary .summary-label {
  margin: 0 0 10px;
  color: #365c55;
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mac-summary ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.mac-summary li {
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.6;
}
.mac-trial-note {
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.5;
}

.mac-flow-band {
  margin-top: 28px;
  display: grid;
  gap: 20px;
}

/* Interactive Mac hotkey -> recording -> polishing -> insertion motion demo */
.mac-motion-stage {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: grid;
  gap: 20px;
}

.mac-motion-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mac-motion-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mac-motion-step {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: var(--type-caption);
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.mac-motion-step:hover {
  color: var(--ink);
  background: #ece8e1;
}

.mac-motion-step:focus-visible,
.mac-motion-replay:focus-visible,
.mac-fn-keybtn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.mac-motion-step[aria-pressed="true"] {
  background: rgba(114, 70, 44, 0.11);
  border-color: rgba(114, 70, 44, 0.25);
  color: var(--brand-strong);
  font-weight: 600;
}

.mac-motion-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--type-caption);
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.mac-motion-replay:hover {
  border-color: var(--brand-border);
  background: #fbf6ee;
}

.mac-motion-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: stretch;
}

.mac-motion-input {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #faf8f4;
}

.mac-key-stage {
  display: flex;
  align-items: center;
  gap: 18px;
}

.mac-fn-well {
  position: relative;
  flex: none;
  width: 78px;
  height: 78px;
  padding: 5px 5px 10px;
  border-radius: 14px;
  background: #d5cdc2;
  box-shadow: inset 0 2px 4px rgba(26, 17, 12, 0.16);
}

.mac-fn-well::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 2px solid rgba(114, 70, 44, 0.32);
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

[data-mac-demo-phase="listening"] .mac-fn-well::before {
  animation: fnPulseRing 1.4s ease-out infinite;
}

.mac-fn-keybtn {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 7px 9px;
  border: 1px solid #bfb5a8;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf9 0%, #f5efe6 100%);
  box-shadow:
    0 5px 0 #b8ada0,
    0 7px 12px rgba(26, 17, 12, 0.14);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 190ms cubic-bezier(0.2, 0.85, 0.3, 1),
    box-shadow 190ms cubic-bezier(0.2, 0.85, 0.3, 1),
    background 190ms ease,
    border-color 190ms ease;
}

.mac-fn-keybtn .fn-label {
  align-self: flex-end;
  font-family: "JetBrains Mono", monospace;
  font-size: var(--type-caption);
  font-weight: 600;
  line-height: 1;
}

.mac-fn-keybtn .fn-globe {
  align-self: flex-start;
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
}

[data-mac-demo-phase="listening"] .mac-fn-keybtn {
  transform: translateY(5px);
  border-color: var(--brand);
  background: linear-gradient(180deg, #f9ebd2 0%, #efd6ae 100%);
  box-shadow:
    0 1px 0 #9f7c5c,
    0 2px 6px rgba(114, 70, 44, 0.24);
  color: var(--brand-strong);
}

[data-mac-demo-phase="listening"] .mac-fn-keybtn .fn-globe {
  color: var(--brand-strong);
}

.mac-key-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mac-key-state {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  font-weight: 600;
  line-height: 1.35;
}

.mac-key-hint {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.45;
}

.mac-spoken-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mac-spoken-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mac-spoken-label {
  color: var(--ink-dim);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mac-spoken-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.mac-spoken-wave i {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 3px;
  background: #b9aba0;
  transition: background-color 180ms ease, height 180ms ease;
}

[data-mac-demo-phase="listening"] .mac-spoken-wave i {
  background: var(--brand);
  animation: waveBar 0.9s ease-in-out infinite;
}

[data-mac-demo-phase="listening"] .mac-spoken-wave i:nth-child(2) { animation-delay: 0.12s; }
[data-mac-demo-phase="listening"] .mac-spoken-wave i:nth-child(3) { animation-delay: 0.24s; }
[data-mac-demo-phase="listening"] .mac-spoken-wave i:nth-child(4) { animation-delay: 0.08s; }
[data-mac-demo-phase="listening"] .mac-spoken-wave i:nth-child(5) { animation-delay: 0.30s; }
[data-mac-demo-phase="listening"] .mac-spoken-wave i:nth-child(6) { animation-delay: 0.18s; }
[data-mac-demo-phase="listening"] .mac-spoken-wave i:nth-child(7) { animation-delay: 0.04s; }

.mac-spoken-text {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.mac-spoken-text .spoken-chunk {
  transition: opacity 280ms ease;
}

.mac-spoken-text .demo-cut {
  border-radius: 4px;
  padding: 0 2px;
  transition:
    color 280ms ease,
    background-color 280ms ease,
    opacity 280ms ease;
}

[data-mac-demo-phase="polishing"] .mac-spoken-text .demo-cut,
[data-mac-demo-phase="done"] .mac-spoken-text .demo-cut {
  background: rgba(185, 86, 62, 0.10);
  color: #8a4332;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

[data-mac-demo-phase="listening"] .mac-spoken-text .spoken-chunk-2 {
  animation: spokenReveal 3.2s ease both;
}

[data-mac-demo-phase="listening"] .mac-spoken-text .spoken-chunk-3 {
  animation: spokenRevealLate 3.2s ease both;
}

/* Right side: Mac Mail window + floating MeerKatta widget */
.mac-mail-window {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(40, 32, 24, 0.08);
}

.mac-mail-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f5f2ec;
}

.mac-dots {
  display: inline-flex;
  gap: 6px;
}

.mac-dots i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mac-dots i:nth-child(1) { background: #e86a5e; }
.mac-dots i:nth-child(2) { background: #f2be4f; }
.mac-dots i:nth-child(3) { background: #62c554; }

.mac-mail-title {
  margin: 0 auto 0 6px;
  color: var(--ink-muted);
  font-size: var(--type-caption);
  font-weight: 600;
}

.mac-mail-headers {
  display: grid;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf9;
  font-size: var(--type-caption);
  color: var(--ink-muted);
}

.mac-mail-headers strong {
  color: var(--ink);
  font-weight: 600;
}

.mac-mail-body {
  position: relative;
  flex: 1;
  min-height: 220px;
  padding: 18px 18px 72px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mac-mail-empty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-dim);
  font-size: var(--type-body);
  transition: opacity 220ms ease;
}

[data-mac-demo-phase="done"] .mac-mail-empty {
  display: none;
}

.mac-mail-output {
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 300ms ease,
    transform 300ms cubic-bezier(0.2, 0.85, 0.3, 1);
}

[data-mac-demo-phase="done"] .mac-mail-output {
  opacity: 1;
  transform: translateY(0);
}

.mac-mail-output p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.65;
}

[data-mac-demo-phase="done"] .mac-mail-output p {
  animation: insertedFlash 1.1s ease;
}

.mac-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  border-radius: 1px;
  background: var(--brand);
  animation: caretBlink 1.05s steps(1, end) infinite;
}

/* Floating MeerKatta status pill anchored inside Mac window */
.mac-widget-pill {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 14px 6px 8px;
  border: 1px solid rgba(114, 70, 44, 0.18);
  border-radius: 999px;
  background: #fcecc4;
  color: var(--brand-strong);
  font-size: var(--type-caption);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(40, 32, 24, 0.12);
  overflow: hidden;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.mac-widget-pill img {
  flex: none;
  display: block;
  border-radius: 50%;
}

.mac-widget-pill .pill-bars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.mac-widget-pill .pill-bars i {
  display: block;
  width: 2.5px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}

[data-mac-demo-phase="listening"] .mac-widget-pill .pill-bars i {
  animation: waveBar 0.85s ease-in-out infinite;
}

[data-mac-demo-phase="listening"] .mac-widget-pill .pill-bars i:nth-child(2) { animation-delay: 0.14s; }
[data-mac-demo-phase="listening"] .mac-widget-pill .pill-bars i:nth-child(3) { animation-delay: 0.28s; }
[data-mac-demo-phase="listening"] .mac-widget-pill .pill-bars i:nth-child(4) { animation-delay: 0.08s; }
[data-mac-demo-phase="listening"] .mac-widget-pill .pill-bars i:nth-child(5) { animation-delay: 0.22s; }

[data-mac-demo-phase="polishing"] .mac-widget-pill {
  background: #e7f0f6;
  border-color: rgba(40, 108, 152, 0.26);
  color: #1f5375;
}

[data-mac-demo-phase="polishing"] .mac-widget-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.65) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: polishSweep 1.15s ease-in-out infinite;
  pointer-events: none;
}

[data-mac-demo-phase="polishing"] .mac-widget-pill .pill-bars,
[data-mac-demo-phase="done"] .mac-widget-pill .pill-bars {
  display: none;
}

[data-mac-demo-phase="done"] .mac-widget-pill {
  background: #e6f4ea;
  border-color: rgba(40, 114, 79, 0.24);
  color: #1f5c3e;
}

.mac-widget-check {
  display: none;
  font-weight: 700;
}

[data-mac-demo-phase="done"] .mac-widget-check {
  display: inline;
}

.mac-example-disclosure {
  margin: 0;
  color: var(--ink-dim);
  font-size: var(--type-caption);
}

@keyframes waveBar {
  0%, 100% { height: 4px; }
  50% { height: 15px; }
}

@keyframes fnPulseRing {
  0% { opacity: 0.55; transform: scale(0.95); }
  100% { opacity: 0; transform: scale(1.16); }
}

@keyframes polishSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes spokenReveal {
  0%, 24% { opacity: 0.24; }
  48%, 100% { opacity: 1; }
}

@keyframes spokenRevealLate {
  0%, 54% { opacity: 0.16; }
  82%, 100% { opacity: 1; }
}

@keyframes insertedFlash {
  0% { background: rgba(252, 236, 196, 0.72); border-radius: 4px; }
  100% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .mac-fn-well::before,
  .mac-spoken-wave i,
  .mac-widget-pill .pill-bars i,
  .mac-widget-pill::after,
  .mac-caret,
  .mac-spoken-text .spoken-chunk-2,
  .mac-spoken-text .spoken-chunk-3,
  .mac-mail-output p {
    animation: none !important;
  }

  .mac-fn-keybtn,
  .mac-mail-output,
  .mac-widget-pill {
    transition: none;
  }
}

.mac-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.mac-mode-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mac-mode-card .mode-tag {
  margin: 0;
  color: #365c55;
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mac-mode-card h3 {
  margin: 0;
  font-size: var(--type-title-small);
}
.mac-mode-card p:not(.mode-tag) {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}
.mac-mode-card strong {
  color: var(--ink);
}
.mac-mode-card .mode-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: var(--type-body);
  font-weight: 600;
  color: #254c43;
  text-decoration: none;
}
.mac-mode-card .mode-link:hover {
  text-decoration: underline;
}

.mac-callout {
  margin-top: 24px;
  padding: 18px 22px;
  border-left: 3px solid #55786e;
  background: #eef3f1;
  border-radius: 8px;
}
.mac-callout p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.65;
}

.mac-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.mac-steps-grid article {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.mac-steps-grid h3 {
  margin: 0 0 8px;
  font-size: var(--type-body-large);
}
.mac-steps-grid p {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.mac-feature-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
  margin-top: 32px;
}
.mac-window-showcase {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  min-width: 0;
}
.mac-window-showcase a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(40, 32, 24, 0.12);
}
.mac-window-showcase img {
  display: block;
  width: 100%;
  height: auto;
}
.mac-window-showcase figcaption {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.5;
}
.mac-window-showcase figcaption strong {
  color: var(--ink);
}

.mac-copy-stack {
  display: grid;
  gap: 16px;
}
.mac-copy-stack h3 {
  margin: 0;
  font-size: var(--type-title-small);
}
.mac-copy-stack p {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.7;
}
.mac-copy-stack strong {
  color: var(--ink);
}
.mac-copy-stack ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}
.mac-copy-stack li {
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.6;
}
.mac-copy-stack li strong {
  color: var(--ink);
}

.mac-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border-top: 2px solid #55786e;
  border-bottom: 1px solid #d7dedb;
  background: #fff;
  border-radius: 8px;
}
.mac-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
  text-align: left;
  font-size: var(--type-body);
}
.mac-table th,
.mac-table td {
  padding: 15px 18px;
  border-top: 1px solid #e3e7e5;
  vertical-align: top;
  line-height: 1.6;
}
.mac-table thead th {
  border-top: 0;
  background: #f4f7f5;
  color: #254c43;
  font-weight: 650;
}
.mac-table tbody th {
  color: var(--ink);
  font-weight: 600;
  width: 24%;
}
.mac-table-note {
  margin-top: 16px;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.mac-faq-list {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}
.mac-faq-list details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.mac-faq-list details:last-child {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.mac-faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--type-body-large);
  line-height: 1.45;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  color: var(--ink);
}
.mac-faq-list summary::-webkit-details-marker {
  display: none;
}
.mac-faq-list summary::after {
  content: "+";
  color: #365c55;
  font-weight: 700;
  flex: none;
}
.mac-faq-list details[open] summary::after {
  content: "−";
}
.mac-faq-list details p {
  margin: 12px 0 4px;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .mac-feature-split,
  .mac-steps-grid,
  .mac-motion-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mac-mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mac-summary {
    padding: 18px 20px;
  }
  .mac-motion-stage {
    padding: 18px;
  }
  .mac-motion-input {
    padding: 16px;
  }
}
