@layer components {
  /* brand mark */
  .wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none; font: 600 22px/1 var(--font-wordmark); letter-spacing: -0.01em; }
  .wordmark-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-mark); flex: none; }
  .wordmark-sub { display: block; margin-top: 4px; font: 500 12px/1.2 var(--font-ui); color: var(--color-text-muted); letter-spacing: .02em; }
  [data-brand="ithenticate"] .wordmark-dot { display: none; }
  .wordmark-check { width: 22px; height: 22px; color: var(--color-brand); }

  /* buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-h); padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-control); font: 600 var(--text-md)/1 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
  .btn:active:not(:disabled) { transform: translateY(1px); }
  .btn-primary { background: var(--color-action); color: var(--color-on-action); }
  .btn-primary:hover { background: var(--color-action-hover); }
  .btn-secondary { background: var(--color-surface); border-color: var(--color-line-strong); color: var(--color-text); }
  .btn-secondary:hover { border-color: var(--color-text); }
  .btn-ghost { background: transparent; color: var(--color-text-muted); }
  .btn-ghost:hover { background: var(--color-hover); color: var(--color-text); }
  .btn-danger { background: var(--color-surface); border-color: color-mix(in srgb, var(--status-danger) 55%, transparent); color: var(--status-danger); }
  .btn-danger:hover { border-color: var(--status-danger); background: var(--status-danger-bg); }
  .btn-danger-solid { background: var(--status-danger); color: var(--color-on-danger); }
  .btn:disabled, .btn[aria-disabled="true"] { background: var(--color-sunken); border-color: transparent; color: var(--color-text-muted); cursor: not-allowed; transform: none; }
  .btn-lg { min-height: 50px; font-size: var(--text-base); padding: 0 20px; }
  .btn-sm { min-height: 32px; padding: 0 12px; font-size: var(--text-sm); }
  .btn-block { width: 100%; }
  .btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
  .btn.is-loading { cursor: progress; }
  .icon-btn { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--color-text-muted); cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast); }
  .icon-btn:hover:where(:not(:disabled)) { background: var(--color-hover); color: var(--color-text); }
  .icon-btn:disabled { background: var(--color-sunken); color: var(--color-text-muted); cursor: not-allowed; }
  .icon-btn.danger:hover:where(:not(:disabled)) { color: var(--status-danger); background: var(--status-danger-bg); }
  @media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } }
  .icon.is-spinning { animation: spin 1.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* status chip (from C, softened) */
  .status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 6px; border-radius: var(--radius-chip); font: 600 var(--text-sm)/1 var(--font-ui); white-space: nowrap; }
  .status .icon { width: 14px; height: 14px; stroke-width: 2; }
  .status--success { color: var(--status-success); background: var(--status-success-bg); }
  .status--progress { color: var(--status-progress); background: var(--status-progress-bg); }
  .status--progress .icon { animation: spin 1.8s linear infinite; }
  .status--danger { color: var(--status-danger); background: var(--status-danger-bg); }
  .status--neutral { color: var(--status-neutral); background: var(--status-neutral-bg); }

  /* tag (report types, enabled/disabled) */
  .tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border: 1px solid var(--color-line); border-radius: var(--radius-chip); font-size: var(--text-xs); font-weight: 600; color: var(--color-text); background: var(--color-surface); }
  .tag.off { color: var(--color-text-muted); background: transparent; border-style: dashed; text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 50%, transparent); }

  /* id slip (from B, quieter) */
  .slip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--color-line); border-radius: var(--radius-chip); background: var(--color-sunken); font: 500 12.5px/1 var(--font-mono); color: var(--color-text); vertical-align: middle; }
  .slip-value { padding: 5px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .01em; }
  .slip-copy { display: grid; place-items: center; width: 26px; border: 0; border-left: 1px dashed var(--color-line-strong); background: none; color: var(--color-text-muted); cursor: pointer; border-radius: 0 var(--radius-chip) var(--radius-chip) 0; }
  .slip-copy:hover { color: var(--color-text); background: var(--color-hover); }
  .slip-copy .icon { width: 13px; height: 13px; }
  .slip.is-copied .slip-copy { color: var(--status-success); }
  .copied-note { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: var(--text-xs); color: var(--status-success); }
  @media (pointer: coarse) { .slip-copy { width: 40px; } }

  /* segmented (current track + thumb, refined) */
  .seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border: 1px solid var(--color-line); border-radius: var(--radius-control); background: var(--color-sunken); }
  .seg-btn { position: relative; z-index: 1; min-height: 40px; padding: 0 16px; border: 0; border-radius: calc(var(--radius-control) - 2px); background: transparent; color: var(--color-text-muted); font-weight: 500; cursor: pointer; transition: color var(--dur) var(--ease); }
  .seg-btn[aria-pressed="true"] { color: var(--color-text); font-weight: 600; }
  .seg-thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: calc(var(--radius-control) - 2px); background: var(--color-surface); box-shadow: var(--shadow-segment); transform: translateX(calc(100% * var(--i, 0))); transition: transform var(--dur-slow) var(--ease); }

  /* tabs & nav: current = 2px vermilion rule */
  .tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--color-line); }
  .tab { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--color-text-muted); text-decoration: none; font-size: var(--text-md); }
  .tab:hover { color: var(--color-text); }
  .tab[aria-current] { color: var(--color-text); font-weight: 600; }
  .tab[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--color-brand); }
  .tab .count { font: 600 12px/1 var(--font-ui); color: var(--color-text-muted); padding: 3px 6px; border-radius: 10px; background: var(--color-sunken); }

  /* fields */
  .field { display: grid; gap: 6px; margin-bottom: 18px; }
  .label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
  .req { color: var(--color-brand); margin-left: 2px; }
  .hint { font-size: var(--text-sm); color: var(--color-text-muted); }
  .input, .select { width: 100%; min-height: var(--control-h); padding: 0 12px; border: 1px solid var(--color-line-strong); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
  .input::placeholder { color: var(--color-text-muted); opacity: 1; }
  .input.mono::placeholder { font-family: var(--font-ui); letter-spacing: 0; }
  .input:hover, .select:hover { border-color: var(--control-border-hover); }
  .input:focus, .select:focus { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 1px var(--color-focus); }
  .input.is-invalid { border-color: var(--status-danger); box-shadow: 0 0 0 1px var(--status-danger); }
  .select { appearance: none; padding-right: 34px; background-image: var(--select-chevron); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
  .field-error { display: flex; gap: 6px; align-items: flex-start; padding-left: 10px; border-left: 2px solid var(--status-danger); color: var(--status-danger); font-size: var(--text-sm); line-height: 1.5; animation: rise var(--dur) var(--ease); }
  .field-error .icon { margin-top: 2px; }
  .error-summary { display: grid; gap: 4px; margin-bottom: 20px; padding: 12px 14px; border-left: 2px solid var(--status-danger); background: var(--status-danger-bg); border-radius: 0 var(--radius-control) var(--radius-control) 0; font-size: var(--text-sm); }
  .error-summary b { color: var(--status-danger); }
  .error-summary a { color: var(--status-danger); text-underline-offset: 3px; }
  .check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: var(--text-md); cursor: pointer; }
  .check input { width: 16px; height: 16px; accent-color: var(--color-action); }

  /* upload */
  .dropzone { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; gap: 4px; padding: 26px 20px; border: 1px dashed var(--color-line-strong); border-radius: var(--radius-control); background: var(--color-sunken); text-align: center; cursor: pointer; transition: border-color var(--dur-fast), background-color var(--dur-fast); }
  .dropzone:hover { border-color: var(--color-text); }
  .dropzone.is-dragover { border-style: solid; border-color: var(--color-text); background: var(--color-hover); }
  .dropzone .dz-icon { width: 28px; height: 28px; color: var(--color-text-muted); margin-bottom: 6px; }
  .dropzone .dz-title { font-weight: 600; font-size: var(--text-base); }
  .dropzone .dz-sub { font-size: var(--text-sm); color: var(--color-text-muted); }
  .file-chip { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 14px; border: 1px solid var(--color-line); border-radius: var(--radius-control); background: var(--color-surface); animation: rise var(--dur) var(--ease); }
  [data-upload-dropzone][hidden], [data-upload-file][hidden], [data-upload-progress][hidden] { display: none; }
  .file-chip.is-dragover { border-color: var(--color-text); background: var(--color-hover); }
  .dropzone.is-invalid, .file-chip.is-invalid { border-color: var(--status-danger); }
  .file-chip .fi { display: grid; place-items: center; width: 34px; height: 42px; border: 1px solid var(--color-line); border-radius: 3px; color: var(--color-text-muted); background: var(--color-sunken); flex: none; }
  .file-chip .meta { flex: 1; min-width: 0; }
  .file-chip .name { font-weight: 600; font-size: var(--text-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .file-chip .size { display: flex; gap: 10px; margin-top: 2px; font-size: var(--text-xs); color: var(--color-text-muted); }
  .file-chip .size .ok { color: var(--status-success); display: inline-flex; align-items: center; gap: 3px; }
  .progress { height: 2px; margin-top: 8px; background: var(--color-line); border-radius: 1px; overflow: hidden; }
  .progress > span { display: block; height: 100%; width: var(--v, 0%); background: var(--color-text); transition: width var(--dur-slow) var(--ease); }
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

  /* note */
  .note { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
  .note .icon { margin-top: 2px; }
  .note strong { color: var(--color-text); }

  /* disclosure */
  .disclosure { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; border-top: 1px solid var(--color-line); background: none; color: var(--color-text-muted); font-size: var(--text-md); cursor: pointer; text-align: left; }
  .disclosure:hover { color: var(--color-text); }
  .disclosure .chev { margin-left: auto; transition: transform var(--dur) var(--ease); }
  .disclosure[aria-expanded="true"] .chev { transform: rotate(180deg); }

  /* menu (preferences) */
  .prefs { display: inline-flex; gap: 4px; }
  .pref-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-text-muted); font-size: var(--text-sm); cursor: pointer; }
  .pref-btn:hover, .pref-btn[aria-expanded="true"] { color: var(--color-text); background: var(--color-surface); border-color: var(--color-line); }
  @media (pointer: coarse) { .pref-btn { min-height: 44px; min-width: 44px; justify-content: center; } }
  .menu { position: absolute; z-index: 20; min-width: 168px; padding: 4px; border-radius: var(--radius-surface); background: var(--color-surface); box-shadow: var(--shadow-float); animation: pop var(--dur-fast) var(--ease); }
  .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius-chip); background: none; color: var(--color-text); font-size: var(--text-md); text-align: left; cursor: pointer; }
  .menu-item:hover { background: var(--color-hover); }
  .menu-item .tick { margin-left: auto; color: var(--color-text); visibility: hidden; }
  .menu-item[aria-checked="true"] { font-weight: 600; }
  .menu-item[aria-checked="true"] .tick { visibility: visible; }
  .menu-sep { height: 1px; margin: 4px 6px; background: var(--color-line); }
  @keyframes pop { from { opacity: 0; transform: translateY(-2px) scale(.98); } to { opacity: 1; transform: none; } }

  /* stat strip (from B) */
  .stat-strip { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border: 1px solid var(--color-line); border-radius: var(--radius-surface); background: var(--color-surface); }
  .stat { display: grid; align-content: start; gap: 6px; padding: 14px 18px 16px; border-left: 1px solid var(--color-line); color: inherit; text-decoration: none; }
  .stat:first-child { border-left: 0; }
  a.stat:hover { background: color-mix(in srgb, var(--color-hover) 55%, transparent); }
  .stat-label { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--color-text-muted); }
  .stat-value { font: 600 28px/1.1 var(--font-display); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.01em; }
  .stat-value.is-attn { color: var(--color-brand); }
  .stat-foot { display: grid; gap: 2px; font-size: var(--text-xs); color: var(--color-text-muted); }
  .stat-foot .row { display: flex; justify-content: space-between; gap: 8px; }
  .delta { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--color-text); }
  .delta.better { color: var(--status-success); }
  .delta.worse { color: var(--status-danger); }
  .stat-link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); color: var(--color-text-muted); }
  a.stat:hover .stat-link { color: var(--color-text); }
  .live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--color-text-muted); }
  .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--status-success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-success) 50%, transparent); animation: pulse 2s var(--ease) infinite; }
  @keyframes pulse { 70% { box-shadow: 0 0 0 5px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

  /* panel */
  .panel { position: relative; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-surface); }
  .panel + .panel { margin-top: 20px; }
  .panel-head { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; border-bottom: 1px solid var(--color-line); }
  .panel-head .text { flex: 1; min-width: 0; }
  .panel-title { font: 600 var(--text-lg)/1.3 var(--font-display); }
  .panel-desc { margin-top: 2px; font-size: var(--text-sm); color: var(--color-text-muted); }
  .panel-body { padding: 16px 18px; }
  .panel-foot { padding: 10px 18px 12px; border-top: 1px solid var(--color-line); font-size: var(--text-sm); color: var(--color-text-muted); }
  .region-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; overflow: hidden; border-radius: var(--radius-surface) var(--radius-surface) 0 0; }
  .region-progress::after { content: ""; position: absolute; inset: 0; width: 30%; background: var(--color-text); animation: slide 1.1s var(--ease) infinite; }
  @keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

  /* toolbar / filters */
  .filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; }
  .filters .search { position: relative; flex: 1 1 260px; max-width: 340px; }
  .filters .search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); }
  .filters .search .input { padding-left: 36px; }
  .filters .select { width: auto; min-width: 116px; }
  .filter-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--color-text-muted); }
  .filters .end { margin-left: auto; font-size: var(--text-xs); color: var(--color-text-muted); }

  /* bulk bar (from B) */
  .bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 18px 12px; padding: 6px 6px 6px 14px; border-radius: var(--radius-control); background: var(--color-action); color: var(--color-on-action); font-size: var(--text-sm); animation: rise var(--dur) var(--ease); }
  .bulkbar b { margin-right: 6px; }
  .bulkbar .btn { min-height: 30px; font-size: var(--text-sm); background: transparent; color: inherit; border-color: color-mix(in srgb, var(--color-on-action) 28%, transparent); }
  .bulkbar .btn:hover { background: color-mix(in srgb, var(--color-on-action) 12%, transparent); }
  .bulkbar .btn.danger { color: var(--on-action-danger); border-color: color-mix(in srgb, var(--on-action-danger) 50%, transparent); }
  [data-theme="dark"] .bulkbar .btn.danger { color: var(--on-action-danger); border-color: color-mix(in srgb, var(--on-action-danger) 45%, transparent); }
  .bulkbar .spacer { flex: 1; }

  /* table */
  .table-wrap { overflow-x: auto; }
  .table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-md); }
  .table th { position: sticky; top: 0; z-index: 1; padding: 9px 12px; background: var(--color-surface); border-bottom: 1px solid var(--color-line-strong); color: var(--color-text-muted); font-size: var(--text-sm); font-weight: 600; text-align: left; white-space: nowrap; }
  .table td { padding: 11px 12px; border-bottom: 1px solid var(--color-line); vertical-align: top; }
  .table tr:last-child td { border-bottom: 0; }
  .table td:first-child, .table th:first-child { padding-left: 18px; }
  .table td:last-child, .table th:last-child { padding-right: 18px; }
  .table .right { text-align: right; }
  .table .nowrap { white-space: nowrap; }
  .table tbody tr { transition: background-color var(--dur-fast); }
  .table tbody tr:hover { background: color-mix(in srgb, var(--color-hover) 50%, transparent); }
  .table tbody tr.is-selected { background: var(--color-sunken); }
  .table tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--color-text); }
  .table .sel { width: 40px; padding-right: 0; }
  .table input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--color-action); }
  .table .row-title { display: block; max-width: 44ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--color-text); text-decoration: none; }
  .table .row-title:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--color-line-strong); }
  .table .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; font-size: var(--text-xs); color: var(--color-text-muted); }
  .table .issue { margin-top: 5px; max-width: 30ch; font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; }
  .table .time { font: 400 12.5px/1.4 var(--font-mono); color: var(--color-text-muted); white-space: nowrap; }
  .table .dur { font: 500 12.5px/1.4 var(--font-mono); white-space: nowrap; }
  .table .actions { display: flex; gap: 2px; justify-content: flex-end; }
  .table.compact td { padding-top: 9px; padding-bottom: 9px; }
  .table.dense th, .table.dense td { padding-left: 9px; padding-right: 9px; }
  .table.dense td:first-child, .table.dense th:first-child { padding-left: 16px; }
  .table.dense td:last-child, .table.dense th:last-child { padding-right: 16px; }
  .reports { display: grid; grid-template-columns: auto auto; column-gap: 12px; row-gap: 4px; align-items: center; font-size: var(--text-sm); }
  .score { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--text-md)/1 var(--font-display); font-variant-numeric: tabular-nums; }
  .score-rule { position: relative; width: 40px; height: 2px; border-radius: 1px; background: var(--color-line); }
  .score-rule::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 1px; background: currentColor; }
  .m-sim { --metric: var(--metric-similarity); }
  .m-ai { --metric: var(--metric-ai); }
  .score.m-sim, .score.m-ai, .metric-value.m-sim, .metric-value.m-ai { color: var(--metric); }
  .metric-label { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-muted); }
  .metric-label::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--metric, var(--color-line-strong)); }
  .table.align-center .right { text-align: center; }
  .metric-strip { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border: 1px solid var(--color-line); border-radius: var(--radius-surface); background: var(--color-surface); margin-bottom: 20px; }
  .metric { display: grid; align-content: start; gap: 6px; padding: 14px 18px 16px; border-left: 1px solid var(--color-line); }
  .metric:first-child { border-left: 0; }
  .metric .k { font-size: var(--text-sm); color: var(--color-text-muted); }
  .metric .v { font: 600 30px/1.05 var(--font-display); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.02em; }
  .metric .v small { font-size: 15px; font-weight: 500; color: var(--color-text-muted); }
  .metric .score-rule { width: 88px; height: 3px; color: var(--metric, var(--color-text)); }
  .metric .v.m-sim, .metric .v.m-ai { color: var(--metric); }
  .metric .act { margin-top: 4px; justify-self: start; }
  [data-brand="open-api"] .metric .v { font-family: var(--font-mono); font-weight: 500; font-size: 26px; }
  .pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--color-line); font-size: var(--text-sm); color: var(--color-text-muted); }
  .pagination .pages { display: inline-flex; gap: 6px; }

  /* list rows (attention inbox) */
  .inbox-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 18px; border-bottom: 1px solid var(--color-line); text-decoration: none; color: inherit; }
  .inbox-row:last-child { border-bottom: 0; }
  .inbox-row:hover { background: color-mix(in srgb, var(--color-hover) 50%, transparent); }
  .inbox-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-md); }
  .inbox-row .when { font: 400 12px/1.6 var(--font-mono); color: var(--color-text-muted); }
  .inbox-row .issue { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: var(--text-xs); color: var(--color-text-muted); }

  /* empty */
  .empty { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--color-text-muted); font-size: var(--text-md); }
  .empty .icon { width: 24px; height: 24px; }

  /* toast */
  .toast { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px 0 14px; border-radius: var(--radius-control); background: var(--toast-background); color: var(--toast-text); font-size: var(--text-md); box-shadow: var(--shadow-float); animation: rise var(--dur) var(--ease); }
  [data-theme="dark"] .toast { background: var(--toast-background); color: var(--toast-text); }
  .toast .icon.ok { color: var(--toast-success); }
  [data-theme="dark"] .toast .icon.ok { color: var(--toast-success-dark); stroke: var(--toast-success-stroke); }
  .toast .icon-btn { color: inherit; opacity: .7; }

  /* dialog */
  .dialog { width: min(440px, calc(100vw - 32px)); margin: auto; padding: 22px 22px 18px; border: 0; border-radius: var(--radius-surface); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-float); animation: rise var(--dur) var(--ease); }
  .dialog-title { font: 600 var(--text-lg)/1.35 var(--font-display); }
  .dialog-body { margin-top: 8px; font-size: var(--text-md); color: var(--color-text-muted); }
  .dialog-body strong { color: var(--color-text); }
  .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

  /* skeleton */
  .skeleton { display: block; height: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--color-sunken), var(--color-hover), var(--color-sunken)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
  @keyframes shimmer { to { background-position: -200% 0; } }

  /* code */
  .code { margin: 0; padding: 14px 16px; border-radius: var(--radius-control); background: var(--color-sunken); border: 1px solid var(--color-line); font: 400 13px/1.7 var(--font-mono); overflow-x: auto; }
  .code .k { color: var(--color-brand); } .code .s { color: var(--status-success); }

  /* result summary (report page) */
  .results { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
  .result { padding: 14px 0 14px 16px; border-left: 1px solid var(--color-line); }
  .result[hidden] { display: none; }
  .result:first-child { padding-left: 0; border-left: 0; }
  .result .k { font-size: var(--text-sm); color: var(--color-text-muted); }
  .result .v { margin-top: 4px; font: 600 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums lining-nums; }
  .result .score-rule { width: 64px; margin-top: 10px; }
  .result .v.m-sim, .result .v.m-ai { color: var(--metric); }
  .result .score-rule { color: var(--metric, var(--color-text)); }
  @supports (grid-template-rows: subgrid) {
    .results { grid-template-rows: auto auto auto; }
    .result { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
  }

  .dl-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 12px 0 14px; border: 1px solid var(--color-line); border-radius: var(--radius-control); color: inherit; text-decoration: none; transition: border-color var(--dur-fast), background-color var(--dur-fast); }
  .dl-row + .dl-row { margin-top: 8px; }
  .dl-row:hover { border-color: var(--color-text); }
  .dl-row .fi { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-control); background: var(--color-sunken); color: var(--color-text); }
  .dl-row.m-sim .fi, .dl-row.m-ai .fi { color: var(--metric); }
  .dl-row .t { flex: 1; font-weight: 600; font-size: var(--text-md); }
  .dl-row .t small { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--color-text-muted); }
  .done-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--status-success-bg); color: var(--status-success); }
  .done-mark svg { width: 24px; height: 24px; stroke-width: 2.2; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .1s var(--ease) forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* brand-specific type tuning */
@layer components {
  [data-brand="open-api"] .page-title, [data-brand="ithenticate"] .page-title { font-weight: 700; letter-spacing: -0.025em; }
  [data-brand="open-api"] .panel-title, [data-brand="open-api"] .dialog-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
  [data-brand="open-api"] .stat-value { font-family: var(--font-mono); font-weight: 500; font-size: 26px; letter-spacing: -0.02em; }
  [data-brand="open-api"] .wordmark { font-size: 20px; }
  [data-brand="open-api"] .score { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
  .brand-tile { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--color-action); color: var(--color-on-action); }
  .brand-tile .icon { width: 15px; height: 15px; stroke-width: 2.2; }
  [data-brand="ithenticate"] .wordmark { font: 700 20px/1 var(--font-display); letter-spacing: -0.01em; }
  @media (max-width: 900px) { .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metric:nth-child(odd) { border-left: 0; } .metric:nth-child(n+3) { border-top: 1px solid var(--color-line); } }
  [data-brand="ithenticate"] .headline, [data-brand="ithenticate"] .sheet-title { font-weight: 700; letter-spacing: -0.025em; }
}

/* touch: every target ≥ 44px on coarse pointers */
@layer components {
  .hit { display: inline-grid; place-items: center; }
  .hit-x { position: relative; }
  @media (pointer: coarse) {
    .btn-sm, .bulkbar .btn { min-width: 44px; min-height: 44px; }
    .seg-btn { min-height: 44px; }
    .pub-toolbar .pref-btn { min-height: 44px; }
    .tab { min-width: 44px; justify-content: center; }
    .check { min-height: 44px; }
    .wordmark { min-height: 44px; }
    .hit { width: 44px; height: 44px; margin: -14px -14px -14px -14px; }
    .hit-x::after, .slip-copy::after { content: ""; position: absolute; left: 50%; top: 50%; min-width: 44px; min-height: 44px; width: calc(100% + 4px); height: calc(100% + 22px); transform: translate(-50%, -50%); }
    .slip-copy { position: relative; }
    .inbox-row { min-height: 44px; }
    .menu-item { min-height: 44px; }
    .error-summary a { display: flex; align-items: center; min-height: 44px; }
  }
}

@layer components {
  /* Truncate the text, keeping the outer link free to receive its expanded hit area. */
  .table .row-title:has(> .row-title-text) { overflow: visible; }
  .row-title-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@layer components {
  /* Shared rules formerly embedded in approved page mockups or layouts. */
  .nav-label { padding: 12px 10px 6px; font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); letter-spacing: .04em; }
  .nav-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: var(--radius-control); color: var(--color-text-muted); text-decoration: none; font-size: var(--text-md); }
  .nav-item:hover { color: var(--color-text); background: var(--color-hover); }
  .nav-item[aria-current="page"] { color: var(--color-text); font-weight: 600; background: var(--color-surface); box-shadow: 0 0 0 1px var(--color-line); }
  .nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 2px; border-radius: 0 2px 2px 0; background: var(--color-brand); }
  .nav-item .chev { margin-left: auto; }
  .nav-sub .nav-item { padding-left: 38px; min-height: 34px; font-size: var(--text-sm); }
  .summary-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-bottom: 18px; font-size: var(--text-sm); color: var(--color-text-muted); }
  .summary-line b { margin-left: 6px; font: 600 20px/1 var(--font-display); color: var(--color-text); font-variant-numeric: tabular-nums; }
  .summary-line b.is-attn { color: var(--color-brand); }
  .summary-line .snapshot { margin-left: auto; }
