/* ==========================================================================
   Tool pages (product/) and the Report writer demo (reportwriter.js).

   Loads after styles.css and heroapp.css: the page frame uses the site's
   tokens and .lp-* parts from styles.css section 22; the demos use the app
   replica's --ea-* tokens, which heroapp.css defines on .ea, .px and .rwd.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page frame: heading, then the demo as the hero's picture
   -------------------------------------------------------------------------- */

.pd-hero {
  padding-bottom: 0;
}

.pd-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
}

.pd-head h1 {
  font-size: var(--t-4xl);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.pd-head .lp-lead {
  margin-top: 0;
}

.pd-head .lp-actions {
  margin-top: var(--s-6);
}

.pd-stage {
  padding: clamp(28px, 3vw, 44px) 0 var(--section-pad);
}

.pd-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

/* "Try it": steps that tick as the visitor does them in the demo */
.pd-try {
  position: sticky;
  top: calc(var(--header-h) + var(--s-5));
  display: grid;
  gap: var(--s-3);
}

.pd-try h2 {
  font-size: var(--t-lg);
  letter-spacing: -0.02em;
}

.pd-try > p:not(.pd-try-done) {
  color: var(--ink-3);
  font-size: var(--t-sm);
  line-height: 1.55;
}

.pd-try ol {
  display: grid;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: try;
}

.pd-try li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: var(--s-3);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: 1.4;
  counter-increment: try;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}

.pd-try li::before {
  content: counter(try);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 700;
}

.pd-try li[data-done] {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  color: var(--ink);
}

.pd-try li[data-done]::before {
  content: "";
}

.pd-try li[data-done]::before,
.rwd-steps li[data-done] i {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--brand);
}

.pd-try-done {
  display: none;
  padding: var(--s-4);
  border-radius: var(--r-md);
  background: var(--bg-inverse);
  color: var(--ink-inverse);
  font-size: var(--t-sm);
  line-height: 1.5;
}

.pd-try-done a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pd-try.is-complete .pd-try-done {
  display: block;
}

.pd-demo .px-demo {
  padding: clamp(14px, 2vw, 22px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}

.pd-demo-phone .px-demo {
  display: grid;
  place-items: center;
  padding-block: clamp(20px, 3vw, 36px);
}

/* Related tools at the foot of each page */
.pd-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-related a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  height: 100%;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.pd-related a:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-1);
}

.pd-related a::after {
  content: "";
  width: 15px;
  height: 15px;
  background-color: var(--brand);
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
}

.pd-related .ei {
  box-sizing: content-box;
  width: 18px;
  height: 18px;
  padding: 9px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
}

.pd-related span {
  display: grid;
  min-width: 0;
  line-height: 1.35;
}

.pd-related strong {
  font-size: var(--t-sm);
}

.pd-related small {
  color: var(--ink-3);
  font-size: var(--t-xs);
}

@media (max-width: 1080px) {
  .pd-head,
  .pd-stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-try {
    position: static;
  }

  .pd-try ol {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .pd-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .pd-related {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Report writer demo
   -------------------------------------------------------------------------- */

.rwd {
  container: rwd / inline-size;
  color: var(--ea-ink);
  font-size: 12.5px;
  line-height: 1.45;
}

/* Things to try, above the window */
.rwd-steps-wrap {
  display: flex;
  align-items: stretch;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.rwd-steps {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rwd-steps button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--ink);
  text-align: left;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.rwd-steps button:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-1);
}

.rwd-steps i {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--brand-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.rwd-steps li[data-done] i {
  font-size: 0;
}

.rwd-steps span {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.rwd-steps b {
  font-size: var(--t-sm);
  font-weight: 650;
}

.rwd-steps small {
  color: var(--ink-3);
  font-size: var(--t-xs);
}

.rwd-reset {
  flex: none;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-3);
  font-size: var(--t-xs);
  font-weight: 650;
}

.rwd-reset:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
}

/* The window */
.rwd-win {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 50, 0.12);
  border-radius: 14px;
  background: var(--ea-bg);
  box-shadow:
    0 2px 6px rgba(8, 36, 28, 0.06),
    0 40px 90px -30px rgba(8, 36, 28, 0.38);
}

.rwd-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ea-line);
  background: var(--ea-head);
}

.rwd-dots {
  display: flex;
  gap: 6px;
}

.rwd-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ea-ink) 18%, transparent);
}

.rwd-url {
  margin-inline: auto;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--ea-card);
  color: var(--ea-muted);
  font-size: 11px;
}

.rwd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ea-line);
  background: var(--ea-card);
}

