@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi/Satoshi-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi/Satoshi-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi/Satoshi-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/satoshi/Satoshi-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eef5fb;
  --bg-soft: #ffffff;
  --card: rgba(255, 255, 255, 0.94);
  --card-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(65, 63, 63, 0.12);
  --text: #1f252d;
  --muted: #6a6a6a;
  --forest: #0060ab;
  --mint: #40abff;
  --rust: #004982;
  --gold: #ff7700;
  --error: #d60000;
  --shadow: 0 24px 50px rgba(0, 73, 130, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --mono: "Consolas", "Courier New", monospace;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --heading: "Satoshi", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(64, 171, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(190, 226, 255, 0.36), transparent 24%),
    linear-gradient(160deg, #f3f9ff 0%, #eef5fb 42%, #f9fbff 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1380px, calc(100vw - 32px));
  margin: 24px auto 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-copy,
.card,
.panel {
  border: 1px solid rgba(208, 208, 208, 0.92);
  background: var(--card);
  backdrop-filter: none;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 32px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 119, 212, 0.18), rgba(190, 226, 255, 0.08));
}

.hero-status {
  padding: 24px;
  border-radius: var(--radius-xl);
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--forest);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  color: #00325a;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.98;
  max-width: 18ch;
  margin-bottom: 16px;
}

