/* ===========================================================
   DevOps Hero — Production UI
   Clean, warm, professional Q&A platform
   Fonts: Source Sans 3 (body) + JetBrains Mono (code/tags)
   =========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Palette — warm neutral + rich blue accent + orange brand */
  --white: #ffffff;
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f2f4f7;
  --gray-200: #e4e7ec;
  --gray-300: #d0d5dd;
  --gray-400: #98a2b3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1d2939;
  --gray-900: #101828;

  --blue-50: #eff8ff;
  --blue-100: #d1e9ff;
  --blue-200: #b2ddff;
  --blue-500: #2e90fa;
  --blue-600: #1570ef;
  --blue-700: #175cd3;
  --blue-800: #1849a9;

  --orange-50: #fff6ed;
  --orange-100: #ffead5;
  --orange-400: #fd853a;
  --orange-500: #ef6820;
  --orange-600: #e04f16;

  --green-50: #ecfdf3;
  --green-100: #d1fadf;
  --green-500: #12b76a;
  --green-600: #039855;
  --green-700: #027a48;

  --red-50: #fef3f2;
  --red-500: #f04438;
  --red-600: #d92d20;

  /* Semantic */
  --bg: var(--gray-50);
  --bg-white: var(--white);
  --border: var(--gray-200);
  --border-light: var(--gray-100);
  --text: var(--gray-900);
  --text-2: var(--gray-700);
  --text-3: var(--gray-500);
  --text-4: var(--gray-400);
  --link: var(--blue-600);
  --link-hover: var(--blue-700);
  --accent: var(--orange-500);
  --accent-hover: var(--orange-600);
  --tag-bg: var(--blue-50);
  --tag-text: var(--blue-700);
  --tag-hover: var(--blue-100);

  /* Layout */
  --max-w: 1280px;
  --header-h: 60px;
  --sidebar-w: 230px;
  --right-w: 310px;

  /* Typography */
  --ff: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fs: 14px;
  --fs-sm: 13px;
  --fs-xs: 12px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-h1: 28px;

  /* Radius */
  --r: 8px;
  --r-sm: 6px;
  --r-xs: 4px;
  --r-lg: 12px;
  --r-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,.1), 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,.1), 0 2px 4px -2px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --shadow-xl: 0 20px 24px -4px rgba(16,24,40,.08), 0 8px 8px -4px rgba(16,24,40,.03);
  --ring-focus: 0 0 0 4px rgba(46,144,250,.24);

  --t: 150ms ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--ff); font-size: var(--fs); line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--link); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--link-hover); }
.hidden { display: none !important; }
::selection { background: var(--blue-100); color: var(--blue-800); }

/* === HEADER === */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  z-index: 100;
  display: flex; align-items: center;
}
.header-inner {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 16px; height: 100%;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none !important; cursor: pointer; flex-shrink: 0; }
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 4px rgba(239,104,32,.25);
  transition: transform var(--t), box-shadow var(--t);
}
.logo:hover .logo-icon { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(239,104,32,.3); }
.logo-text { font-size: 19px; font-weight: 700; color: var(--gray-900); letter-spacing: -.4px; }
.logo-text span { color: var(--accent); }

/* Search */
.search-wrap { flex: 1; max-width: 580px; position: relative; }
.search-wrap input {
  width: 100%; height: 40px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r);
  font-family: var(--ff); font-size: var(--fs);
  color: var(--text); background: var(--bg-white);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-wrap input:focus { border-color: var(--blue-500); box-shadow: var(--ring-focus); }
.search-wrap input::placeholder { color: var(--gray-400); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gray-400); pointer-events: none; }

/* Header auth */
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r);
  font-family: var(--ff); font-size: var(--fs); font-weight: 600; line-height: 1.2;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: all var(--t);
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); box-shadow: var(--shadow-xs); }
.btn-accent:hover { background: var(--accent-hover); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--blue-600); color: var(--white); border-color: var(--blue-600); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--blue-700); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-light { background: var(--bg-white); color: var(--gray-700); border-color: var(--gray-300); box-shadow: var(--shadow-xs); }
.btn-light:hover { background: var(--gray-50); color: var(--gray-800); }
.btn-danger { background: var(--white); color: var(--red-500); border-color: var(--red-500); }
.btn-danger:hover { background: var(--red-50); }
.btn-ghost { background: none; color: var(--gray-500); border: none; padding: 6px 10px; }
.btn-ghost:hover { color: var(--gray-700); background: var(--gray-100); }
.btn.full { width: 100%; }