.rwd-title {
  display: grid;
  line-height: 1.25;
}

.rwd-title strong {
  font-size: 14px;
}

.rwd-title small {
  color: var(--ea-muted);
  font-size: 11px;
}

.rwd-status {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ea-blue-soft);
  color: var(--ea-blue-strong);
  font-size: 11px;
  font-weight: 700;
}

.rwd-status[data-state="review"] {
  background: var(--ea-amber-soft);
  color: var(--ea-amber-strong);
}

.rwd-status[data-state="final"] {
  background: var(--ea-green-soft);
  color: var(--ea-green);
}

.rwd-progress {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  max-width: 260px;
}

.rwd-progress span {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--ea-ink) 9%, transparent);
}

.rwd-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ea-bar-green);
  transition: width 500ms var(--ease);
}

.rwd-progress b {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.rwd-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.rwd-btn {
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 8px;
  background: var(--ea-card);
  color: var(--ea-ink);
  font-size: 12px;
  font-weight: 650;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}

.rwd-btn:hover:not(:disabled) {
  border-color: var(--ea-green);
}

.rwd-btn-primary {
  border-color: transparent;
  background: var(--ea-primary);
  color: #fff;
}

.rwd-btn-primary:hover:not(:disabled) {
  border-color: transparent;
  background: color-mix(in srgb, var(--ea-primary) 82%, #000);
}

.rwd-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rwd-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 290px;
  min-height: 480px;
}

/* Left: the outline, with the app's status dots */
.rwd-outline {
  padding: 14px 10px;
  border-right: 1px solid var(--ea-line);
  background: var(--ea-side);
}

.rwd-h {
  padding: 0 8px 6px;
  color: var(--ea-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rwd-outline ul {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rwd-group {
  padding: 10px 8px 3px;
  color: var(--ea-muted);
  font-size: 10.5px;
  font-weight: 700;
}

.rwd-outline button,
.rwd-static {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--ea-ink);
  font-size: 12px;
  text-align: left;
}

.rwd-outline button:hover {
  background: var(--ea-side-deep);
}

.rwd-outline button[aria-current] {
  background: var(--ea-card);
  box-shadow: var(--ea-shadow), inset 0 0 0 1px var(--ea-line);
  font-weight: 650;
}

.rwd-static {
  color: var(--ea-muted);
}

.rwd-dot {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ea-amber);
}

[data-status="facts"] > .rwd-dot,
.rwd-dot[data-status="facts"] {
  background: var(--ea-blue);
}

[data-status="drafted"] > .rwd-dot,
.rwd-dot[data-status="drafted"] {
  background: var(--ea-bar-green);
}

[data-status="reviewed"] > .rwd-dot,
.rwd-dot[data-status="reviewed"] {
  width: 12px;
  height: 12px;
  margin: -1.5px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 8px no-repeat,
    var(--ea-green);
}

.rwd-outline .rwd-legend {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 10px 8px 0;
  border-top: 1px solid var(--ea-line);
  color: var(--ea-muted);
  font-size: 10.5px;
}

.rwd-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rwd-picker {
  display: none;
}

/* Center: the working draft on report paper */
.rwd-editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 18px;
}

.rwd-ed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.rwd-ed-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.rwd-type {
  padding: 2px 9px;
  border: 1px solid var(--ea-line);
  border-radius: 999px;
  background: var(--ea-card);
  color: var(--ea-muted);
  font-size: 10.5px;
}

/* The page is paper in both themes, like the exported report */
.rwd-page {
  position: relative;
  flex: 1;
  padding: 22px 26px;
  border: 1px solid var(--ea-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--ea-shadow);
  color: #1b1b1b;
  font-family: "Times New Roman", Times, Georgia, serif;
  font-size: 14.5px;
  line-height: 1.7;
}

.rwd-page-firm {
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dadada;
  color: #545454;
  font-family: var(--font);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rwd-page p + p {
  margin-top: 10px;
}

.rwd-empty {
  color: #5f5f5f;
  font-family: var(--font);
  font-size: 12.5px;
  font-style: italic;
}

.rwd-fact {
  padding: 0 2px;
  border-radius: 3px;
  background: #dceff6;
  box-shadow: inset 0 -1px 0 #7cb3cf;
  color: #134c62;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.rwd-field {
  display: inline;
  padding: 0 3px;
  border: 0;
  border-radius: 3px;
  background: #fbe7a8;
  box-shadow: inset 0 0 0 1px #dcb447;
  color: #5c4300;
  font: 700 0.8em/1 var(--font);
  letter-spacing: 0.03em;
  vertical-align: 0.06em;
  cursor: pointer;
}

.rwd-field.is-done {
  background: #dcefe8;
  box-shadow: inset 0 -1px 0 #5cb88f;
  color: #0c5639;
  font: inherit;
  letter-spacing: 0;
  vertical-align: baseline;
}

.rwd-field:disabled {
  cursor: default;
}

.rwd-field.is-on {
  outline: 2px solid var(--ea-primary);
  outline-offset: 1px;
}

.rwd-ins {
  padding: 0 2px;
  border-radius: 3px;
  background: #dcefe8;
  box-shadow: inset 0 -1px 0 #5cb88f;
  color: #0c5639;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.rwd-stamp {
  position: absolute;
  top: 14px;
  right: 18px;
  display: grid;
  padding: 5px 12px;
  border: 2px solid #0f6c4b;
  border-radius: 6px;
  color: #0f6c4b;
  font-family: var(--font);
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-4deg);
}

.rwd-stamp b {
  font-size: 13px;
  letter-spacing: 0.08em;
}

.rwd-stamp small {
  font-size: 8.5px;
  letter-spacing: 0.06em;
}

.rwd-ed-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 10px;
}