.back{display:inline-flex;align-items:center;gap:4px;margin-bottom:10px;font-size:13px;color:var(--color-text-muted);text-decoration:none}
.kv{display:grid;grid-template-columns:minmax(var(--kv-label-min),var(--kv-label-width)) minmax(0,1fr);margin:0}
  .kv dt,.kv dd{margin:0;padding:10px 18px;border-bottom:1px solid var(--color-line);font-size:14px}
  .kv dt{color:var(--color-text-muted)}
  .kv dd{padding-left:0}
.tl{margin:0;padding:10px 18px 14px;list-style:none}
  .tl-item{position:relative;display:flex;gap:12px;padding:8px 0}
  .tl-item:not(:last-child)::after{content:"";position:absolute;left:11px;top:34px;bottom:-6px;width:2px;background:var(--color-line)}
.tl-dot{display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:var(--status-success-bg);color:var(--status-success)}
  .tl-dot .icon{width:13px;height:13px;stroke-width:2.4}
  .tl-item b{font-size:14px}
  .tl-item .time{font:12px/1.5 var(--font-mono);color:var(--color-text-muted)}
.meta-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin:-6px 0 20px;font-size:13px;color:var(--color-text-muted)}
.meta-line .k{margin-right:6px}
  [data-brand="open-api"] .kv dt:nth-last-child(2), [data-brand="open-api"] .kv dd:last-child { border-bottom: 0; }
  .kv dd { min-width: 0; overflow-wrap: anywhere; }
  .back:hover { color: var(--color-text); }