.hero-text {
  max-width: 60ch;
  line-height: 1.6;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.panel-input,
.panel-results {
  width: 100%;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.head-note,
.tiny-note,
.batch-message {
  color: var(--muted);
  line-height: 1.5;
}

.batch-form,
.field,
.card {
  display: flex;
  flex-direction: column;
}

.field span,
.card h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

textarea,
input[type="number"],
input[type="text"],
select {
  width: 100%;
  border: 1px solid rgba(208, 208, 208, 0.92);
  background: #f9f9f9;
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

textarea {
  resize: vertical;
  min-height: 220px;
  line-height: 1.5;
}

textarea:focus,
input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: rgba(0, 119, 212, 0.48);
  background: var(--card-strong);
  box-shadow: 0 0 0 4px rgba(0, 119, 212, 0.08);
  transform: translateY(-1px);
}

.input-actions,
.cta-row,
.export-row,
.tribunal-head,
.tribunal-actions,
.status-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

#file-input {
  display: none;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.file-btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  font-weight: 600;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.file-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-btn {
  background: linear-gradient(135deg, #0077d4, #0060ab);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(0, 73, 130, 0.14);
}

.secondary-btn,
.file-btn {
  background: linear-gradient(135deg, #00325a, #004982);
  color: #ffffff;
}

.ghost-btn {
  background: #ffffff;
  color: var(--rust);
  border: 1px solid rgba(208, 208, 208, 0.92);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 16px;
  gap: 10px;
}

.radio-group,
.radio-stack,
.check-grid,
.number-grid {
  display: grid;
  gap: 10px;
}

.radio-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.radio-stack {
  grid-template-columns: 1fr;
}

.mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(208, 208, 208, 0.74);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.mode-option span,
.mode-option small {
  display: block;
}

.mode-option strong {
  font-size: 0.94rem;
}

.mode-option small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 3px;
}

.check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.number-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact span {
  font-size: 0.88rem;
}

.single-check {
  display: flex;
  gap: 10px;
  align-items: center;
}

.atlas-legend-list {
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.55;
}

.atlas-legend-list strong {
  color: #00325a;
}

.atlas-legend-list {
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.tribunal-card {
  margin-top: 18px;
}

.tribunal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.tribunal-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(208, 208, 208, 0.92);
  border-radius: var(--radius-md);
  background: #f9fbff;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid rgba(208, 208, 208, 0.92);
}

.summary-card strong {
  display: block;
  font-size: 1.6rem;
  margin-top: 8px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analysis-shell {
  --analysis-brand-10: #e7f5ff;
  --analysis-brand-20: #bee2ff;
  --analysis-brand-70: #0077d4;
  --analysis-brand-80: #0060ab;
  --analysis-brand-90: #004982;
  --analysis-brand-100: #00325a;
  --analysis-grey-10: #f9f9f9;
  --analysis-grey-20: #e4e4e4;
  --analysis-grey-30: #d0d0d0;
  --analysis-grey-80: #6a6a6a;
  --analysis-grey-100: #413f3f;
  --analysis-orange-10: #fff1e5;
  --analysis-orange-80: #ad5100;
  --analysis-heading-font: "Satoshi", "Segoe UI", sans-serif;
  --analysis-body-font: "Source Sans 3", "Segoe UI", sans-serif;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(0, 119, 212, 0.18);
  background:
    radial-gradient(circle at top right, rgba(0, 119, 212, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(190, 226, 255, 0.56), transparent 32%),
    linear-gradient(180deg, rgba(231, 245, 255, 0.9) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(231, 245, 255, 0.82) 100%);
  box-shadow: 0 26px 48px rgba(0, 73, 130, 0.08);
  position: relative;
  overflow: hidden;
}

.analysis-shell::before,
.analysis-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.analysis-shell::before {
  width: 220px;
  height: 220px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(0, 119, 212, 0.18), rgba(0, 119, 212, 0));
}

.analysis-shell::after {
  width: 260px;
  height: 260px;
  bottom: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(190, 226, 255, 0.72), rgba(190, 226, 255, 0));
}

.analysis-shell > * {
  position: relative;
  z-index: 1;
}

.analysis-shell .panel-head {
  margin-bottom: 0;
}

.analysis-shell .eyebrow {
  color: var(--analysis-brand-90);
  font-family: var(--analysis-body-font);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.analysis-shell h2,
.analysis-shell h3 {
  font-family: var(--analysis-heading-font);
  color: var(--analysis-brand-100);
}

.analysis-shell h2 {
  max-width: none;
  font-size: clamp(2rem, 2.7vw, 2.6rem);
}

.analysis-shell h3 {
  font-size: 1.28rem;
  margin-bottom: 0;
}

.analysis-shell .head-note,
.analysis-shell .tiny-note,
.analysis-shell .field span,
.analysis-shell .analysis-output pre,
.analysis-shell .analysis-body,
.analysis-shell .analysis-warning,
.analysis-shell .meta-block span {
  font-family: var(--analysis-body-font);
}

.analysis-shell .head-note,
.analysis-shell .tiny-note,
.analysis-shell .field span,
.analysis-shell .meta-block span {
  color: var(--analysis-grey-80);
}

.analysis-shell .card {
  border-radius: 18px;
  border: 1px solid rgba(208, 208, 208, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(0, 73, 130, 0.08);
  backdrop-filter: none;
}

.analysis-shell .field {
  gap: 8px;
}

.analysis-shell input[type="text"],
.analysis-shell select,
.analysis-shell textarea {
  width: 100%;
  border: 1px solid var(--analysis-grey-30);
  background: var(--analysis-grey-10);
  color: var(--analysis-grey-100);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: var(--analysis-body-font);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.analysis-shell input[type="text"]:focus,
.analysis-shell select:focus,
.analysis-shell textarea:focus {
  outline: none;
  border-color: rgba(0, 119, 212, 0.58);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 119, 212, 0.08);
  transform: none;
}

.analysis-shell .primary-btn,
.analysis-shell .secondary-btn,
.analysis-shell .ghost-btn,
.analysis-shell .file-btn {
  min-height: 40px;
  padding: 11px 16px;
  border-radius: 12px;
  font-family: var(--analysis-body-font);
  font-weight: 600;
  box-shadow: none;
}

.analysis-shell .primary-btn {
  background: linear-gradient(135deg, var(--analysis-brand-70), var(--analysis-brand-80));
  color: #ffffff;
}

.analysis-shell .secondary-btn,
.analysis-shell .file-btn {
  background: linear-gradient(135deg, var(--analysis-brand-100), var(--analysis-brand-90));
  color: #ffffff;
}

.analysis-shell .ghost-btn {
  border: 1px solid var(--analysis-grey-30);
  background: #ffffff;
  color: var(--analysis-grey-100);
}

.analysis-shell .primary-btn:hover,
.analysis-shell .secondary-btn:hover,
.analysis-shell .ghost-btn:hover,
.analysis-shell .file-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 73, 130, 0.08);
}

.analysis-card {
  gap: 14px;
}

.analysis-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 4px;
}

.analysis-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 119, 212, 0.1);
  border: 1px solid rgba(0, 119, 212, 0.18);
  color: var(--analysis-brand-90);
  font-family: var(--analysis-body-font);
  font-size: 0.82rem;
  font-weight: 700;
}

.analysis-lock-badge--soft {
  background: rgba(255, 255, 255, 0.88);
}

.analysis-inline-status {
  margin-top: 2px;
}

.analysis-top-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.analysis-single-grid {
  grid-template-columns: 1fr;
}

.analysis-policy-card textarea {
  min-height: 360px;
}

.analysis-preset-hint {
  margin-top: -2px;
}

.analysis-prompt-card #credit-prompt-input {
  min-height: 240px;
}

.analysis-complements-card #credit-extra-context {
  min-height: 180px;
}

