:root {
  --bg: #F6F7FA;
  --surface: #FFFFFF;
  --ink: #0A0E1A;
  --ink-secondary: #5B5F71;
  --ink-faint: #8792A2;
  --accent: #0A9B7A;
  --accent-hover: #088A6B;
  --accent-soft: #E4F7F2;
  --green: #0A8A4C;
  --green-soft: #E9F9EE;
  --amber: #B4740A;
  --amber-soft: #FFF3D6;
  --red: #DF1B41;
  --red-soft: #FEEBEC;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-card: 0 1px 1px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.05), 0 8px 20px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 52px 22px 90px;
}

.wordmark {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 36px;
}

h1 {
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  color: var(--ink);
}

h2 {
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  margin: 32px 0 10px;
}

p.sub {
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 30px;
  max-width: 52ch;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin: 20px 0 7px;
}

input[type=text], input[type=password] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #E1E3E8;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus, input[type=password]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  width: 100%;
  padding: 13px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #E1E3E8;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-sizing: border-box;
  resize: vertical;
}

.hint {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 7px;
  line-height: 1.5;
}

button {
  margin-top: 20px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.4; cursor: default; }

button.secondary {
  background: var(--surface);
  border: 1px solid #E1E3E8;
  color: var(--ink);
}
button.secondary:hover { background: #FAFAFC; }

button.small {
  margin-top: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover { text-decoration: underline; }

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.card-line {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.card-answer {
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.card .pill { margin-bottom: 10px; }
.card.accent-amber .pill { background: var(--amber-soft); color: var(--amber); }
.card.accent-blue .pill { background: var(--accent-soft); color: var(--accent); }
.card.accent-red .pill { background: var(--red-soft); color: var(--red); }
.card.done { opacity: 0.5; }

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-accurate {
  background: var(--green-soft);
  color: var(--green);
}
.btn-accurate:hover { background: #DCF4E3; }
.btn-inaccurate {
  background: var(--red-soft);
  color: var(--red);
}
.btn-inaccurate:hover { background: #FCDBDF; }
.btn-later {
  background: #F0F1F4;
  color: var(--ink-secondary);
}

.reason-row {
  display: none;
  gap: 8px;
  margin-top: 12px;
}
.reason-row input {
  flex: 1;
  font-size: 13px;
  padding: 8px 12px;
}

.empty-state {
  color: var(--ink-faint);
  font-size: 14px;
  padding: 14px 0;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.top-row a.update-link {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--amber-soft);
  color: var(--amber);
  margin-bottom: 12px;
}

.company-link {
  display: block;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  transition: box-shadow 0.15s, transform 0.1s;
}
.company-link:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
  text-decoration: none;
}
.company-link.add-new {
  color: var(--accent);
  box-shadow: none;
  border: 1.5px dashed #D3D6DF;
  background: transparent;
}
.company-link.add-new:hover {
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}

.login-box {
  max-width: 360px;
}

.error-text {
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-secondary);
  font-weight: 500;
}