.timebar{display:flex;align-items:center;gap:10px;margin:-32px -32px 22px;padding:12px 32px;border-bottom:1px solid var(--color-line);background:var(--color-sunken);border-radius:var(--radius-surface) var(--radius-surface) 0 0;font-size:14px;color:var(--color-text-muted);position:relative;overflow:hidden}
.timebar[hidden], [data-report-backup-download][hidden], [data-report-backup-status][hidden] { display: none; }
.timebar b{margin-left:auto;font:600 18px/1 var(--font-mono);color:var(--color-text);font-variant-numeric:tabular-nums}
.timebar::after{content:"";position:absolute;left:0;bottom:0;height:2px;width:var(--left,60%);background:var(--color-text);transition:width var(--dur-slow) linear}
.dl-row.primary{border-color:var(--color-text);background:var(--color-surface)}
.dl-row.primary .fi{background:var(--color-action);color:var(--color-on-action)}
.backup{display:flex;align-items:center;gap:12px;min-height:56px;padding:0 12px 0 14px;border:1px solid var(--color-line);border-radius:var(--radius-control)}
.backup+.backup{margin-top:8px}
  .backup .t{flex:1;font-weight:600;font-size:14px}
.settings{margin-top:14px;border-top:1px solid var(--color-line)}
.settings summary{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;font-size:14px;color:var(--color-text-muted);list-style:none}
.settings summary::-webkit-details-marker{display:none}
  .settings summary .chev { margin-left: auto; }
  .settings[open] summary .chev{transform:rotate(180deg)}
