:root {
  --color-header: #1E2A32;
  --color-teal: #00838C;
  --color-blue: #0078D4;
  --color-surface: #FAF9F8;
  --color-card: #FFFFFF;
  --color-border: #D2D0CE;
  --color-text: #323130;
  --color-text-secondary: #605E5C;
  --hazard: #D97706;
  --redact: #0D1117;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  color: var(--color-text);
}

body {
  display: flex;
  flex-direction: column;
}

section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  background: var(--color-header);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.header-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0 0 0;
}

.main-content {
  flex-grow: 1;
  background: var(--color-surface);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow-y: auto;
}

.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 24px 32px;
  max-width: 640px;
  width: 100%;
  box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: var(--color-text);
}

.field-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.field-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 1px var(--color-blue);
}

textarea {
  resize: vertical;
  min-height: 160px;
}

.btn-primary,
.btn-secondary {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease;
  outline: none;
}

.btn-primary {
  background: var(--color-blue);
  color: white;
}

.btn-primary:hover {
  background: #106EBE;
}

.btn-primary:active {
  background: #005A9E;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-card);
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
}

.btn-secondary:hover {
  background: #F3F2F1;
}

.error-msg {
  color: #A4262C;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

.error-msg.visible {
  display: block;
}

.result-box {
  background: #F3F2F1;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 16px;
  margin-top: 20px;
}

.result-box input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: monospace;
  color: var(--color-text);
  padding: 0;
  margin: 0;
}

.warning-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 12px;
  margin-bottom: 0;
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.status-loading {
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 0;
}

.status-error {
  color: #A4262C;
  background: #FDE7E9;
  border: 1px solid #FECDD2;
  padding: 16px;
  border-radius: 4px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.status-success {
  border-left: 4px solid var(--color-teal);
  background: #E0F2F1;
  border: 1px solid #B2DFDB;
  border-left: 4px solid var(--color-teal);
  padding: 16px;
  border-radius: 2px;
  color: var(--color-text);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.nav-link {
  color: var(--color-blue);
  text-decoration: none;
  font-size: 14px;
}

.nav-link:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

/* Redaction bars */
.redaction-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 16px;
}

.redact-bar {
  display: block;
  height: 14px;
  background: var(--redact);
  border-radius: 1px;
  transform-origin: left center;
}

.redact-bar:nth-child(1) { width: 92%; }
.redact-bar:nth-child(2) { width: 78%; }
.redact-bar:nth-child(3) { width: 65%; }
.redact-bar:nth-child(4) { width: 88%; }
.redact-bar:nth-child(5) { width: 55%; }

@keyframes redact-dissolve {
  0%   { opacity: 1; transform: scaleX(1);    filter: blur(0); }
  100% { opacity: 0; transform: scaleX(0.88); filter: blur(3px); }
}

.revealing .redact-bar                { animation: redact-dissolve 0.4s ease-out forwards; }
.revealing .redact-bar:nth-child(2)   { animation-delay: 0.06s; }
.revealing .redact-bar:nth-child(3)   { animation-delay: 0.12s; }
.revealing .redact-bar:nth-child(4)   { animation-delay: 0.08s; }
.revealing .redact-bar:nth-child(5)   { animation-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .revealing .redact-bar { animation: none; opacity: 0; }
}

/* Reveal view warning */
.warning-text--reveal {
  color: var(--hazard);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 16px;
}

.warning-text--reveal strong { color: inherit; }

/* Reveal button emphasis */
#reveal-btn {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
