@import url(https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap);

@font-face {
  font-family: 'OpenDyslexic';
  src: url('opendyslexic-0.92/OpenDyslexic-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('opendyslexic-0.92/OpenDyslexic-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('opendyslexic-0.92/OpenDyslexic-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('opendyslexic-0.92/OpenDyslexic-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
:root {
  --red: #D72638;
  --red-hover: #B71C2B;
  --bg: #FFFFFF;
  --text: #111111;
  --muted: #555555;
  --border: #111111;
  --border-red: #D72638;
  --radius: 2px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 340px;
  font-family: 'OpenDyslexic', 'OpenDyslexic Sans', 'JetBrains Mono', 'IBM Plex Mono', Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
}

.pincer-extras {
  border-top: 1px solid var(--border);
}

.pincer-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pincer-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
}

.pincer-tagline {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.pincer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.2s;
}

.status-dot.active {
  background: #22c55e;
}

/* Profile selector */
.profile-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.profile-select {
  flex: 1;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27 viewBox=%270 0 10 6%27%3E%3Cpath d=%27M0 0l5 6 5-6z%27 fill=%27%23111%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  transition: border-color 0.15s;
}

.profile-select:hover,
.profile-select:focus {
  border-color: var(--red);
}

/* Section */
.section {
  border-bottom: 1px solid var(--border-red);
}

.section-header {
  padding: 8px 16px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.section-body {
  padding: 4px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toggle-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex: 1;
}

.toggle-label.disabled {
  color: var(--muted);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #e5e5e5;
  border: 1px solid #ccc;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--red);
  border-color: var(--red);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  pointer-events: none;
}

.toggle-switch input:checked ~ .toggle-thumb {
  transform: translateX(16px);
}

/* Mode selector */
.mode-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mode-row-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mode-select {
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 8px;
  cursor: pointer;
  outline: none;
  -moz-appearance: none;
       appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%276%27 viewBox=%270 0 10 6%27%3E%3Cpath d=%27M0 0l5 6 5-6z%27 fill=%27%23111%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
  transition: border-color 0.15s;
  width: 100%;
}

.mode-select:hover,
.mode-select:focus {
  border-color: var(--red);
}

/* AI status bar */
.ai-bar {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9f9f9;
  border-bottom: 1px solid #e5e5e5;
}

.ai-bar-text {
  font-size: 10px;
  color: var(--muted);
  flex: 1;
}

.ai-bar-btn {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  color: var(--bg);
  background: var(--red);
  border: none;
  border-radius: var(--radius);
  padding: 4px 10px;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s;
}

.ai-bar-btn:hover {
  background: var(--red-hover);
}

.ai-bar-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #e5e5e5;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.pincer-footer {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5e5e5;
}

.footer-link {
  font-size: 9px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-link:hover {
  color: var(--red);
}

.reset-btn {
  font-family: inherit;
  font-size: 9px;
  color: var(--muted);
  background: none;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 3px 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: border-color 0.15s, color 0.15s;
}

.reset-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Contrast slider */
.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-value {
  font-size: 10px;
  color: var(--muted);
  min-width: 28px;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  background: #e5e5e5;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--red);
}

/* API key input */
.api-key-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.api-key-input {
  font-family: inherit;
  font-size: 10px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 8px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}

.api-key-input:focus {
  border-color: var(--red);
}

.api-key-input::-moz-placeholder {
  color: #aaa;
}

.api-key-input::placeholder {
  color: #aaa;
}

.api-key-saved {
  font-size: 9px;
  color: #22c55e;
  letter-spacing: 0.06em;
}
