/* The site shell supplies the typefaces, colors, and navigation. */
.rb-builder {
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.rb-builder [hidden] { display: none !important; }
.rb-builder h1 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.18; }
.rb-builder .btn, .rb-builder .rb-text-button { min-height: 44px; }
.rb-builder .btn + .btn { margin: 0; }
.rb-builder :focus-visible { outline: 3px solid #398894; outline-offset: 4px; }
.rb-builder textarea:focus-visible { outline-offset: 1px; }
.rb-builder .btn:disabled, .rb-text-button:disabled { opacity: .58; cursor: default; }
.rb-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.rb-note, .rb-feedback { margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }
.rb-feedback:empty, .rb-note:empty { display: none; }
.rb-feedback { font-weight: 600; color: var(--fg); }
.rb-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .75fr);
  border: 1px solid var(--rule-2);
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
  margin: 12px auto;
}
.rb-intro { padding: clamp(28px, 5.5vw, 76px); align-self: center; }
.rb-intro h1 { border-left: 5px solid var(--yellow); padding-left: 16px; }
.rb-lead { margin: 1.25rem 0 2rem; font-size: 1.08rem; max-width: 32em; line-height: 1.85; }
.rb-intro .rb-note { max-width: 32em; margin-top: 1rem; }
.rb-sample {
  display: grid;
  place-content: center;
  justify-items: center;
  background: var(--teal-deep);
  color: #e7f4f1;
  margin: 0;
  padding: 36px 28px 20px;
}
.rb-model {
  width: 175px;
  box-sizing: border-box;
  padding: 21px 20px 24px;
  background: #fff;
  color: #0a3744;
  border-top: 4px solid #f5c84c;
  box-shadow: 8px 8px 0 #8cb2ae;
  transform: rotate(3deg);
}
.rb-model b { font-size: 1.15rem; letter-spacing: .08em; }
.rb-model strong { display: block; font-size: .63rem; letter-spacing: .08em; margin: 9px 0 5px; }
.rb-model-line { display: block; height: 3px; background: #c8d4d2; border-radius: 1px; margin: 5px 0; }
.rb-model-line.rb-short { width: 36%; }
.rb-model-line.rb-mid { width: 72%; }
.rb-model-rule { height: 2px; background: #0f4c5c; margin-top: 12px; }
.rb-sample figcaption { margin-top: 21px; font-size: .82rem; letter-spacing: .07em; }
.rb-chat, .rb-result, .rb-state { max-width: 840px; margin-left: auto; margin-right: auto; }
.rb-chat {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  overflow: hidden;
}
.rb-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--teal-deep);
  color: #e4f1ee;
  padding: 22px clamp(20px, 4vw, 40px);
}
.rb-chat-head h1 { color: white; font-size: 1.45rem; }
.rb-chat-head p { font-size: .9rem; margin: 6px 0 0; font-variant-numeric: tabular-nums; }
#ri-meter {
  appearance: none;
  flex: 0 1 120px;
  width: 25%;
  height: 7px;
  border: none;
  border-radius: 1rem;
  background: #4b6f77;
  color: var(--yellow);
  accent-color: var(--yellow);
}
#ri-meter::-webkit-progress-bar { background: #4b6f77; border-radius: 1rem; }
#ri-meter::-webkit-progress-value { background: var(--yellow); border-radius: 1rem; }
#ri-meter::-moz-progress-bar { background: var(--yellow); border-radius: 1rem; }
.rb-turn { background: var(--tint); padding: 24px clamp(20px, 4vw, 40px); }
.rb-speaker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .87rem; font-weight: 650; }
.rb-audio-mark { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; background: var(--teal); color: #fff; border-radius: 50%; }
.rb-audio-mark i { height: 4px; width: 2px; border-radius: 1px; background: currentColor; }
.rb-audio-mark i:nth-child(even) { height: 9px; }
.rb-audio-mark i:nth-child(3) { height: 14px; }
#ri-question { font-size: clamp(1.25rem, 2.8vw, 1.75rem); line-height: 1.5; margin-top: 10px; }
.rb-answer-area { padding: 22px clamp(20px, 4vw, 40px) 12px; }
.rb-answer-area label { display: block; font-weight: 650; margin-bottom: 6px; }
.rb-answer-area textarea { display: block; min-height: 5.5rem; line-height: 1.6; }
.rb-response-controls, .rb-turn-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.rb-turn-nav { border-top: 1px solid var(--rule); padding-top: 4px; }
.rb-text-button { border: 0; padding: 5px 4px; background: transparent; color: var(--teal); font: 600 .95rem var(--body); cursor: pointer; }
.rb-text-button:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { .rb-text-button { color: #8fd3e0; } }
.rb-state:not(:empty) { margin-top: .85rem; padding: 11px 16px; background: var(--paper); border-inline-start: 3px solid var(--teal); }
.rb-result-head h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.rb-result-head > p { margin: .6rem 0; }
.rb-result-head .rb-actions { margin: 15px 0; }
.rb-paper {
  background: #fff;
  color: #202d30;
  padding: clamp(24px, 6vw, 67px);
  margin: 24px auto 0;
  max-width: 794px;
  box-shadow: 0 5px 22px rgba(18, 46, 53, .09);
  border: 1px solid #cbd5d2;
  border-top: 5px solid #0f4c5c;
  font-size: 1rem;
  line-height: 1.75;
}
.rb-paper h2, .rb-paper h3, .rb-paper b, .rb-paper strong { color: #0a3744; }
.rb-paper h2 { font-size: 2.1rem; line-height: 1.25; margin: 0 0 6px; }
.rb-paper .target { font-size: 1.1rem; font-weight: 650; margin: 6px 0; }
.rb-paper .contact { color: #455a5e; margin: 6px 0; }
.rb-paper section { margin-top: 1.5rem; }
.rb-paper h3 { font-size: 1.1rem; border-bottom: 1px solid #a8bdb9; padding-bottom: 5px; margin-bottom: 7px; }
.rb-paper p, .rb-paper li { white-space: pre-line; }
.rb-paper p { margin: .45rem 0; }
.rb-paper ul { padding-inline-start: 1.3em; margin: .4rem 0; }
.rb-paper li + li { margin-top: .35rem; }
.rb-paper [contenteditable="true"] { outline: 1px dashed #739898; outline-offset: 2px; min-height: 1.4em; }
.rb-paper [contenteditable="true"]:focus { outline: 2px solid #0f4c5c; }
.rb-paper [contenteditable="true"]:empty::before { content: attr(aria-placeholder); color: #627478; }
.rb-paper .contact:empty:not([contenteditable="true"]) { display: none; }
@media (max-width: 690px) {
  .rb-welcome { grid-template-columns: 1fr; margin-top: 0; }
  .rb-intro { padding: 26px 22px; }
  .rb-lead { margin: 16px 0 24px; font-size: 1rem; }
  .rb-sample { padding: 22px; }
  .rb-model { width: 138px; padding: 12px 14px; }
  .rb-model strong { margin-top: 5px; }
  .rb-sample figcaption { margin-top: 15px; }
}
@media (max-width: 390px) { .rb-actions .btn { padding-inline: 13px; } }
@page { size: A4; margin: 16mm 17mm; }
@media print {
  html, body { background: #fff !important; color: #172528; margin: 0 !important; padding: 0 !important; }
  body > header, body > footer, body > nav, .actbar, #ri-start, #ri-chat, .rb-result-head, .rb-state { display: none !important; }
  body main.wrap, .rb-builder, .rb-result { max-width: none; margin: 0; padding: 0; }
  .rb-paper { padding: 0; margin: 0; box-shadow: none; border: 0; max-width: none; font-size: 10.5pt; line-height: 1.55; }
  .rb-paper h2 { font-size: 24pt; }
  .rb-paper h3 { font-size: 13pt; }
  .rb-paper h2, .rb-paper h3 { break-after: avoid; }
  .rb-paper section { margin-top: 14pt; }
  .rb-paper p, .rb-paper li { orphans: 2; widows: 2; }
  .rb-paper [contenteditable="true"]:empty::before { content: none; }
  .rb-paper [contenteditable="true"], .rb-paper [contenteditable="true"]:focus { outline: none; }
}
