/* Article-local styles preserve the portfolio's existing palette and typography. */
.voice-article { width: 100%; max-width: 860px; min-width: 0; color: #282d30; font-size: 17px; line-height: 1.75; padding-bottom: 2rem; overflow-wrap: break-word; }
.voice-article *, .voice-article *::before, .voice-article *::after { box-sizing: border-box; }
.voice-article h1, .voice-article h2, .voice-article h3, .voice-article h4 { color: #173e52; line-height: 1.18; text-wrap: balance; }
.voice-article h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); font-weight: 750; letter-spacing: -.03em; margin: .6rem 0 1.3rem; }
.voice-article h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 3rem 0 1.15rem; letter-spacing: -.02em; }
.voice-article h3 { font-size: 1.25rem; margin: 1.8rem 0 1rem; }
.voice-article h4 { font-size: 1.1rem; margin: 0 0 1rem; }
.voice-article p { max-width: 72ch; margin: 0 0 1.25rem; text-wrap: pretty; }
.voice-article a { color: #145b82; text-decoration: underline; text-underline-offset: 3px; }
.voice-article button, .voice-article select, .voice-article textarea { font: inherit; }
.voice-article button, .voice-article select { cursor: pointer; }
.voice-article button { border: 1px solid #6c8794; border-radius: 5px; background: #fff; color: #173e52; padding: .45rem .8rem; line-height: 1.4; }
.voice-article button:hover { background: #e3eff5; }
.voice-article button:disabled { opacity: .6; cursor: wait; }
.voice-article :focus-visible { outline: 3px solid #a94620; outline-offset: 3px; }
.voice-article code { color: #21536b; font-size: .85em; }
.voice-article pre { background: #132f3d; color: #eef5f8; padding: 1.2rem; border-radius: 6px; font-size: 13px; overflow: auto; line-height: 1.65; max-width: 100%; }
.voice-article pre code { color: inherit; white-space: pre; }
.voice-article figure { margin: 2rem 0; }
.voice-article figcaption, .voice-caption { color: #485c66; font-size: .83rem; line-height: 1.6; margin-top: 1rem; }
.voice-article .voice-category { color: #4b5e67; font-size: .9rem; margin: 0; }
.voice-deck { font-size: 1.2rem; color: #42535d; line-height: 1.5; }
.voice-byline { font-size: .88rem; }
.voice-byline span { padding: 0 .4rem; }
.voice-jump { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }
.voice-opening { background: #173e52; color: #f1f7fa; padding: clamp(1rem, 3vw, 2rem); border-radius: 8px; margin: .5rem 0 2rem; }
.voice-opening > p { font-size: clamp(1.3rem, 2.5vw, 1.65rem); line-height: 1.45; }
.voice-opening > div { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; border-top: 1px solid #587a8b; padding-top: 1.2rem; }
.voice-opening strong { font-size: 1.6rem; color: #9dd8f4; }
.voice-opening small { flex-basis: 100%; color: #d5e5ed; }
.voice-method { display: flex; gap: 1.2rem; flex-wrap: wrap; padding: 1.2rem 0; border-block: 1px solid #9eaaa9; margin: 1.5rem 0; }
.voice-method > div { flex: 1 1 160px; }
.voice-method strong { color: #173e52; }
.voice-method p { font-size: .9rem; line-height: 1.55; margin: .5rem 0 0; }
.voice-architecture { background: #f3f7f9; padding: 1rem; border-radius: 8px; }
.voice-architecture svg { width: 100%; height: auto; }
.diagram-title { font: 600 21px sans-serif; fill: #173e52; }
.diagram-code { font: 16px monospace; fill: #234c61; }
.diagram-caption { font: 13px sans-serif; fill: #425c6b; }
.architecture-select { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; font-size: .85rem; }
.architecture-select select { background: #fff; color: #173e52; padding: .3rem .8rem; border: 1px solid #6c8794; border-radius: 4px; }
.voice-training { border-block: 1px solid #9eaaa9; padding: 1.5rem 0; }
.training-source, .training-example { background: #f3f7f9; padding: 1rem; border-radius: 6px; }
.training-source > span, .training-example > span { display: block; font-size: .85rem; color: #485c66; margin-bottom: .4rem; }
.training-source code { overflow-wrap: anywhere; }
.training-arrow { color: #485c66; font-size: .85rem; text-align: center; margin: .5rem 0; }
.training-example p { font-size: 1.15rem; margin: 0 0 .4rem; }
.training-example strong { color: #145b82; }
.voice-training > button { margin-top: .75rem; }
.training-splits { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.training-splits > div { flex: 1 1 90px; }
.training-splits strong { display: block; font-size: 1.3rem; color: #173e52; }
.training-splits span { display: block; font-size: .8rem; }
.voice-lab { background: #f4f8fa; border: 1px solid #849da9; border-radius: 8px; padding: clamp(1rem, 2.5vw, 1.8rem); margin: 3rem 0; scroll-margin-top: 1rem; }
.lab-heading { display: flex; align-items: center; gap: .6rem; }
.lab-heading h2 { margin: 0 0 1rem; }
.lab-dot { width: 12px; height: 12px; border-radius: 50%; background: #176f9d; margin-bottom: 1rem; flex-shrink: 0; }
.voice-lab label { display: block; font-size: .9rem; font-weight: 600; }
.voice-lab textarea { display: block; width: 100%; background: #fff; border: 1px solid #6c8794; border-radius: 5px; padding: .8rem; color: #173e52; line-height: 1.6; resize: vertical; }
.lab-submit { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: .8rem 0; }
.lab-submit span { font-size: .8rem; color: #485c66; }
.voice-article .voice-primary { background: #17638a; color: #fff; border-color: #17638a; }
.voice-article .voice-primary:hover { background: #124a68; }
.voice-primary span { color: inherit; }
.voice-examples, .voice-choices { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.voice-examples button, .voice-choices button { font-size: .8rem; }
.lab-rest { margin-top: 1.5rem; font-size: .95rem; color: #485c66; }
.voice-results { border-top: 1px solid #b1c4ce; margin-top: 1.5rem; padding-top: 1.5rem; }
.voice-decision { font-size: 1.25rem; font-weight: 650; color: #173e52; }
.voice-decision small { display: block; font-size: .85rem; font-weight: 400; margin-top: .5rem; }
.voice-tokens { display: flex; flex-wrap: wrap; gap: .4rem; }
.voice-token { display: inline-flex; flex-direction: column; padding: .35rem .5rem; text-align: center; line-height: 1.5; border-radius: 4px; }
.voice-token strong { font-weight: 500; font-size: 1rem; }
.voice-token small { font-size: .65rem; color: #485c66; }
.voice-token.has-label { background: #d8eaf4; border-bottom: 2px solid #176f9d; }
.voice-token.has-label small { color: #204b62; }
.voice-steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.voice-steps button { font-size: .8rem; display: flex; align-items: center; gap: .5rem; flex: 1 1 105px; }
.voice-steps button[aria-pressed="true"] { background: #173e52; color: #fff; }
.voice-steps button span { font-weight: 700; }
.voice-stage { padding: 1rem; background: #fff; border-radius: 5px; min-height: 230px; font-size: .92rem; }
.normalized-text { display: block; padding: 1rem; background: #e8f1f6; margin-bottom: 1rem; overflow-wrap: anywhere; }
.pattern-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.pattern-cloud code { background: #e8f1f6; padding: .3rem .45rem; border-radius: 3px; }
.voice-stage p:last-child { margin-bottom: 0; }
.voice-play { margin: .8rem 0; font-size: .85rem !important; }
.feature-matrix { display: block; width: 100%; height: auto; cursor: crosshair; }
.voice-lab input[type="range"] { width: 100%; accent-color: #176f9d; }
.feature-detail { font-size: .9rem; padding: .4rem; background: #e8f1f6; overflow-wrap: anywhere; }
.voice-output-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.7rem; }
.voice-score { margin-bottom: .6rem; font-size: .85rem; }
.voice-score > div:first-child { display: flex; justify-content: space-between; gap: 1rem; }
.score-track { height: 5px; background: #d6e1e7; margin-top: .25rem; border-radius: 2px; overflow: hidden; }
.score-track span { display: block; height: 100%; background: #176f9d; transition: width .4s ease-out; }
.voice-form-preview { border: 1px solid #a4b8c2; background: #fff; border-radius: 6px; padding: 1rem; font-size: .9rem; }
.preview-route { font-size: .8rem; color: #485c66; overflow-wrap: anywhere; padding-bottom: .8rem; border-bottom: 1px solid #c8d5dc; }
.voice-form-preview dl { margin: .7rem 0; }
.voice-form-preview dl > div { padding: .5rem 0; }
.voice-form-preview dt { font-size: .75rem; color: #485c66; font-weight: 400; }
.voice-form-preview dd { font-weight: 600; margin: 0; }
.preview-save { display: block; background: #e3eff5; padding: .5rem; text-align: center; color: #173e52; }
.voice-form-preview small { display: block; margin-top: .8rem; font-size: .75rem; }
.voice-lab details { margin: 1.5rem 0; border-top: 1px solid #b1c4ce; padding-top: 1rem; }
.voice-lab summary { cursor: pointer; color: #145b82; font-size: .95rem; }
.voice-lab details h4 { margin-top: 1.5rem; }
.voice-handoff { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; background: #f3f7f9; border-radius: 6px; padding: 1rem; }
.voice-handoff > div { flex: 1 1 140px; min-width: 0; }
.voice-handoff > div > span { display: block; font-weight: 650; color: #173e52; margin-bottom: .7rem; }
.voice-handoff code { font-size: .7rem; overflow-wrap: anywhere; }
.voice-handoff p { margin: 0; font-size: .9rem; }
.voice-handoff small { display: block; font-size: .7rem; }
.voice-handoff strong { display: inline-block; background: #d8eaf4; color: #173e52; padding: .1rem 1rem; margin-top: .5rem; }
.voice-handoff figcaption { flex-basis: 100%; }
.handoff-arrow { color: #176f9d; }
.voice-scroll { overflow-x: auto; }
.voice-article table { width: 100%; font-size: .88rem; border-collapse: collapse; margin: 1rem 0; }
.voice-article td, .voice-article th { text-align: left; padding: .6rem; border-bottom: 1px solid #b5c1c5; vertical-align: top; }
.voice-article th { color: #173e52; }
.voice-article caption { caption-side: top; color: #485c66; font-size: .8rem; }
.voice-article .voice-source-note { min-height: 0; margin-top: 2rem; padding: 1rem 0; background: transparent; border-top: 1px solid #9eaaa9; color: #485c66; font-size: .8rem; }
@media (max-width: 700px) {
  .voice-article { font-size: 16px; }
  .voice-output-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .voice-stage { padding: .7rem; }
  .voice-article h2 { margin-top: 2.4rem; }
  .voice-handoff { align-items: stretch; }
  .voice-handoff > div { flex-basis: 100%; }
  .handoff-arrow { transform: rotate(90deg); margin: auto; }
  .voice-byline span { padding: 0 .1rem; }
}
@media (prefers-reduced-motion: reduce) { .voice-article *, .voice-article *::before, .voice-article *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.voice-token.label-action { background: #d8eaf4; border-color: #176f9d; }
.voice-token.label-thing { background: #e7e0f2; border-color: #6a4a91; }
.voice-token.label-amount { background: #d9ecdf; border-color: #376849; }
.voice-token.label-vendorName { background: #f8e5d4; border-color: #91552d; }
.voice-token.label-jobName { background: #d6eceb; border-color: #276b68; }

.voice-sentence { padding: clamp(1rem, 2.5vw, 1.8rem); background: #f3f7f9; border-radius: 8px; }
.voice-sentence h3 { margin: 0 0 .5rem; }
.voice-sentence .sentence-instruction { font-size: .85rem; color: #485c66; }
.sentence-ribbon { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .4rem; padding: .5rem 0 1.5rem; font-size: 1.1rem; }
.voice-article .sentence-phrase { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .45rem .6rem; border: 2px solid transparent; border-radius: 5px; color: #173e52; }
.sentence-phrase small { font-size: .7rem; }
.voice-article .sentence-phrase[aria-pressed="true"] { border-color: #173e52; }
.voice-article .sentence-action { background: #d8eaf4; }
.voice-article .sentence-thing { background: #e7e0f2; }
.voice-article .sentence-amount { background: #d9ecdf; }
.voice-article .sentence-vendorName { background: #f8e5d4; }
.voice-article .sentence-jobName { background: #d6eceb; }
.voice-article .sentence-description { background: #f1e6bc; }
.sentence-trace { display: grid; grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.5fr) auto minmax(0, 1fr); gap: .7rem; align-items: center; border-block: 1px solid #b1c4ce; padding: 1.3rem 0; }
.sentence-trace > div { min-width: 0; }
.sentence-trace > div > span { display: block; font-size: .8rem; font-weight: 650; color: #173e52; margin-bottom: .6rem; }
.sentence-trace .sentence-value { display: inline-block; padding: .3rem .45rem; border-radius: 3px; font-size: .95rem; }
.sentence-trace p { font-size: .85rem; line-height: 1.6; margin: 0; }
.sentence-trace code { font-size: .8rem; overflow-wrap: anywhere; }
.sentence-arrow { color: #176f9d; }
.sentence-remainder { margin-top: 1.2rem; }
.sentence-remainder > strong { font-size: .95rem; color: #173e52; }
.sentence-remainder p { font-size: .85rem; margin: .5rem 0 .8rem; }
.sentence-remainder > div { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; line-height: 1.8; }
.sentence-remainder del { color: #485c66; text-decoration-thickness: 2px; }
.sentence-remainder mark { background: #f1e6bc; color: #173e52; padding: .2rem .3rem; }
@media (max-width: 700px) {
  .sentence-trace { grid-template-columns: minmax(0, 1fr); }
  .sentence-arrow { transform: rotate(90deg); justify-self: center; }
}

.voice-extracted { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; margin: 1rem 0 1.5rem; padding: 1rem 0; border-block: 1px solid #b1c4ce; }
.voice-extracted > div { min-width: 0; max-width: 100%; }
.voice-extracted dt { color: #485c66; font-size: .75rem; }
.voice-extracted dd { color: #173e52; font-size: .95rem; font-weight: 600; margin: .2rem 0 0; overflow-wrap: anywhere; }
.voice-extracted small { display: block; color: #485c66; font-size: .75rem; font-weight: 400; }