.analysis-preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analysis-preset-btn {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--analysis-grey-20);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  color: var(--analysis-grey-100);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.analysis-preset-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 119, 212, 0.24);
  box-shadow: 0 12px 24px rgba(0, 73, 130, 0.06);
}

.analysis-preset-btn.is-selected {
  border-color: rgba(0, 119, 212, 0.42);
  background: linear-gradient(180deg, rgba(231, 245, 255, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 0 0 1px rgba(0, 119, 212, 0.18);
}

.analysis-preset-kicker {
  color: var(--analysis-brand-80);
  font-family: var(--analysis-body-font);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.analysis-preset-btn strong {
  font-family: var(--analysis-heading-font);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
}

.analysis-preset-btn span:last-child {
  color: var(--analysis-grey-80);
  font-family: var(--analysis-body-font);
  line-height: 1.45;
}

.analysis-output-card {
  gap: 16px;
}

.analysis-output-card--wide {
  padding-top: 18px;
}

.analysis-shell .analysis-file-item,
.analysis-shell .json-box,
.analysis-shell .meta-block,
.analysis-shell .analysis-warning,
.analysis-shell .tribunal-item {
  border-color: rgba(208, 208, 208, 0.9);
}

.analysis-shell .analysis-file-item,
.analysis-shell .meta-block,
.analysis-shell .json-box,
.analysis-shell .tribunal-item {
  background: #ffffff;
}

.analysis-shell .meta-block {
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.analysis-shell .meta-block strong {
  color: var(--analysis-brand-100);
  font-family: var(--analysis-body-font);
}

.analysis-shell .section-label-strong {
  color: var(--analysis-grey-100);
}

.analysis-shell .pill.ok {
  background: rgba(0, 119, 212, 0.1);
  color: var(--analysis-brand-90);
}

.analysis-shell .pill.neutral {
  background: rgba(228, 228, 228, 0.54);
  color: var(--analysis-grey-80);
}

.analysis-shell .analysis-warning {
  background: var(--analysis-orange-10);
  color: var(--analysis-orange-80);
}

.analysis-shell .analysis-note-warn {
  color: var(--analysis-orange-80);
}

.analysis-shell .analysis-output {
  min-height: 360px;
}

.analysis-shell .analysis-output pre {
  color: var(--analysis-grey-100);
}

.analysis-shell .json-box summary {
  background: linear-gradient(180deg, rgba(231, 245, 255, 0.45), rgba(255, 255, 255, 0));
}

.analysis-shell .json-box pre,
.analysis-shell .tribunal-meta {
  color: var(--analysis-grey-80);
}

.analysis-shell .empty-state {
  border-color: rgba(0, 119, 212, 0.16);
  background: rgba(255, 255, 255, 0.58);
  color: var(--analysis-grey-80);
}

.result-card {
  border: 1px solid rgba(208, 208, 208, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  padding: 16px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.result-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 73, 130, 0.08);
}

.result-card.running {
  border-color: rgba(255, 119, 0, 0.34);
}

.result-card.done {
  border-color: rgba(0, 119, 212, 0.26);
}

.result-card.error,
.result-card.cancelled {
  border-color: rgba(214, 0, 0, 0.24);
}

.result-head,
.result-strip,
.result-grid,
.result-tags,
.badge-row,
.detail-columns,
.tribunal-list,
.tribunal-item,
.json-box summary {
  display: flex;
  gap: 12px;
}

.result-head,
.result-strip,
.tribunal-item,
.json-box summary {
  align-items: center;
  justify-content: space-between;
}

.result-head {
  margin-bottom: 14px;
}

.result-doc {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.result-sub {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 11px;
  font-family: var(--mono);
  font-size: 0.84rem;
  background: rgba(228, 228, 228, 0.56);
}

.pill.ok {
  background: rgba(0, 119, 212, 0.1);
  color: #004982;
}

.pill.warn {
  background: rgba(255, 119, 0, 0.14);
  color: #ad5100;
}

.pill.error {
  background: rgba(214, 0, 0, 0.12);
  color: var(--error);
}

.pill.neutral {
  background: rgba(228, 228, 228, 0.54);
  color: var(--muted);
}

.duration-pill {
  font-family: var(--body-font);
  font-weight: 600;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.meta-block {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 208, 208, 0.92);
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.meta-block span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.meta-inline-date {
  display: inline;
  margin-left: 6px;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted);
}

.section-label-strong {
  color: #6a6a6a;
  font-weight: 700;
}

.one-line-ellipsis {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.detail-panel {
  border-radius: var(--radius-md);
  border: 1px solid rgba(208, 208, 208, 0.92);
  padding: 14px;
  background: #ffffff;
}

.analysis-grid {
  display: grid;
  gap: 14px;
}

.analysis-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 48px;
}

.analysis-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 208, 208, 0.92);
  background: #ffffff;
}

.analysis-output-card {
  gap: 14px;
}

.analysis-output {
  min-height: 320px;
}

.analysis-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.analysis-warning {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 119, 0, 0.18);
  background: rgba(255, 241, 229, 0.9);
  color: #ad5100;
  line-height: 1.5;
}

.analysis-note-warn {
  color: #ad5100;
}

.analysis-raw-box {
  margin-top: 12px;
}

.analysis-body {
  margin: 0;
}

.analysis-output pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--sans);
  line-height: 1.6;
}