.settings dl{display:grid;grid-template-columns:1fr auto;gap:8px 20px;margin:4px 0 8px;font-size:13.5px}
  .settings dt{color:var(--color-text-muted)}
  .settings dd{margin:0;text-align:right}
.status-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:50%}
.status-mark.progress{background:var(--status-progress-bg);color:var(--status-progress)}
  .status-mark.progress svg{animation:spin 1.8s linear infinite}
.status-mark.neutral{background:var(--status-neutral-bg);color:var(--status-neutral)}
.status-mark svg{width:24px;height:24px}
@media (max-width:900px){.timebar{margin:-24px -20px 20px;padding:12px 20px}}

  @media (max-width: 720px) {
    .table.stack thead { display: none; }
    .table.stack, .table.stack tbody { display: block; width: 100%; }
    .table.stack tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; padding: 14px 14px; border-bottom: 1px solid var(--color-line); }
    .table.stack tr:last-child { border-bottom: 0; }
    .table.stack tr.has-sel { padding-left: 44px; }
    .table.stack td { display: block; padding: 0 !important; border: 0; min-width: 0; }
    .table.stack td.primary, .table.stack td.wide { grid-column: 1 / -1; }
    .table.stack td.primary { order: -1; }
    .table.stack td.sel { position: absolute; left: 14px; top: 16px; width: auto; }
    .table.stack td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 500 12px/1.2 var(--font-ui); color: var(--color-text-muted); }
    .table.stack td.right { text-align: left; }
    .table.stack .actions { justify-content: flex-start; }
    .table.stack tbody tr.is-selected td:first-child { box-shadow: none; }
    .table.stack tbody tr.is-selected { box-shadow: inset 2px 0 0 var(--color-text); }
  }
}

