.phrase-hero {
  padding-top: 38px;
  padding-bottom: 30px;
}
.phrase-crumb {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
}
.phrase-crumb a:hover { color: var(--ink); }
.phrase-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.phrase-heading h1 {
  max-width: 900px;
  margin-bottom: 14px;
  font-size: clamp(42px, 5.6vw, 72px);
  text-wrap: balance;
}
.phrase-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.phrase-result-label {
  flex: 0 0 auto;
  margin-bottom: 5px;
  padding: 6px 9px;
  border-radius: 4px;
  background: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.phrase-studio {
  margin-bottom: 82px;
  background: transparent;
}
.phrase-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.phrase-viewbar > span {
  flex: 0 0 auto;
  color: var(--text-ink);
  font-size: 13px;
  font-weight: 600;
}
.phrase-view-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.phrase-scene-options {
  display: flex;
  padding: 4px;
  border-radius: 10px;
  background: var(--line);
}
.phrase-view {
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.phrase-view:hover { background: #fff; }
.phrase-view.is-active {
  background: var(--ink);
  color: #fff;
}
.phrase-practice-view {
  margin-left: auto;
  border: 1px solid var(--ink);
  background: #fff;
}
.phrase-practice-view span { margin-left: 8px; }
.phrase-practice-view.is-active { border-color: var(--ink); }
.phrase-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: background-color 180ms ease-out;
}
.phrase-surface {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 290px;
  padding: 38px;
  transition: width 180ms ease-out, min-height 180ms ease-out, background-color 180ms ease-out;
}
.phrase-output {
  position: relative;
  z-index: 1;
  max-width: 100%;
  color: var(--ink);
  font-size: 82px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}
.phrase-output.is-medium { font-size: 62px; }
.phrase-output.is-long { font-size: 44px; }
.phrase-output.is-empty {
  color: var(--muted);
  font-family: "Cal Sans", sans-serif;
  font-size: 20px;
}
.plain-artwork-label { display: none; }
.view-plain {
  background: #ededed;
}
.view-plain .phrase-surface {
  width: min(920px, 96%);
  min-height: 300px;
  border: 1px solid var(--line);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
    linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}
.view-plain.background-white .phrase-surface {
  background-image: none;
}
.view-plain .plain-artwork-label {
  position: absolute;
  top: 17px;
  left: 18px;
  display: block;
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .92);
  color: var(--muted);
  font: 600 9px/1 "Cal Sans", sans-serif;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.view-plain .phrase-output {
  padding: 18px 28px 22px;
}
.view-card,
.view-tag,
.view-practice { background: #e9e9e9; }
.view-card {
  background-color: #171717;
  background-image:
    linear-gradient(135deg, transparent 0 68%, rgba(230, 255, 38, .9) 68% 100%),
    linear-gradient(#171717, #171717);
}
.view-card .phrase-surface {
  width: min(630px, 90%);
  min-height: 370px;
  padding: 76px 62px;
  background: #fff;
  box-shadow: 13px 13px 0 var(--accent);
}
.view-card .phrase-surface::before {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid #111;
  pointer-events: none;
}
.view-card .phrase-surface::after {
  content: "✦";
  position: absolute;
  top: 31px;
  right: 34px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font: 700 12px/27px "Cal Sans", sans-serif;
  text-align: center;
}
.card-kicker,
.scene-signoff { display: none; }
.view-card .card-kicker {
  position: absolute;
  top: 35px;
  left: 37px;
  display: block;
  color: var(--ink);
  font: 500 10px/1 "Cal Sans", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.view-card .scene-signoff {
  position: absolute;
  right: 36px;
  bottom: 31px;
  display: block;
  padding: 0 0 4px;
  border-bottom: 5px solid var(--accent);
  color: var(--ink);
  font: 600 8px/1 "Cal Sans", sans-serif;
  letter-spacing: .12em;
}
.view-card .phrase-output { max-width: 86%; }
.view-tag {
  background-color: #202020;
  background-image:
    linear-gradient(165deg, transparent 0 74%, var(--accent) 74% 100%),
    linear-gradient(#202020, #202020);
}
.view-tag .phrase-surface {
  width: min(520px, 82%);
  min-height: 250px;
  padding: 58px 48px 50px 82px;
  background: #fff;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 12% 100%, 0 50%);
  filter: drop-shadow(13px 15px 0 rgba(0, 0, 0, .35));
  transform: rotate(-2.2deg);
}
.view-tag .phrase-surface::before {
  content: "";
  position: absolute;
  inset: 14px 14px 14px 72px;
  border: 1px dashed #b8b8b8;
  pointer-events: none;
}
.tag-hole { display: none; }
.view-tag .tag-hole {
  position: absolute;
  top: 50%;
  left: 34px;
  display: block;
  width: 18px;
  height: 18px;
  border: 5px solid var(--accent);
  border-radius: 50%;
  background: #ededed;
  box-shadow: 0 0 0 1px var(--ink);
  transform: translateY(-50%);
}
.view-tag .scene-signoff {
  position: absolute;
  right: 30px;
  bottom: 24px;
  display: block;
  padding: 5px 8px;
  background: var(--ink);
  color: #fff;
  font: 600 8px/1 "Cal Sans", sans-serif;
  letter-spacing: .1em;
}
.view-tag .phrase-output { font-size: 58px; transform: rotate(2.2deg); }
.view-tag .phrase-output.is-medium { font-size: 44px; }
.view-tag .phrase-output.is-long { font-size: 32px; }
.view-practice .phrase-surface {
  width: min(940px, 96%);
  min-height: 270px;
  border: 1px solid var(--line);
  background-color: #fff;
  background-image: linear-gradient(to bottom, transparent 24.5%, var(--soft) 24.5%, var(--soft) 25%, transparent 25%, transparent 49.5%, var(--soft) 49.5%, var(--soft) 50%, transparent 50%, transparent 74.5%, var(--guide-base) 74.5%, var(--guide-base) 75%, transparent 75%);
}
.view-practice .phrase-output { font-size: 60px; }
.view-practice .phrase-output.is-medium { font-size: 48px; }
.view-practice .phrase-output.is-long { font-size: 36px; }
.phrase-controls {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--wash);
}
.phrase-field,
.phrase-style-control { padding: 21px 22px; }
.phrase-field { border-right: 1px solid var(--line); }
.phrase-field-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.phrase-field-head label,
.phrase-control-label {
  color: var(--text-ink);
  font-size: 13px;
  font-weight: 600;
}
.phrase-field-head span {
  color: var(--muted);
  font-size: 11px;
}
.phrase-field textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  padding: 12px 13px;
  resize: vertical;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  line-height: 1.5;
}
.phrase-field textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.phrase-message {
  min-height: 18px;
  margin: 6px 0 0;
  color: #8a271c;
  font-size: 11px;
}
.phrase-control-label { display: block; margin-bottom: 9px; }
.phrase-fonts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
}
.phrase-font-option {
  position: relative;
  flex: 0 0 142px;
  min-height: 84px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
}
.phrase-font-option:hover { border-color: var(--ink); }
.phrase-font-option[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.phrase-font-option[aria-checked="true"]::after {
  content: "✓";
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.phrase-font-option strong { display: block; font-size: 24px; font-weight: 400; line-height: 1.25; }
.phrase-font-option span { display: block; margin-top: 5px; font: 500 11px/1.2 "Cal Sans", sans-serif; }
.phrase-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  margin-top: 12px;
  padding: 15px 22px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
}
.phrase-action-copy strong,
.phrase-action-copy span { display: block; }
.phrase-action-copy strong { font-size: 14px; }
.phrase-action-copy span { margin-top: 3px; color: #c8c8c8; font-size: 11px; }
.phrase-actions { display: flex; align-items: center; gap: 9px; }
.phrase-actionbar .btn { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.phrase-actionbar .btn:hover { border-color: #fff; background: #fff; }
.phrase-segmented { display: flex; border: 1px solid #767676; border-radius: 8px; overflow: hidden; }
.phrase-segmented.is-hidden { display: none; }
.phrase-segmented button {
  min-height: 44px;
  padding: 9px 13px;
  border: 0;
  border-right: 1px solid #767676;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.phrase-segmented button:last-child { border-right: 0; }
.phrase-segmented button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.phrase-explainer { padding: 74px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.phrase-explainer-inner { display: grid; grid-template-columns: .82fr 1.18fr; gap: 70px; align-items: start; }
.phrase-explainer h2 { max-width: 450px; font-size: 38px; }
.phrase-explainer p { max-width: 650px; margin: 3px 0 0; color: var(--text-ink); font-size: 18px; line-height: 1.65; }
.phrase-related { padding-top: 78px; padding-bottom: 92px; }
.phrase-feature {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  align-items: center;
  gap: 56px;
  margin-top: 78px;
  margin-bottom: 78px;
  padding: 44px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
}
.phrase-feature-copy h2 { margin: 6px 0 12px; font-size: 38px; }
.phrase-feature-copy p:not(.eyebrow) { max-width: 520px; margin: 0 0 24px; color: #c8c8c8; line-height: 1.65; }
.phrase-feature-copy .eyebrow { color: var(--accent); }
.phrase-feature-copy .btn { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.phrase-feature-script {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 28px;
  border: 1px solid #555;
  background: #fff;
  color: var(--ink);
  font-size: clamp(46px, 6vw, 76px);
  text-align: center;
}
.phrase-related-head { margin-bottom: 24px; }
.phrase-related-head p { margin: 7px 0 0; color: var(--muted); }
.phrase-presets { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.phrase-presets button {
  min-height: 116px;
  padding: 20px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  text-align: left;
}
.phrase-presets button:last-child { border-right: 0; }
.phrase-presets button:hover { background: #fff; }
.phrase-presets span,
.phrase-presets small { display: block; }
.phrase-presets span { font-size: 17px; font-weight: 600; }
.phrase-presets small { margin-top: 8px; color: var(--muted); }
.phrase-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
.phrase-toast.is-visible { opacity: 1; transform: translateY(0); }
#phrasePrintContainer { display: none; }
@media (max-width: 900px) {
  .phrase-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .phrase-result-label { margin: 0; }
  .phrase-controls { grid-template-columns: 1fr; }
  .phrase-field { border-right: 0; border-bottom: 1px solid var(--line); }
  .phrase-actionbar { align-items: flex-start; flex-direction: column; }
  .phrase-actions { width: 100%; flex-wrap: wrap; }
  .phrase-actions .btn { flex: 1; }
  .phrase-explainer-inner { grid-template-columns: 1fr; gap: 20px; }
  .phrase-presets { grid-template-columns: repeat(2, 1fr); }
  .phrase-feature { grid-template-columns: 1fr; gap: 28px; }
  .phrase-presets button:nth-child(2) { border-right: 0; }
}
@media (max-width: 620px) {
  .phrase-hero { padding-top: 28px; }
  .phrase-heading h1 { font-size: 40px; }
  .phrase-heading p { font-size: 16px; }
  .phrase-viewbar { align-items: flex-start; flex-direction: column; }
  .phrase-view-options { align-items: stretch; flex-direction: column; }
  .phrase-scene-options { width: 100%; overflow-x: auto; }
  .phrase-scene-options .phrase-view { flex: 1; padding-inline: 11px; }
  .phrase-practice-view { width: 100%; margin-left: 0; }
  .phrase-canvas { min-height: 330px; padding: 18px; }
  .phrase-surface { min-height: 250px; padding: 22px; }
  .view-plain .phrase-surface { min-height: 250px; }
  .phrase-output { font-size: 54px; }
  .phrase-output.is-medium { font-size: 42px; }
  .phrase-output.is-long { font-size: 31px; }
  .view-card .phrase-surface { min-height: 280px; padding: 58px 32px; }
  .view-tag .phrase-surface { width: 96%; min-height: 210px; padding: 46px 26px 40px 56px; }
  .view-tag .tag-hole { left: 22px; }
  .view-tag .tag-hole::after { width: 120px; }
  .phrase-actions { align-items: stretch; flex-direction: column; }
  .phrase-segmented { width: 100%; }
  .phrase-segmented button { flex: 1; }
  .phrase-presets { grid-template-columns: 1fr; }
  .phrase-presets button { border-right: 0; }
  .phrase-feature { margin-top: 50px; margin-bottom: 50px; padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .phrase-canvas,
  .phrase-surface,
  .phrase-toast { transition: none; }
}
@media print {
  body > *:not(#phrasePrintContainer) { display: none !important; }
  #phrasePrintContainer { display: block !important; }
  .phrase-print-page {
    width: 210mm;
    height: 297mm;
    padding: 13mm 14mm;
    background: #fff;
    color: #000;
  }
  .phrase-print-page.landscape { width: 297mm; height: 210mm; }
  .phrase-print-title { margin-bottom: 8mm; font: 600 14pt/1.2 "Cal Sans", sans-serif; }
  .phrase-print-rows { display: grid; grid-template-rows: repeat(7, 1fr); height: calc(100% - 16mm); }
  .phrase-print-page.landscape .phrase-print-rows { grid-template-rows: repeat(5, 1fr); }
  .phrase-print-row {
    position: relative;
    overflow: hidden;
    border-top: .25mm solid #c9c9c9;
    border-bottom: .3mm solid #8c8c8c;
    background: linear-gradient(to bottom, transparent 32.8%, #d6d9db 32.8%, #d6d9db 33.3%, transparent 33.3%, transparent 65.8%, #d6d9db 65.8%, #d6d9db 66.3%, transparent 66.3%);
  }
  .phrase-print-sample {
    position: absolute;
    left: 8mm;
    bottom: 27%;
    max-width: calc(100% - 16mm);
    font-size: 29pt;
    line-height: 1;
    white-space: nowrap;
  }
  .phrase-print-row.trace .phrase-print-sample { opacity: .18; }
  .phrase-print-row.blank .phrase-print-sample { display: none; }
}