.tribunal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.tribunal-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 208, 208, 0.92);
  background: #ffffff;
}

.tribunal-meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.cgu-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid rgba(208, 208, 208, 0.92);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.cgu-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.cgu-table th,
.cgu-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(208, 208, 208, 0.92);
  text-align: left;
  vertical-align: middle;
}

.cgu-table th {
  background: #38b4da;
  color: #ffffff;
  font-family: var(--heading);
  font-weight: 700;
}

.cgu-table tbody tr:last-child td {
  border-bottom: none;
}

.cgu-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.cgu-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}

.cgu-status.ok {
  color: #0b8f3c;
}

.cgu-status.warn {
  color: #c26a00;
}

.cgu-emissao-cell {
  width: 160px;
}

.json-box {
  margin-top: 12px;
  border: 1px solid rgba(208, 208, 208, 0.92);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.json-box summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
}

.json-box summary::-webkit-details-marker {
  display: none;
}

.json-box pre {
  margin: 0;
  padding: 0 14px 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #26312a;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(255, 119, 0, 0.1);
}

.status-dot.ok {
  background: var(--forest);
  box-shadow: 0 0 0 8px rgba(0, 119, 212, 0.1);
}

.status-dot.error {
  background: var(--error);
  box-shadow: 0 0 0 8px rgba(214, 0, 0, 0.08);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.status-chip {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 208, 208, 0.92);
  padding: 10px 12px;
  background: #ffffff;
}

.status-chip strong {
  display: block;
  font-size: 0.95rem;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(0, 119, 212, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.56);
}

@media (max-width: 1180px) {
  .hero,
  .layout,
  .detail-columns,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .summary-strip,
  .tribunal-grid,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-preset-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    margin: 12px auto 24px;
  }

  .hero-copy,
  .hero-status,
  .panel {
    padding: 18px;
  }

  .analysis-shell {
    padding: 16px;
  }

  .settings-grid,
  .summary-strip,
  .tribunal-grid,
  .result-grid,
  .radio-group,
  .check-grid,
  .number-grid {
    grid-template-columns: 1fr;
  }

  .analysis-preset-list {
    grid-template-columns: 1fr;
  }

  .result-head,
  .result-strip,
  .tribunal-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  :root {
    --bg: #ffffff;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --card-strong: #ffffff;
    --shadow: none;
  }

  html,
  body {
    background: #ffffff !important;
    min-height: auto;
  }

  body {
    color: #1f252d;
  }

  .page-shell {
    width: 100%;
    margin: 0;
  }

  .hero,
  .layout,
  .detail-columns {
    display: block;
  }

  .hero {
    margin-bottom: 10px;
  }

  .hero-status,
  .panel-input,
  .analysis-shell,
  .export-row,
  .cta-row,
  .input-actions,
  .result-tags,
  .ghost-btn,
  .primary-btn,
  .secondary-btn,
  .file-btn,
  .json-box,
  #saldo-btn,
  #file-input,
  #credit-file-input {
    display: none !important;
  }

  .hero-copy,
  .panel,
  .card,
  .result-card,
  .detail-panel,
  .meta-block,
  .summary-card,
  .tribunal-item {
    background: #ffffff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .hero-copy,
  .panel,
  .result-card,
  .detail-panel,
  .meta-block,
  .summary-card,
  .tribunal-item {
    border-color: rgba(65, 63, 63, 0.18) !important;
  }

  .panel-results {
    padding: 0;
    border: none;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .summary-strip,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card,
  .detail-panel,
  .summary-card,
  .analysis-output-card,
  .tribunal-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .result-card {
    margin-bottom: 12px;
    padding: 12px;
  }

  .detail-columns {
    margin-top: 10px;
  }

  .detail-panel + .detail-panel {
    margin-top: 10px;
  }

  .result-strip {
    margin-top: 8px;
  }

  .batch-message {
    margin-bottom: 10px;
  }

  .results-list {
    gap: 10px;
  }

  .empty-state {
    background: #ffffff;
  }
}
