/* The licensing stage: GetMoat's line, the work and plain controls, with the ink badge behind them.
   Tokens only (see /dialogue.css). Light and dark keep today's metrics in the block before the media queries. */
.journey-mount,.journey-host{min-width:0;min-height:0;flex:1;display:flex}
.licensing-flow{position:relative;isolation:isolate;display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0}
.licensing-backdrop{position:absolute;z-index:0;top:0;bottom:0;right:0;width:min(46%,660px);pointer-events:none;overflow:hidden}
.licensing-flow[data-step=welcome] .licensing-backdrop{width:min(52%,760px)}
.licensing-content{position:relative;z-index:1;display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}

.licensing-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px;flex:none;margin:0 0 8px}
.licensing-position{margin:0;font:500 12px/1.3 var(--label);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.licensing-substeps{display:flex;gap:18px}
.licensing-substep{min-height:32px;padding:4px 0;font:var(--button-weight,calc(var(--body-weight)*2 - 300)) 14px/1 var(--body);letter-spacing:var(--button-tracking,calc((500 - var(--body-weight))*.0002em));color:var(--muted);transition:color .2s}
.licensing-substep:hover:not(:disabled){color:var(--ink)}
.licensing-substep[aria-current=step]{color:var(--ink);text-decoration:underline;text-decoration-color:var(--link-underline);text-decoration-thickness:2px;text-underline-offset:7px}

.licensing-work{display:flex;flex-direction:column;flex:1;min-height:0;width:min(100%,610px)}
.licensing-heading{flex:none;display:flex;flex-direction:column;gap:10px;margin:0 0 14px}
.journey-title{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:0 12px;font:var(--display-weight) clamp(28px,2.6vw,40px)/1.08 var(--display);letter-spacing:var(--display-tracking,-.03em)}
.journey-title>span{font-weight:var(--body-weight);color:var(--muted)}
.licensing-tasks{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-height:18px;font:calc(var(--button-weight,calc(var(--body-weight)*2 - 300)) - 100) 13px/1.3 var(--body);color:var(--muted)}
.licensing-task-hexes{display:flex;gap:4px}
.licensing-task-hexes .hx{width:12px;height:14px}
.licensing-heading .getmoat-speaker{margin-top:6px}
.licensing-heading .getmoat-line{font-size:clamp(17px,min(1.4vw,2.6vh),20px)}
/* On question and lesson steps the question is the headline; GetMoat speaks in a smaller line. */
.licensing-flow:is([data-step=interview],[data-step=learn]) .licensing-heading .getmoat-line{font-size:clamp(16px,min(1.25vw,2.4vh),18px);line-height:1.45}
.licensing-flow:is([data-step=interview],[data-step=learn]) .licensing-heading{gap:6px;margin-bottom:8px}
.getmoat-decide:empty{display:none}
/* A short note when a piece is placed: a raised panel in the dark themes, an ink chip in light and dark. */
.licensing-achievement{position:fixed;z-index:30;left:50%;bottom:132px;display:flex;align-items:center;gap:10px;margin:0;padding:11px 18px;max-width:calc(100vw - 32px);border:1px solid var(--ghost);border-radius:var(--radius-field);background:var(--bg-raised);color:var(--ink);box-shadow:var(--shadow);font:calc(var(--button-weight,calc(var(--body-weight)*2 - 300)) - 100) 15px/1.25 var(--body);opacity:0;transform:translate(-50%,10px);transition:opacity .35s,transform .35s var(--ease);pointer-events:none}
.licensing-achievement.is-on{opacity:1;transform:translate(-50%,0)}
.licensing-achievement .hx{width:14px;height:16px}

.licensing-task{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--ghost) transparent;padding:4px 8px 18px 2px}
.licensing-controls{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px 24px;padding:10px 0 4px}
.licensing-next-hint{margin:0;max-width:520px;font:var(--body-weight) 14px/1.45 var(--body);color:var(--muted)}
.licensing-next-hint:empty{display:none}
.licensing-buttons{margin-left:auto;display:flex;align-items:center;gap:8px 12px;flex-shrink:0}
/* Back and the other secondary step moves read as ghost buttons beside the primary one (DESIGN.md btn-ghost). */
.licensing-buttons .text-action{min-height:44px;padding:12px 20px;border-radius:var(--radius);box-shadow:inset 0 0 0 1px var(--control-line);font-size:14px;font-weight:calc(var(--button-weight,calc(var(--body-weight)*2 - 300)) - 100);color:var(--ink-2);transition:color .2s,box-shadow .2s,background-color .2s}
.licensing-buttons .text-action:hover:not(:disabled){color:var(--ink);background:var(--fill);box-shadow:inset 0 0 0 1px var(--border-hover)}