@layer components {
  .pref-group { position: relative; }
  .pref-group > .menu { top: calc(100% + 6px); right: 0; }
}

@layer components {
  .slip-value { display: flex; min-width: 0; }
  .slip-prefix { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .slip-suffix, .slip-copy { flex: none; }
  .copied-note:empty { margin-left: 0; }
  .copy-value { margin-top: 12px; min-height: 96px; padding: 10px 12px; }
  .toast--danger > .icon { color: var(--on-action-danger); }
}

@layer components {
  .field-control { position: relative; }
  .field-control .input { padding-right: 40px; }
  .field-affix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; }
  .field-affix .is-valid { color: var(--status-success); }
  .field-affix .is-invalid { color: var(--status-danger); }
  summary.disclosure { list-style: none; }
  summary.disclosure::-webkit-details-marker { display: none; }
  summary.disclosure::after { content: none; }
  details[open] > .disclosure .chev { transform: rotate(180deg); }
  .disclosure-body { padding: 16px 0; display: grid; gap: 12px; }
  .disclosure-body .field { margin-bottom: 0; }
  .form-note { margin-bottom: 20px; }
  .field-error > span { min-width: 0; overflow-wrap: anywhere; }
  @media (pointer: coarse) { .error-summary a { display: flex; align-items: center; min-height: 44px; } }
}

