/* Use-case samples. Built on the www tokens in site.css: pill controls, 12px fields,
   22px panels, accent green for selection, one console-like frame per sample. */
.uc-demo { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--panel); color: var(--ink); }
.uc-demo[hidden] { display: none; }
.uc-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.uc-bar strong { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.uc-tag { font-size: 12px; color: var(--green); background: var(--tint); padding: 4px 9px; border-radius: var(--r-chip); white-space: nowrap; }
.uc-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--wash); }
.uc-body { padding: 22px; }
#main .uc-foot { margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 13px !important; line-height: 1.55; color: var(--muted); }
.uc-split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.uc-panel { display: grid; gap: 12px; min-width: 0; }
.uc-panel h5 { margin: 6px 0 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.uc-panel h5:first-child { margin-top: 0; }
/* #main outranks the page's section-wide reading sizes. */
#main .uc-demo p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
#main .uc-demo .uc-meta { font-size: 13px; color: var(--muted); }

/* Segmented choices, like the homepage modality tabs. */
.uc-choices { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--bg); }
.uc-choices button { border: 0; border-radius: var(--r-chip); background: transparent; color: var(--muted); font-size: 14px; padding: 10px 16px; min-height: 42px; }
.uc-choices button + button { border-left: 1px solid var(--line); }
.uc-choices button[aria-pressed=true] { background: var(--green); color: #fff; }

/* Selectable rows: tickets, questions. */
.uc-list { display: grid; gap: 8px; }
.uc-ticket { display: grid; gap: 6px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-field); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.45; }
.uc-ticket small { font-size: 12px; color: var(--muted); }
.uc-ticket[aria-pressed=true] { border-color: var(--green); background: var(--tint); box-shadow: inset 3px 0 0 var(--green); }
.uc-ticket[aria-pressed=true] .uc-pill:not(.warn) { background: var(--bg); }
.uc-pill { justify-self: start; font-style: normal; font-size: 12px; padding: 3px 8px; border-radius: var(--r-chip); background: var(--tint); color: var(--green); white-space: nowrap; }
.uc-pill.warn { background: #f7efe1; color: #8a5a12; }

.uc-route { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; background: var(--wash); border-left: 3px solid var(--green); }
.uc-route.warn { border-left-color: #b7791f; }
.uc-route b { font-size: 15px; }
.uc-route span:not(.uc-dot) { grid-column: 2; font-size: 13px; color: var(--muted); }
.uc-sources, .uc-quotes, .uc-checks, .uc-legend, .uc-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.uc-sources li { font-size: 14px !important; line-height: 1.5; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-field); color: var(--ink); }
.uc-quotes li { font-size: 15px !important; line-height: 1.55; padding-left: 14px; border-left: 2px solid var(--line); color: var(--ink); }
.uc-checks li { display: flex; align-items: center; gap: 10px; font-size: 14px !important; line-height: 1.5; color: var(--ink); }
#main .uc-demo .uc-draft { color: var(--ink); background: var(--wash); padding: 14px 16px; }
.uc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.uc-primary, .uc-ghost { font-size: 14px; min-height: 42px; padding: 10px 18px; border-radius: var(--r-chip); border: 1px solid var(--green); }
.uc-primary { background: var(--green); color: #fff; }
.uc-ghost { background: transparent; color: var(--green); border-color: var(--line); }
.uc-primary:disabled { opacity: .45; cursor: default; }
#main .uc-status { display: flex; align-items: flex-start; gap: 10px; font-size: 14px !important; color: var(--ink) !important; }
.uc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--line); }
.uc-route .uc-dot { margin-top: 0; }
.uc-dot.ok { background: #2f8a5c; }
.uc-dot.warn { background: #c4841d; }
.uc-dot.wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

/* Bars and meters. */
.uc-bars { display: grid; gap: 6px; }
.uc-bars button { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 32px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--r-chip); background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.uc-bars button[aria-pressed=true] { border-color: var(--green); background: var(--tint); }
.uc-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.uc-bar-track { display: block; height: 8px; background: var(--wash); }
.uc-bar-fill { display: block; height: 100%; background: #c4841d; transition: width var(--motion-panel, 320ms) var(--ease-out, ease); }
.uc-bar-fill.ok { background: var(--green); }
.uc-meter { height: 10px; background: var(--wash); border: 1px solid var(--line); }
.uc-meter i { display: block; height: 100%; background: var(--green); transition: width var(--motion-panel, 320ms) var(--ease-out, ease); }
.uc-meter.near i { background: #b7791f; }
.uc-meter.over i { background: #b4532a; }
.uc-legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; font-size: 14px !important; color: var(--ink); }
.uc-legend b { font-variant-numeric: tabular-nums; font-weight: 600; }
.uc-swatch { width: 12px; height: 12px; }
.uc-swatch.a { background: var(--green); }
.uc-swatch.b { background: #6ea488; }
.uc-swatch.c { background: #c4841d; }
.uc-feed li { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-field); font-size: 14px !important; color: var(--ink); }
.uc-range { display: grid; grid-template-columns: auto minmax(160px, 1fr) auto; align-items: center; gap: 14px; font-size: 14px; color: var(--ink); min-width: min(100%, 420px); flex: 1; }
.uc-range input { accent-color: var(--green); width: 100%; padding: 0; height: 30px; border: 0; background: transparent; }
.uc-range output { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }

/* Code, tables, listings, ads. */
.uc-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.uc-steps li { font-size: 15px !important; line-height: 1.55; color: var(--ink); }
.uc-code { margin: 0; padding: 14px 0; background: #0b2119; color: #d8e3dc; border-radius: var(--r-field); overflow-x: auto; font: 13px/1.7 Consolas, "SF Mono", Menlo, monospace; }
.uc-code span { display: block; padding: 0 16px; white-space: pre; }
.uc-code .add { background: #1d4a35; color: #e6f4ea; }
.uc-code .del { background: #4a2620; color: #f5d9d2; }
.uc-gate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.uc-gate > span { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); }
.uc-table-wrap { overflow-x: auto; }
.uc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.uc-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.uc-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px !important; color: var(--ink); }
.uc-table code { font: 12px/1.5 Consolas, "SF Mono", Menlo, monospace; color: var(--muted); }
.uc-table td small { display: flex; gap: 8px; margin-top: 6px; font-size: 12px !important; color: #8a5a12; }
.uc-table tr.flag td { background: #fbf6ec; }
.uc-blank { display: block; height: 10px; width: 70%; background: var(--wash); }
.uc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.uc-check input { width: 16px; height: 16px; accent-color: var(--green); }
.uc-facts img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
.uc-listing { padding: 16px; border: 1px solid var(--line); background: var(--bg); }
.uc-listing h5 { font-size: 17px; line-height: 1.4; }
.uc-listing ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.uc-listing li { font-size: 15px !important; color: var(--ink); }
.uc-stage { place-items: center; background: var(--wash); padding: 18px; min-height: 320px; }
.uc-ad { position: relative; margin: 0; overflow: hidden; background: #0b2119; width: 100%; max-width: 340px; aspect-ratio: 1 / 1; transition: max-width var(--motion-panel, 320ms) var(--ease-out, ease); }
.uc-ad.story { aspect-ratio: 9 / 16; max-width: 200px; }
.uc-ad img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uc-ad figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 10px; padding: 16px; background: linear-gradient(transparent, #0b2119e6 45%); color: #fff; }
.uc-ad figcaption b { font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.uc-ad.story figcaption b { font-size: 15px; }
.uc-ad figcaption span { justify-self: start; font-size: 12px; padding: 6px 10px; background: #fff; color: #0b2119; }
.uc-search { width: 100%; max-width: 420px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 6px; }
.uc-search small { font-size: 12px; color: var(--muted); }
.uc-search b { font-size: 17px; color: #1a4fb5; font-weight: 500; line-height: 1.35; }

/* The scenario switch sits where Product content has its own. */
.uc-views { margin-top: 28px; }

/* More use cases: list on the left, the selected case and its sample on the right. */
@media (hover: hover) and (pointer: fine) {
  .uc-ticket:hover, .uc-bars button:hover { border-color: #8aa998; }
}
.uc-case-view[hidden] { display: none; }
.uc-case-view .case { border: 0; padding: 0; margin: 0; background: transparent; }
.uc-case-view .case h4 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.2; margin: 0 0 12px; }
.uc-case-view .uc-demo { margin-top: 26px; }

.uc-ticket, .uc-bars button, .uc-choices button, .uc-primary, .uc-ghost {
  transition: color var(--motion-fast, 180ms) ease, background-color var(--motion-fast, 180ms) ease,
    border-color var(--motion-fast, 180ms) ease, box-shadow var(--motion-fast, 180ms) ease, transform 240ms var(--ease-out, ease);
}
@media (hover: hover) and (pointer: fine) {
  .uc-primary:not(:disabled):hover { background: #164a36; border-color: #164a36; transform: translateY(-2px); box-shadow: 0 5px 14px #10231c14; }
  .uc-ghost:hover { background: var(--tint); border-color: var(--green); }
}
.uc-primary:not(:disabled):active { transform: translateY(0) scale(.985); }
@media (max-width: 767px) {
  .uc-split { grid-template-columns: 1fr; }
  .uc-bar, .uc-controls, .uc-body, .uc-foot { padding-inline: 16px; }
  .uc-controls { gap: 12px; }
  .uc-choices { display: flex; width: 100%; }
  .uc-choices button { flex: 1 1 auto; padding: 10px 12px; font-size: 13px; }
  .uc-range { grid-template-columns: 1fr auto; min-width: 100%; }
  .uc-range input { grid-column: 1 / -1; grid-row: 2; }
  .uc-case-view .case h4 { font-size: 22px; }
  .uc-stage { min-height: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  .uc-bar-fill, .uc-meter i, .uc-ad { transition: none !important; }
}