/* The first screen: one sentence decides how GetMoat works with you. */
.licensing-start{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;justify-content:center;max-width:min(100%,780px);padding:8px 2px 24px}
.licensing-start .getmoat-speaker{max-width:560px}
.getmoat-speaker.is-small .getmoat-line{font:var(--body-weight) clamp(16px,1.3vw,19px)/1.5 var(--body)}
.licensing-start>.licensing-position{margin:36px 0 12px}
.licensing-sentence{display:block;max-width:15ch;font:var(--display-weight) clamp(40px,5.4vw,84px)/1.08 var(--display);letter-spacing:var(--display-tracking,-.045em)}
/* The two choices inside the sentence: accent-coloured words on a soft chip (light and dark keep today's green and orange words). */
.sentence-choice{display:inline;padding:0 .14em .04em;margin:0 -.04em;border-radius:var(--radius);background:var(--fill);font:inherit;letter-spacing:inherit;color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:.06em;text-underline-offset:.14em;transition:background .25s,box-shadow .25s}
.sentence-choice:hover{background:var(--fill-2)}
.sentence-choice:focus-visible{outline-offset:3px}
.sentence-choice[data-sentence=input],.sentence-choice[data-sentence=work]{color:var(--accent-text)}
.licensing-mode-summary{margin:24px 0 0;max-width:46ch;font:var(--body-weight) clamp(16px,1.3vw,19px)/1.55 var(--body);color:var(--ink-2)}
.licensing-mode-summary b{font-weight:var(--button-weight,calc(var(--body-weight)*2 - 300));color:var(--ink)}
.licensing-hint{margin:8px 0 28px;font:500 12px/1.4 var(--label);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.licensing-start-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 30px}
.licensing-estimate{margin:24px 0 0;max-width:46ch;font:var(--body-weight) 14px/1.5 var(--body);color:var(--muted)}

.licensing-summary{max-width:640px;display:grid;gap:12px;justify-items:start}
.licensing-summary h2{margin:0;font:var(--display-weight) clamp(24px,2vw,30px)/1.15 var(--display);letter-spacing:var(--display-tracking,-.025em)}
.licensing-summary p{margin:0;font-size:17px;color:var(--muted)}

/* Step modules read as part of the stage. */
.licensing-task .company-form .field{margin-bottom:14px}
.licensing-task .company-form textarea{min-height:92px;max-height:180px}
.licensing-task .field-note{display:none}
.licensing-task .company-assessment,.licensing-task .company-academy{height:auto;min-height:100%}
.licensing-task .assessment-panel,.licensing-task .academy{min-height:0}
.licensing-task .assessment-body,.licensing-task .academy-body{flex:initial}
.licensing-task .academy[data-embedded=true]{gap:14px}
.licensing-task .academy[data-embedded=true] .academy-heading h1{font-size:clamp(24px,2.3vw,34px)}
.licensing-task .academy[data-embedded=true][data-view=interview] .academy-heading h1{font-size:clamp(20px,1.9vw,26px)}
.licensing-task .academy[data-embedded=true] .academy-lead{font-size:16px;margin-top:10px!important}
/* The lesson controls stay in reach while the lesson scrolls: a page-coloured strip with a hairline, so it reads as a toolbar
   over the page effects and hides what scrolls beneath it (light and dark keep today's plain strip). */
.licensing-task .academy[data-embedded=true] .academy-footer{position:sticky;bottom:0;z-index:2;background:var(--bg);border-top:1px solid var(--ghost);padding:12px 0 4px}

