/* Copyright (c) A|iens. All rights reserved.
 * [HEADER] Cloud Trace Explorer · 1.0.0 · A'nil Cyborg
 * Native evidence workspace and timestamp-scaled SVG timeline.
 * Requires shared Cloud tokens. Preserves existing identity and 3D assets.
 */
.trace-screen, .trace-screen section, .trace-review, .trace-form { min-width: 0; }
.trace-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.trace-heading > div { min-width: 0; }
.trace-heading h2 { margin: 0 0 7px; }
.trace-heading p, .trace-muted { color: var(--muted); line-height: 1.6; }
.trace-heading p { margin: 0; }
.trace-notice { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--muted); line-height: 1.5; }
.trace-notice strong { color: var(--text); }
.trace-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.trace-wide { grid-column: 1 / -1; }
.trace-fields .field, .trace-fields input, .trace-fields select, .trace-fields textarea, .trace-filter .field, .trace-filter input, .trace-filter select { min-width: 0; max-width: 100%; }
.trace-fields textarea { width: 100%; resize: vertical; }
.trace-fields textarea[name="json"] { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; min-height: 240px; }
.trace-fields input[type="file"] { width: 100%; overflow: hidden; }
.trace-check { display: flex; align-items: flex-start; gap: 9px; line-height: 1.6; }
.trace-check input { flex: 0 0 auto; margin-top: 5px; }
.trace-form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 10px; }
.trace-form-error, .trace-review-error { color: var(--danger, #b42338); white-space: pre-wrap; overflow-wrap: anywhere; }
.trace-filter { display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 12px; align-items: end; margin: 18px 0; }
.trace-inventory-filter { grid-template-columns: minmax(140px,1fr) minmax(160px,1.3fr) minmax(120px,.65fr) auto; }
.trace-link { color: var(--accent); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.trace-link:hover { text-decoration: underline; }
.trace-link:focus-visible, .trace-screen summary:focus-visible, .trace-timeline-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.trace-muted { display: block; margin-top: 5px; white-space: normal; overflow-wrap: anywhere; }
.trace-value { margin: 0; max-width: 100%; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font: inherit; line-height: 1.55; }
.trace-format pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.trace-screen td, .trace-review td { white-space: normal; overflow-wrap: anywhere; }
.trace-screen .btn, .trace-form .btn, .trace-review .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.trace-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 18px 0; }
.trace-stats > div { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.trace-stats span { color: var(--muted); }
.trace-stats strong { color: var(--text); font-size: 1.4rem; overflow-wrap: anywhere; }
.trace-next { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 18px 0; }
.trace-warnings { margin: 18px 0; padding: 12px 16px; border: 1px solid var(--border); border-left: 4px solid var(--warning, #a86a00); border-radius: 10px; background: var(--surface); line-height: 1.6; overflow-wrap: anywhere; }
.trace-warnings summary { font-weight: 600; cursor: pointer; }
.trace-warnings li + li { margin-top: 8px; }
.trace-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.trace-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.trace-status-error { color: var(--danger, #b42338); }
.trace-status-ok { color: var(--good, #187748); }
.trace-status-unset { color: var(--muted); }
.trace-timeline-scroll { overflow: auto; max-width: 100%; max-height: 640px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.trace-timeline { display: block; width: 100%; min-width: 760px; font-family: inherit; }
.trace-gridline { stroke: var(--border); stroke-width: 1; }
.trace-tick, .trace-span-service { fill: var(--muted); font-size: 11px; }
.trace-span-name { fill: var(--text); font-size: 12px; }
.trace-timeline-row { fill: transparent; }
.trace-timeline a:hover .trace-timeline-row, .trace-timeline-row.is-selected { fill: var(--primary-tint); }
.trace-timeline a:focus { outline: none; }
.trace-timeline a:focus-visible .trace-timeline-row { stroke: var(--accent); stroke-width: 2; fill: var(--primary-tint); }
.trace-bar-error { fill: var(--danger, #b42338); }
.trace-bar-ok { fill: var(--good, #187748); }
.trace-bar-unset { fill: var(--muted); }
.trace-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; color: var(--muted); line-height: 1.5; }
.trace-screen details > summary, .trace-form details > summary, .trace-review details > summary { cursor: pointer; line-height: 1.6; }
.trace-screen h2, .trace-screen p, .trace-format p { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .trace-inventory-filter, .trace-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .trace-heading { flex-direction: column; align-items: stretch; }
  .trace-fields, .trace-filter, .trace-stats { grid-template-columns: minmax(0,1fr); }
  .trace-wide { grid-column: auto; }
  .trace-form-actions > .btn { flex: 1 1 auto; }
  .trace-notice { align-items: flex-start; flex-direction: column; }
}
/* [FOOTER] v1.0.0 · Wide timeline scrolls within its region; text and controls reflow independently. */