/* === THREE-COLUMN LAYOUT === */
.layout {
  max-width: var(--max-w); margin: 0 auto;
  padding-top: var(--header-h);
  display: flex; min-height: 100vh;
}

/* LEFT NAV */
.left-nav {
  width: var(--sidebar-w); flex-shrink: 0;
  padding: 20px 12px;
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r);
  font-size: var(--fs); font-weight: 500; color: var(--gray-600);
  transition: all var(--t);
  text-decoration: none !important;
  margin-bottom: 2px;
}
.nav-link:hover { background: var(--gray-100); color: var(--gray-800); }
.nav-link.active { background: var(--orange-50); color: var(--orange-600); font-weight: 600; }
.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .65; }
.nav-link.active svg { opacity: 1; }
.nav-divider { height: 1px; background: var(--border-light); margin: 12px 0; }
.nav-tags-section { padding: 0 4px; }
.nav-section-title { font-size: var(--fs-xs); font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; padding: 8px 8px 6px; }
.nav-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px 8px; }

/* MAIN */
.main { flex: 1; min-width: 0; background: var(--bg-white); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

/* RIGHT COL */
.right-col { width: var(--right-w); flex-shrink: 0; padding: 20px 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }

/* === SIDEBAR CARDS === */
.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.sidebar-card.branded { border-color: var(--orange-100); }
.sidebar-card-header {
  padding: 14px 16px;
  font-size: var(--fs); font-weight: 700; color: var(--gray-800);
  border-bottom: 1px solid var(--border-light);
  background: var(--gray-25);
}
.sidebar-card.branded .sidebar-card-header { background: var(--orange-50); border-bottom-color: var(--orange-100); color: var(--orange-600); }
.sidebar-card-body { padding: 0; }
.sidebar-card-body > div { padding: 10px 16px; border-bottom: 1px solid var(--border-light); font-size: var(--fs-sm); color: var(--gray-600); line-height: 1.5; }
.sidebar-card-body > div:last-child { border-bottom: none; }
.sidebar-card-body > div a { font-weight: 500; }

/* Contributor rows */
.contrib-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px !important; }
.contrib-name { font-size: var(--fs-sm); font-weight: 600; color: var(--gray-800); }
.contrib-rep { font-size: var(--fs-xs); color: var(--gray-400); font-family: var(--ff-mono); }

/* YT CTA */
.yt-cta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; text-decoration: none !important;
  background: #fef2f2; border-bottom: none !important;
  transition: background var(--t);
}
.yt-cta:hover { background: #fee2e2; }
.yt-icon {
  width: 40px; height: 40px;
  background: #ef4444; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(239,68,68,.25);
}
.yt-cta .info { font-size: var(--fs-sm); }
.yt-cta .info strong { color: var(--gray-800); display: block; }
.yt-cta .info span { color: var(--gray-500); font-size: var(--fs-xs); }

/* === AD SLOTS === */
.ad-slot { background: var(--gray-25); border: 1px dashed var(--gray-200); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 90px; }
.ad-banner { margin: 0 24px 16px; }
.ad-rect { min-height: 250px; }
.ad-feed { border-left: none; border-right: none; border-radius: 0; min-height: 100px; }
.ad-inline { min-height: 100px; margin: 20px 0; }

/* === TAGS === */
.tag {
  display: inline-flex; padding: 4px 10px;
  background: var(--tag-bg); color: var(--tag-text);
  border-radius: var(--r-xs);
  font-family: var(--ff-mono); font-size: 12px; font-weight: 500;
  line-height: 1.2; cursor: pointer;
  transition: background var(--t), color var(--t);
  text-decoration: none !important;
}
.tag:hover { background: var(--tag-hover); color: var(--blue-800); }
.tag .remove { margin-left: 4px; cursor: pointer; opacity: .5; font-size: 14px; font-family: var(--ff); }
.tag .remove:hover { opacity: 1; }
.tag-suggestions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag-suggestions .tag { opacity: .5; }
.tag-suggestions .tag:hover { opacity: 1; }

/* === PAGE HEADER === */
.main-header {
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.main-header h1 { font-size: var(--fs-h1); font-weight: 700; color: var(--gray-900); line-height: 1.3; letter-spacing: -.3px; }

/* Sort bar */
.sort-bar {
  display: flex; align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
}
.q-count { font-size: var(--fs); color: var(--gray-700); padding: 12px 0; margin-right: auto; font-weight: 600; }
.sort-tabs { display: flex; gap: 0; }
.sort-tab {
  padding: 12px 16px; font-size: var(--fs-sm); font-weight: 500;
  color: var(--gray-500); cursor: pointer;
  border: none; background: none; font-family: var(--ff);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t);
}
.sort-tab:hover { color: var(--gray-700); }
.sort-tab.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 28px; background: var(--orange-50);
  border-bottom: 1px solid var(--orange-100);
  font-size: var(--fs-sm); color: var(--gray-700);
}
.filter-bar .clear { margin-left: auto; color: var(--link); cursor: pointer; font-weight: 500; }

