/* Sleeper Devs: monochrome dark theme (2020 style). Black and gray, flat, rounded. Plain CSS. */

:root {
  color-scheme: dark;
  --bg: #0c0c0d;          /* page */
  --bg-deep: #09090a;     /* header and footer */
  --panel: #151517;       /* cards */
  --panel-hover: #1c1c1f; /* row hover */
  --field: #0c0c0d;       /* inputs */
  --line: #26262a;
  --line-soft: #1e1e22;
  --chip: #232327;        /* quiet buttons and pills */
  --chip-hover: #2c2c31;
  --text: #f5f5f6;
  --text-2: #b4b5ba;
  --muted: #8a8b91;
  --solid: #f5f5f6;       /* primary button */
  --solid-text: #0c0c0d;
  --tile: #e4e5e8;        /* light tile behind icons, so dark icons stay visible on black */
  --ok-bg: #112218;
  --ok-line: #1f4d31;
  --ok-text: #9ee8b8;
  --err-bg: #221314;
  --err-line: #56262a;
  --err-text: #f4a6a8;
  --danger: #f08a8c;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: var(--text); color: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; padding-bottom: 48px; }

a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted); }
a:hover { text-decoration-color: var(--text); }

h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; color: var(--text); }

.container { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 440px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Header and footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text); margin-right: 9px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-link {
  color: var(--text-2);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.nav-link:hover { background: var(--chip); color: var(--text); text-decoration: none; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.account-name { font-weight: 600; color: var(--text); text-decoration: none; }
.account-name:hover { text-decoration: underline; }
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 26px 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--line-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--solid);
  border-radius: 8px;
  background: var(--solid);
  color: var(--solid-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #ffffff; border-color: #ffffff; color: var(--solid-text); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn-light { background: var(--chip); color: var(--text); border-color: var(--chip); }
.btn-light:hover { background: var(--chip-hover); border-color: var(--chip-hover); color: var(--text); }
.btn-small { padding: 7px 13px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
}
.link-button:hover { text-decoration-color: var(--text); }
.link-button.danger { color: var(--danger); }

/* Cards and layout */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 18px 0;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hero { padding: 44px 0 16px; }
.hero h1 { font-size: 36px; }
.hero p { font-size: 17px; color: var(--text-2); max-width: 620px; margin: 0 0 22px; }
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 6px;
}

/* Forms */
.field { margin-bottom: 18px; }
.field > label, .label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 8px;
}
.field > label.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin: 0;
}
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  max-width: 440px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #5c5d63;
  box-shadow: 0 0 0 3px rgba(245, 245, 246, 0.08);
}
input[type=file] { font: inherit; font-size: 14px; color: var(--text-2); max-width: 100%; }
input[type=file]::file-selector-button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  margin-right: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--chip);
  color: var(--text);
  cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--chip-hover); }
input[type=checkbox] { accent-color: var(--solid); }
.add-row { margin-top: 16px; }
.add-row select { width: auto; max-width: 240px; }
.resume-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.resume-form input[type=text] { width: 220px; }

/* Password show / hide */
.pw-wrap { position: relative; max-width: 440px; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--tile);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-toggle:hover { background: #ffffff; }
.pw-toggle img { width: 20px; height: 20px; }

/* Messages */
.msg {
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.msg:empty { display: none; }
.msg.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-text); }
.msg.error { background: var(--err-bg); border-color: var(--err-line); color: var(--err-text); }

/* Lists */
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.rows li:last-child { border-bottom: 0; }
.rows li:hover { background: var(--panel-hover); }
.rows li.empty { color: var(--muted); font-size: 14px; }
.row-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; color: var(--text); }
.row-actions { display: flex; align-items: center; gap: 14px; }
.level-select { width: auto; max-width: none; padding: 6px 9px; font-size: 13px; }

/* Engines, badges, bio */
.engine {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text);
}
.engine-icon {
  width: 26px;
  height: 26px;
  padding: 3px;
  border-radius: 6px;
  background: var(--tile);
  object-fit: contain;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--text);
  color: var(--bg);
}
.bio { white-space: pre-wrap; margin: 12px 0 18px; color: var(--text-2); }

/* Public profile header */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile-head h1 { margin: 0; }
.avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--chip);
  border: 2px solid var(--line);
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 28px; }
  .card { padding: 18px; }
  .nav { gap: 2px; }
}