.rwd-reviewed {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--ea-line);
  border-radius: 8px;
  background: var(--ea-card);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.rwd-reviewed input {
  margin: 0;
  accent-color: var(--ea-green);
}

.rwd-reviewed:has(input:disabled) {
  color: var(--ea-muted);
  cursor: not-allowed;
}

.rwd-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: var(--ea-muted);
  font-size: 10.5px;
}

.rwd-key .rwd-fact,
.rwd-key .rwd-field,
.rwd-key .rwd-ins {
  font: 700 10px/1.5 var(--font);
  letter-spacing: 0;
  vertical-align: baseline;
  cursor: default;
}

.rwd-key .rwd-fact:not(:first-child),
.rwd-key .rwd-field,
.rwd-key .rwd-ins {
  margin-left: 6px;
}

/* Right: assistance tabs */
.rwd-assist {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--ea-line);
  background: var(--ea-card);
}

.rwd-tabs {
  display: flex;
  border-bottom: 1px solid var(--ea-line);
}

.rwd-tab {
  flex: 1;
  padding: 10px 6px;
  border-bottom: 2px solid transparent;
  color: var(--ea-muted);
  font-size: 11.5px;
  font-weight: 700;
}

.rwd-tab[aria-selected="true"] {
  border-bottom-color: var(--ea-primary);
  color: var(--ea-ink);
}

.rwd-panel {
  padding: 14px;
  overflow: auto;
}