/* === QUESTION LIST CARDS === */
.q-card {
  display: flex; gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--t);
  cursor: pointer;
}
.q-card:hover { background: var(--gray-25); }

/* Stats column */
.q-stats-col {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; min-width: 108px; flex-shrink: 0;
  padding-top: 2px;
}
.q-stat-item {
  font-size: var(--fs-sm); color: var(--gray-400);
  white-space: nowrap; padding: 3px 0;
}
.q-stat-item b { font-weight: 700; color: var(--gray-700); margin-right: 3px; }
.q-stat-item.answered {
  color: var(--green-700); border: 1.5px solid var(--green-500);
  border-radius: var(--r-xs); padding: 3px 8px;
}
.q-stat-item.answered b { color: var(--green-700); }
.q-stat-item.accepted {
  background: var(--green-500); color: var(--white);
  border-radius: var(--r-xs); padding: 3px 8px; border: none;
}
.q-stat-item.accepted b { color: var(--white); }

/* Question content */
.q-content { flex: 1; min-width: 0; }
.q-title {
  font-size: var(--fs-lg); font-weight: 500; color: var(--link);
  line-height: 1.45; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.q-title:hover { color: var(--link-hover); }
.q-excerpt {
  font-size: var(--fs-sm); color: var(--gray-500); line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.q-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.q-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.q-author {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--gray-400); white-space: nowrap;
}
.q-author a { font-weight: 500; color: var(--link); font-size: var(--fs-xs); }

/* === AVATARS === */
.avatar {
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--white); flex-shrink: 0;
  font-family: var(--ff);
}
.avatar.xs { width: 18px; height: 18px; font-size: 10px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; border-radius: var(--r-sm); }
.avatar.md { width: 36px; height: 36px; font-size: 15px; border-radius: var(--r-sm); }
.avatar.lg { width: 48px; height: 48px; font-size: 20px; border-radius: var(--r); }
.avatar.xl { width: 96px; height: 96px; font-size: 38px; border-radius: var(--r-lg); }

/* === QUESTION DETAIL === */
.detail-page { padding: 28px; }
.detail-title {
  font-size: var(--fs-h1); font-weight: 600; color: var(--gray-900);
  line-height: 1.4; margin-bottom: 10px; letter-spacing: -.3px;
}
.detail-meta {
  display: flex; gap: 20px; font-size: var(--fs-sm); color: var(--gray-400);
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* Post layout */
.post-row { display: flex; gap: 18px; padding: 20px 0; }
.vote-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; padding-top: 2px; }
.vote-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--gray-300); background: var(--bg-white);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  transition: all var(--t);
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--orange-50); }
.vote-btn.voted { background: var(--accent); color: var(--white); border-color: var(--accent); }
.vote-btn svg { width: 16px; height: 16px; pointer-events: none; }
.vote-num { font-size: 22px; font-weight: 700; color: var(--gray-800); padding: 4px 0; text-align: center; min-width: 38px; }
.accept-mark {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--gray-300);
  transition: color var(--t);
}
.accept-mark:hover { color: var(--green-500); }
.accept-mark.on { color: var(--green-500); }