/* Light and dark: today's metrics. Zero-specificity theme scope before the media queries, so those still apply. */
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) :is(.licensing-position,.licensing-hint){font-size:14px;letter-spacing:.045em}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-substep{font-size:15px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .journey-title{font-size:clamp(26px,2.4vw,38px);line-height:1.06}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-tasks{font-size:14px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-heading .getmoat-line{font-size:clamp(20px,min(2.2vw,3.6vh),34px)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-heading .getmoat-line.is-long{font-size:clamp(19px,min(1.9vw,3.1vh),29px)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-flow:is([data-step=interview],[data-step=learn]) .licensing-heading .getmoat-line{font-size:clamp(17px,min(1.6vw,2.9vh),24px);line-height:1.3}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-achievement{border:0;border-radius:8px;background:var(--ink);color:var(--bg);box-shadow:none}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-buttons{gap:8px 26px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-buttons .text-action{min-height:44px;padding:8px 2px;border-radius:0;box-shadow:none;font-size:17px;font-weight:var(--button-weight,calc(var(--body-weight)*2 - 300));color:var(--muted)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-buttons .text-action:hover:not(:disabled){color:var(--ink);background:none;box-shadow:none}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .getmoat-speaker.is-small .getmoat-line{font:600 clamp(17px,1.45vw,21px)/1.4 var(--display);letter-spacing:-.01em}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-sentence{font-size:clamp(40px,5.4vw,90px);line-height:1.04}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .sentence-choice{border-radius:.22em;text-decoration:none}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .sentence-choice:focus-visible{border-radius:.22em}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .sentence-choice[data-sentence=input]{color:var(--ok)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .sentence-choice[data-sentence=work]{color:var(--doing)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-mode-summary{font-size:clamp(17px,1.4vw,21px);line-height:1.45}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-estimate{font-size:15px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-task .academy[data-embedded=true][data-view=interview] .academy-heading h1{font-size:clamp(24px,2.3vw,34px)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-task .academy[data-embedded=true] .academy-footer{background:var(--bg);border-top:0;padding-top:10px}

@media(max-width:1100px){
  .licensing-backdrop,.licensing-flow[data-step=welcome] .licensing-backdrop{right:0;width:44%;opacity:.32}
  .licensing-work{width:100%}
}
@media(max-width:900px){
  .licensing-backdrop,.licensing-flow[data-step=welcome] .licensing-backdrop{left:30%;right:0;width:auto;opacity:.32}
  .licensing-controls{gap:8px 16px}
}
@media(max-width:640px){
  .licensing-top{margin-bottom:6px}
  .licensing-heading{gap:8px;margin-bottom:10px}
  .journey-title{font-size:26px}
  :where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .journey-title{font-size:24px}
  .licensing-tasks{font-size:13px}
  :where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-tasks{font-size:14px}
  .licensing-heading .getmoat-speaker{margin-top:2px}
  .licensing-heading .getmoat-line,.licensing-heading .getmoat-line.is-long,.licensing-flow:is([data-step=interview],[data-step=learn]) .licensing-heading .getmoat-line{font-size:16px;line-height:1.45}
  :where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-heading .getmoat-line{font-size:19px;line-height:1.22}
  :where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-flow:is([data-step=interview],[data-step=learn]) .licensing-heading .getmoat-line{font-size:clamp(17px,min(1.6vw,2.9vh),24px);line-height:1.3}
  :where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-heading .getmoat-line.is-long{font-size:19px;line-height:1.22}
  .getmoat-who{margin-bottom:6px}
  .licensing-controls{flex-direction:column;align-items:stretch;padding-top:8px}
  .licensing-buttons{margin:0;justify-content:space-between}
  .licensing-next-hint{font-size:14px}
  .licensing-task .academy[data-embedded=true][data-view=interview] .academy-heading h1{font-size:20px}
  :where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .licensing-task .academy[data-embedded=true][data-view=interview] .academy-heading h1{font-size:clamp(24px,2.3vw,34px)}
  .licensing-start>.licensing-position{margin:24px 0 10px}
  .licensing-sentence{font-size:40px}
  .licensing-hint{margin-bottom:22px}
  .licensing-estimate{font-size:14px}
}
@media(max-width:380px){.licensing-sentence{font-size:35px}}
@media(max-height:760px) and (min-width:901px){
  .licensing-heading{gap:8px;margin-bottom:10px}
  .journey-title{font-size:30px}
  .licensing-start>.licensing-position{margin-top:22px}
  .licensing-sentence{font-size:clamp(40px,4.6vw,72px)}
  .licensing-hint{margin-bottom:20px}
}
@media(prefers-reduced-motion:reduce){.licensing-flow *{animation:none!important;transition:none!important}}
html.motion-paused .licensing-flow *{animation:none!important;transition:none!important}