.rwd-note {
  margin-bottom: 10px;
  color: var(--ea-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.rwd-df-h {
  margin-bottom: 8px;
  color: var(--ea-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rwd-df-h b {
  color: var(--ea-ink);
}

.rwd-df-label {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 700;
}

.rwd textarea,
.rwd input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 8px;
  background: var(--ea-bg);
  color: var(--ea-ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  resize: vertical;
}

.rwd textarea:focus,
.rwd input[type="text"]:focus {
  border-color: var(--ea-primary);
  outline: 2px solid color-mix(in srgb, var(--ea-primary) 30%, transparent);
  outline-offset: 0;
}

.rwd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.rwd-df-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rwd-df-list button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 8px;
  color: var(--ea-ink);
  text-align: left;
}

.rwd-df-list button:hover:not(:disabled) {
  border-color: var(--ea-green);
}

.rwd-df-list small {
  grid-column: 2;
  overflow: hidden;
  color: var(--ea-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rwd-facts {
  display: grid;
  margin: 0;
}

.rwd-facts > div {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid var(--ea-line);
}

.rwd-facts dt {
  color: var(--ea-muted);
  font-size: 10.5px;
  font-weight: 700;
}

.rwd-facts dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0;
}

.rwd-facts dd small {
  flex-basis: 100%;
  color: var(--ea-muted);
  font-size: 10.5px;
}

.rwd-facts .is-editing dd {
  display: grid;
  gap: 6px;
}

.rwd-facts .is-editing .rwd-row {
  margin-top: 0;
}

.rwd-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ea-primary);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

:root[data-theme="dark"] .rwd-link {
  color: var(--ea-green);
}

.rwd-lang {
  padding: 10px 12px;
  border: 1px solid var(--ea-line);
  border-radius: 10px;
  background: var(--ea-bg);
}

.rwd-lang + .rwd-lang {
  margin-top: 8px;
}

.rwd-lang.is-used {
  border-color: color-mix(in srgb, var(--ea-green) 45%, var(--ea-line));
}

.rwd-lang small {
  color: var(--ea-muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rwd-lang strong {
  display: block;
  font-size: 12.5px;
}

.rwd-lang p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

/* Dialogs and the toast sit inside the window */
.rwd-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 42, 50, 0.34);
}

.rwd-overlay[hidden] {
  display: none;
}

.rwd-dialog {
  width: min(450px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 16px 18px 18px;
  border: 1px solid var(--ea-line);
  border-radius: 12px;
  background: var(--ea-card);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: no-preference) {
  .rwd-dialog {
    animation: rwd-pop 220ms var(--ease);
  }
}

.rwd-dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rwd-dlg-head h5 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.rwd-dlg-head h5:focus {
  outline: none;
}

.rwd-x {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ea-muted);
  font-size: 20px;
  line-height: 1;
}

.rwd-x:hover {
  background: var(--ea-bg);
  color: var(--ea-ink);
}

.rwd-files {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.rwd-files li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--ea-line);
  border-radius: 8px;
  opacity: 0.45;
  transition: opacity 260ms var(--ease);
}

.rwd-files li.is-ready {
  opacity: 1;
}

.rwd-files span {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.rwd-files b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rwd-files small {
  color: var(--ea-muted);
  font-size: 10.5px;
}

.rwd-files .ei {
  width: 20px;
  height: 20px;
  color: var(--ea-muted);
}

.rwd-tick {
  width: 16px;
  height: 16px;
  border: 2px solid var(--ea-line);
  border-radius: 50%;
}

.rwd-files li.is-ready .rwd-tick {
  border-color: var(--ea-green);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat,
    var(--ea-green);
}

.rwd-dlg-foot {
  justify-content: flex-end;
  margin-top: 14px;
}

.rwd-toast {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 6;
  width: max-content;
  max-width: min(560px, calc(100% - 28px));
  padding: 10px 14px;
  border-radius: 10px;
  background: #102a32;
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.45);
  color: #edf7f5;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  transform: translateX(-50%);
}

.rwd-toast[hidden] {
  display: none;
}

.rwd-done {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  background: var(--bg-inverse);
  color: var(--ink-inverse);
  font-size: var(--t-sm);
}

.rwd.is-complete .rwd-done {
  display: flex;
}

.rwd-done .btn-primary {
  background: var(--ink-inverse);
  color: var(--bg-inverse);
}

@media (prefers-reduced-motion: no-preference) {
  .rwd-toast.is-in {
    animation: rwd-toast-in 260ms var(--ease);
  }

  .is-flash {
    animation: rwd-flash 1.3s var(--ease);
  }

  .is-cue {
    animation: rwd-cue 1.5s var(--ease);
  }
}

@keyframes rwd-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes rwd-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

@keyframes rwd-flash {
  0%,
  30% {
    box-shadow: 0 0 0 3px rgba(17, 107, 90, 0.45);
  }
}

@keyframes rwd-cue {
  0%,
  60% {
    box-shadow: 0 0 0 4px rgba(223, 164, 56, 0.6);
  }
}

/* Narrower windows: the outline becomes a section picker, then everything stacks */
@container rwd (max-width: 1080px) {
  .rwd-body {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .rwd-outline {
    display: none;
  }

  .rwd-picker {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ea-line);
    background: var(--ea-side);
  }

  .rwd-picker label {
    color: var(--ea-muted);
    font-size: 11px;
    font-weight: 700;
  }

  .rwd-picker select {
    flex: 1;
    min-width: 0;
    max-width: 340px;
    padding: 6px 8px;
    border: 1px solid var(--ea-line);
    border-radius: 8px;
    background: var(--ea-card);
    color: var(--ea-ink);
    font: inherit;
    font-size: 12.5px;
  }

  .rwd-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container rwd (max-width: 760px) {
  .rwd-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .rwd-assist {
    border-top: 1px solid var(--ea-line);
    border-left: 0;
  }

  .rwd-progress {
    order: 5;
    flex-basis: 100%;
    max-width: none;
  }

  .rwd-page {
    padding: 16px;
    font-size: 13.5px;
  }

  .rwd-steps-wrap {
    flex-direction: column;
  }

  .rwd-reset {
    align-self: flex-end;
    padding-block: 6px;
  }
}

@container rwd (max-width: 480px) {
  .rwd-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .rwd-actions {
    width: 100%;
  }

  .rwd-actions .rwd-btn {
    flex: 1;
  }

  .rwd-editor {
    padding: 12px;
  }
}