/* Post content */
.post-body { flex: 1; min-width: 0; }
.post-text {
  font-size: var(--fs-lg); line-height: 1.8; color: var(--gray-800);
  white-space: pre-wrap; word-break: break-word;
}
.post-text code {
  font-family: var(--ff-mono); font-size: 13px;
  background: var(--gray-100); padding: 2px 6px;
  border-radius: var(--r-xs); color: var(--gray-800);
}
.post-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 20px 0 0; }
.post-ft {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-light);
}
.post-actions { display: flex; gap: 10px; font-size: var(--fs-sm); }
.post-actions button {
  background: none; border: none; color: var(--gray-400);
  cursor: pointer; font-family: var(--ff); font-size: var(--fs-sm);
  padding: 0; font-weight: 500;
  transition: color var(--t);
}
.post-actions button:hover { color: var(--gray-600); }
.owner-box {
  background: var(--blue-50); border-radius: var(--r);
  padding: 10px 12px; display: flex; gap: 10px; min-width: 190px;
}
.owner-box .info { font-size: var(--fs-xs); line-height: 1.5; }
.owner-box .time { color: var(--gray-400); }
.owner-box .name { color: var(--link); font-weight: 600; }
.owner-box .rep { color: var(--gray-500); font-weight: 700; font-family: var(--ff-mono); font-size: 11px; }

/* Answers */
.section-title { font-size: 20px; font-weight: 600; color: var(--gray-800); padding: 20px 0 4px; }
.answer-divider { border-top: 1px solid var(--border); }

/* Answer form */
.answer-form-wrap { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 16px; }
.answer-form-wrap h3 { font-size: 20px; font-weight: 600; margin-bottom: 16px; color: var(--gray-800); }

/* === FORM ELEMENTS === */
.field-label { display: block; font-size: var(--fs); font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.field-hint { font-size: var(--fs-xs); color: var(--gray-400); margin-bottom: 6px; }
.field {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--r);
  font-family: var(--ff); font-size: var(--fs);
  color: var(--text); background: var(--bg-white);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.field:focus { border-color: var(--blue-500); box-shadow: var(--ring-focus); }
.field::placeholder { color: var(--gray-400); }
.field.textarea { min-height: 200px; resize: vertical; font-size: var(--fs-lg); line-height: 1.7; }
.field-error { color: var(--red-500); font-size: var(--fs-sm); margin-top: 4px; display: none; }
.field-error.visible { display: block; }

/* Tags input */
.tags-input {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--gray-300); border-radius: var(--r);
  min-height: 42px; align-items: center;
  background: var(--bg-white); cursor: text;
  transition: border-color var(--t), box-shadow var(--t);
}
.tags-input:focus-within { border-color: var(--blue-500); box-shadow: var(--ring-focus); }
.tags-input input {
  border: none; outline: none; background: none;
  font-family: var(--ff); font-size: var(--fs);
  flex: 1; min-width: 80px; color: var(--text);
  padding: 2px 0;
}
.tags-input input::placeholder { color: var(--gray-400); }

/* === MODALS === */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(16,24,40,.55);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 20px 20px;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 480px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.modal-box.lg { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 0; }
.modal-head h2 { font-size: var(--fs-xl); font-weight: 700; color: var(--gray-900); }
.modal-close {
  background: none; border: none; color: var(--gray-400);
  cursor: pointer; font-size: 20px; padding: 4px 8px;
  border-radius: var(--r-sm); transition: all var(--t);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-content { padding: 20px 24px 28px; }

/* Auth tabs */
.tab-row { display: flex; border-bottom: 1px solid var(--border-light); margin-bottom: 24px; }
.tab-btn {
  flex: 1; padding: 14px; text-align: center;
  font-size: var(--fs); font-weight: 600; color: var(--gray-400);
  cursor: pointer; border: none; background: none; font-family: var(--ff);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t);
}
.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* User menu */
.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; cursor: pointer;
  border: none; background: none; border-radius: var(--r);
  transition: background var(--t);
  font-family: var(--ff);
}
.user-trigger:hover { background: var(--gray-100); }
.user-trigger-info { text-align: left; }
.user-trigger-name { font-size: var(--fs-sm); font-weight: 700; color: var(--gray-800); display: block; }
.user-trigger-rep { font-size: var(--fs-xs); color: var(--gray-400); font-weight: 600; }
.dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  min-width: 220px; z-index: 110; overflow: hidden;
}
.drop-header { padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.drop-name { font-weight: 700; font-size: var(--fs); color: var(--gray-800); }
.drop-email { font-size: var(--fs-xs); color: var(--gray-400); margin-top: 2px; }
.drop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: var(--fs); color: var(--gray-600);
  cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-family: var(--ff);
  transition: background var(--t);
}
.drop-item:hover { background: var(--gray-50); color: var(--gray-800); }
.drop-item.danger { color: var(--red-500); }
.drop-item.danger:hover { background: var(--red-50); }