@layer components {
  .status-mark.danger { color: var(--status-danger); background: var(--status-danger-bg); }
  .report-feedback.is-error, .result .v.result-message { color: var(--status-danger); }
  .result .v.result-message { font: 400 var(--text-sm)/1.5 var(--font-ui); overflow-wrap: anywhere; }
  [data-report-score][hidden] { display: none; }
  .query-row { display: flex; gap: 8px; }
  .query-row .input { min-width: 0; }
  .query-row .btn { min-width: 76px; }
}

@layer components {
  textarea.input { padding: 12px; resize: vertical; }
  .receipt-list { display: grid; gap: 10px; margin-top: 10px; }
  .receipt-list li { min-width: 0; }
  .bulk-results { border-top: 1px solid var(--color-line); padding-top: 20px; margin-top: 20px; }
  .bulk-results > .hint { margin-bottom: 18px; }
}

@layer components {
  .bulkbar[hidden], .region-progress[hidden] { display: none; }
  .slip-link { display: flex; min-width: 0; color: inherit; text-decoration: none; }
  .action-menu { position: relative; }
  .action-menu > summary { list-style: none; }
  .action-menu:not([open]) > .menu { display: none; }
  .action-menu > summary::-webkit-details-marker { display: none; }
  .action-menu > .menu { position: fixed; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .menu-item.danger { color: var(--status-danger); }
  .table .check { min-width: 32px; justify-content: center; }
}

@layer components {
  @media (pointer: coarse) { .table .check { min-width: 44px; } }
  @media (max-width: 720px) { .table.stack td.sel { left: 0; } }
}

@layer components {
  .tl-now .tl-dot { color: var(--status-progress); background: var(--status-progress-bg); }
  .tl-now .tl-dot .icon { animation: spin 1.8s linear infinite; }
  .tl-err .tl-dot { color: var(--status-danger); background: var(--status-danger-bg); }
  .tl-wait .tl-dot { color: var(--status-neutral); background: var(--status-neutral-bg); }
  .metric .field-error { overflow-wrap: anywhere; }
}

@layer components {
  .maintenance-bypass-banner { position: sticky; top: 0; z-index: 20; padding: 12px 24px; border-bottom: 1px solid var(--status-progress); color: var(--color-text); background: var(--status-progress-bg); }
  .maintenance-bypass-banner:has(~ .console) { position: static; }
  .maintenance-bypass-content { display: flex; align-items: center; gap: 20px; max-width: 1320px; margin: 0 auto; }
  .maintenance-bypass-copy { flex: 1; min-width: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
  .maintenance-bypass-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
  .maintenance-bypass-title .icon { animation: none; }
  .maintenance-bypass-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  @media (max-width: 720px) {
    .maintenance-bypass-banner { padding: 12px 16px; }
    .maintenance-bypass-content { align-items: stretch; flex-direction: column; gap: 12px; }
  }
}
@layer layouts {
  .maintenance-bypass-banner ~ .center-top { position: relative; inset: auto; margin: 20px 28px 0; }
  .maintenance-bypass-banner ~ .pub-toolbar { position: relative; inset: auto; display: flex; justify-content: flex-end; margin: 18px 28px 0; }
}
