:root {
  --accent: #ff8c00;
  --bg-main: #0f0f0f;
  --bg-card: #181818;
  --border: #2a2a2a;
  --text-main: #eaeaea;
  --text-muted: #8f8f8f;
  --error: #ff6b6b;
  --success: #7dff9c;
}

* {
  box-sizing: border-box;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1a1a1a, #0f0f0f);
  color: var(--text-main);
}

/* Layout */
.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px;
}

.card {
  width: 100%;
  max-width: 720px;
  background: var(--bg-card);
  border-radius: 18px;
  padding: 48px;
  box-shadow: 0 30px 80px rgba(0,0,0,.9);
  animation: fadeUp .6s ease;
}

/* Header */
.header {
  margin-bottom: 36px;
}

/* Logo */
.logo-link {
  display: inline-block;
  margin-bottom: 12px;
}
.logo {
  display: block;
  width: 72px;
  height: auto;
}

.badge {
  display: inline-block;
  background: rgba(255,140,0,.15);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: 34px;
}

.header p {
  margin-top: 10px;
  color: var(--text-muted);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Form */
.field {
  margin-bottom: 22px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-size: 15px;
}

input::placeholder,
textarea::placeholder {
  color: #666;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

/* Accessible focus for keyboard users */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(255,140,0,0.18);
  outline-offset: 3px;
}

/* Button */
button {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255,140,0,.45);
}

/* Messages */
#message {
  margin-top: 18px;
  text-align: center;
}

.error { color: var(--error); }
.success { color: var(--success); }

/* Cover letter character count */
.meta {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}
#coverCount {
  color: var(--text-muted);
  font-size: 13px;
}

/* Slightly narrower button on large screens */
button {
  max-width: 360px;
  margin-left: 0;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 36px 28px;
  }
}



/* Segmented control for Yes/No */
.segmented {
  display: inline-flex;
  align-items: center;
  background: rgba(255,140,0,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
}

.segmented input { display: none; }

.segmented label {
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
  border-radius: 6px;
  user-select: none;
}

.segmented input:checked + label {
  background: rgba(255,140,0,0.12);
  color: var(--accent);
}

/* Focus for segmented labels */
.segmented input:focus + label {
  outline: 3px solid rgba(255,140,0,0.14);
  outline-offset: 2px;
}

/* Improve native select dropdown readability */
select {
  color: var(--text-main);
  background-color: transparent; /* remove black block */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 32px; /* room for native caret */
}

/* Dropdown options */
select option {
  background-color: #ffffff;   /* white dropdown */
  color: #000000;              /* black text */
}

/* Selected / hovered option (some browsers) */
select option:checked,
select option:hover {
  background-color: #ff8c00;
  color: #000000;
}