/* === PROFILE === */
.profile-wrap { padding: 28px; }
.profile-top {
  display: flex; gap: 24px; align-items: flex-start;
  padding-bottom: 28px; border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.profile-info h2 { font-size: 30px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; letter-spacing: -.3px; }
.profile-info p { color: var(--gray-400); font-size: var(--fs); }
.profile-stats { display: flex; gap: 10px; margin-top: 14px; }
.pstat {
  background: var(--gray-50); border: 1px solid var(--border-light);
  border-radius: var(--r); padding: 10px 16px; text-align: center;
}
.pstat b { display: block; font-size: 18px; font-weight: 700; color: var(--gray-800); }
.pstat span { font-size: var(--fs-xs); color: var(--gray-400); }

/* === EMPTY STATE === */
.empty { text-align: center; padding: 64px 32px; color: var(--gray-400); }
.empty h3 { font-size: 18px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.empty p { font-size: var(--fs); max-width: 400px; margin: 0 auto 20px; line-height: 1.6; }

/* === TOASTS === */
.toasts { position: fixed; top: 68px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; background: var(--gray-900); color: var(--white);
  border-radius: var(--r); font-size: var(--fs); font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 8px;
  animation: toastSlide .25s ease;
}
.toast.success::before { content: '\2713'; color: #4ade80; font-weight: 700; }
.toast.error::before { content: '\2717'; color: #f87171; font-weight: 700; }
@keyframes toastSlide { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === FOOTER === */
.footer {
  background: var(--gray-900); padding: 36px 28px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px;
}
.footer-text { color: var(--gray-500); font-size: var(--fs-sm); }
.footer-text a { color: var(--gray-400); }
.footer-text a:hover { color: var(--white); }

/* === RESPONSIVE === */
@media (max-width: 1100px) { .right-col { display: none; } }
@media (max-width: 960px) {
  .left-nav { display: none; }
  .main { border-left: none; }
  .layout { padding-left: 0; }
}
@media (max-width: 640px) {
  .search-wrap { display: none; }
  .header-inner { padding: 0 12px; }
  .main-header { padding: 16px 18px; }
  .main-header h1 { font-size: 22px; }
  .sort-bar { padding: 0 18px; }
  .q-card { padding: 14px 18px; }
  .q-stats-col { min-width: 70px; }
  .detail-page { padding: 18px; }
  .detail-title { font-size: 22px; }
  .profile-top { flex-direction: column; }
  .profile-stats { flex-wrap: wrap; }
}

/* === FORM FIELD SPACING === */
.field-label { margin-top: 12px; }
.field-label:first-child { margin-top: 0; }
.field { margin-top: 4px; }
.btn.full { width: 100%; margin-top: 12px; }

/* === SIDEBAR TAGS === */
.sidebar-card-body .tag { margin: 0; }
.sidebar-card-body p { padding: 12px 16px; margin: 0; font-size: 14px; color: var(--gray-600); line-height: 1.5; }

/* === YT CTA enhanced === */
.yt-cta { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none !important; background: #fef2f2; transition: background var(--t); border-top: 1px solid var(--border-light); }
.yt-cta:hover { background: #fee2e2; }
.yt-icon { width: 36px; height: 36px; background: #ef4444; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; flex-shrink: 0; box-shadow: 0 2px 4px rgba(239,68,68,.25); }

/* === FOOTER === */
.footer { margin-top: 40px; }
.footer-inner { flex-wrap: wrap; }

/* === QUESTION CARD hover === */
.q-card { border-left: 3px solid transparent; transition: border-color var(--t), background var(--t); }
.q-card:hover { border-left-color: var(--accent); }

/* === DETAIL back link === */
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gray-400); cursor: pointer; margin-bottom: 16px; background: none; border: none; font-family: var(--ff); }
.back-link:hover { color: var(--link); }

/* === PROFILE SETTINGS spacing === */
.profile-wrap .field { margin-top: 6px; }
.profile-wrap .field-label { margin-top: 0; margin-bottom: 2px; }

/* === CONTRIB ROW === */
.contrib-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border-light); }
.contrib-row:last-child { border-bottom: none; }
.contrib-name { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.contrib-rep { font-size: 12px; color: var(--gray-400); font-family: var(--ff-mono); }

/* === MODAL form spacing === */
.modal-content .field-label { margin-top: 14px; }
.modal-content .field-label:first-child { margin-top: 0; }
.modal-content .field { margin-top: 4px; }
.modal-content .btn.full { margin-top: 16px; }
