:root{
  /* Light theme (default) */
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #14161a;
  --muted: #6b7280;
  --border: rgba(20,22,26,.10);
  --shadow: 0 6px 22px rgba(20,22,26,.06);
  --radius: 14px;
  --gap: 14px;
  --grid-line: rgba(20,22,26,.06);
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #121212;
  --card: #1e1e1e;
  --text: #e4e6eb;
  --muted: #a0a0a0;
  --border: rgba(255,255,255,.1);
  --shadow: 0 6px 22px rgba(0,0,0,.2);
  --grid-line: rgba(255,255,255,.03);
}

*{ box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  font-size: 16px;
  line-height: 1.5;

  /* лёгкая "клетка" */
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;

  /* без прокрутки */
  overflow: auto;
}

.app{
  height: 100vh;
  padding: 28px 40px;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 18px;
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
}

.topbar{
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .topbar {
  background: rgba(30,30,30,.7);
}

.themebtn {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
}

.themebtn:hover {
  background: rgba(0,0,0,.05);
}

[data-theme="dark"] .themebtn:hover {
  background: rgba(255,255,255,.1);
}

.themebtn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.langbtn{
  border: 1px solid transparent;
  background: transparent;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .2px;
}
.langbtn[aria-pressed="true"]{
  color: var(--text);
  background: #fff;
  border-color: var(--border);
  box-shadow: 0 2px 10px rgba(20,22,26,.06);
}

[data-theme="dark"] .langbtn {
  color: #a0a0a0;
}

[data-theme="dark"] .langbtn[aria-pressed="true"] {
  background: #333;
  color: #fff;
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.col{
  display: grid;
  gap: var(--gap);
  min-height: 0;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

.cardhead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.h{
  margin: 0;
  font-size: 18px;
  font-weight: 750;
}
.pill{
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.7);
  white-space: nowrap;
}

[data-theme="dark"] .pill {
  background: rgba(40,40,40,.8);
  color: #e4e6eb;
  border-color: rgba(255,255,255,.2);
}

.sub{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

ol{
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.divider{
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.two{
  display: flex;
  align-items: stretch;
}

.two .left-col, .two .right-col {
  flex: 1;
  padding: 0 15px;
}

.vertical-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 10px 0;
}
.box{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.6);
}

[data-theme="dark"] .box {
  background: rgba(40,40,40,.6);
}
.box h4{
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .4px;
  text-transform: uppercase;
}

.list{
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

[data-theme="dark"] .row {
  background: #2a2a2a;
}
.row span:last-child{ color: var(--muted); }

/* ВАКАНСИИ: три карточки вплотную, без пробела */
.vacancies{
  display: grid;
  gap: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden; /* чтобы радиус применялся к "общему" блоку */
  border: 1px solid var(--border);
  background: var(--card);
}
.vacancy{
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 14px 14px 12px;
}
.vacancy + .vacancy{
  border-top: 1px solid var(--border);
}

/* CONTACTS: две колонки (название + кликабельный username + копировать) */
.contactlist{
  display: grid;
  gap: 10px;
}

.contactlist h4 {
  margin: 10px 0 5px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.messenger-type {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  display: block;
  text-align: center;
}

.contactmain {
  text-align: center;
}

.contactname {
  text-align: center;
}
.contactitem{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;

  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
}

[data-theme="dark"] .contactitem {
  background: #2a2a2a;
}
.contactmain{
  min-width: 0;
  display: grid;
  gap: 6px;
}
.contactname{
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
}
.contactuser{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
}
.contactuser span{
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contactuser:hover{
  color: var(--text);
  text-decoration: underline;
}
.copybtn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 8px;
  cursor: pointer;
  font-weight: 650;
  line-height: 1;
  transition: transform .08s ease, box-shadow .08s ease;
  min-width: 44px;
}

[data-theme="dark"] .copybtn {
  background: rgba(50,50,50,.9);
}
.copybtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(20,22,26,.08);
}
.copybtn:active{ transform: translateY(0); }
.copybtn[disabled]{ opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

/* адаптив: на мобилке лучше разрешить скролл */
@media (max-width: 980px){
  body{ overflow: auto; }
  .app{
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }
  .topbar{ position: sticky; top: 12px; right: auto; margin-left: auto; width: fit-content; }
}

@media (max-width: 480px){
  .app{
    padding: 20px 12px;
  }
}
