/* Shared styling for Luna account / auth / legal pages — matches the
   brandbook "sand" theme used by the main app. */
:root{
  --bg:#d7d1c3; --bg-card:#e1ddd2; --ink:#1a1a1a; --ink-soft:#3f3a34;
  --muted:#6b655a; --line:rgba(63,58,52,.22); --line-soft:rgba(63,58,52,.10);
  --accent:#3f3a34; --moon:#fbfaf6;
}
*{box-sizing:border-box}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:'Gotham Pro',-apple-system,Segoe UI,Roboto,sans-serif;
  line-height:1.55; -webkit-font-smoothing:antialiased;
}
a{color:var(--ink); text-decoration:none; border-bottom:1px solid var(--line)}
a:hover{border-color:var(--ink)}
.wrap{max-width:560px; margin:0 auto; padding:48px 20px 80px}
.wrap.wide{max-width:760px}
.brand{display:flex; align-items:center; gap:10px; margin-bottom:32px}
.brand .ico{width:38px;height:38px;object-fit:contain;display:block}
.brand b{font-size:20px; letter-spacing:.12em; text-transform:uppercase; font-weight:600}
h1{font-size:26px; margin:0 0 6px; font-weight:600}
h2{font-size:18px; margin:28px 0 10px; font-weight:600}
p.lead{color:var(--ink-soft); margin:0 0 26px}
.card{background:var(--bg-card); border:1px solid var(--line-soft);
  border-radius:16px; padding:22px; margin:0 0 16px}
.row{display:flex; justify-content:space-between; align-items:baseline; gap:12px;
  padding:10px 0; border-bottom:1px solid var(--line-soft)}
.row:last-child{border-bottom:0}
.row .k{color:var(--muted); font-size:14px}
.row .v{font-weight:600}
label{display:block; font-size:13px; color:var(--muted); margin:14px 0 6px}
input{width:100%; padding:12px 14px; border:1px solid var(--line);
  border-radius:10px; background:var(--moon); color:var(--ink); font:inherit;
  font-size:16px}  /* 16px keeps iOS from zooming on focus */
input:focus{outline:none; border-color:var(--ink-soft)}
/* Uniform full-width social buttons (VK / Яндекс / Google / Telegram) */
.social-btn{appearance:none; -webkit-appearance:none; box-shadow:none;
  display:block; width:100%; height:46px; text-align:center;
  border:1px solid transparent; border-radius:10px; margin:0;
  padding:0 13px; font:inherit; font-weight:600; font-size:15px; line-height:1;
  cursor:pointer; transition:opacity .15s}
.social-btn:hover{opacity:.9}
.social-btn:active{opacity:.8}
.social-btn:focus-visible{outline:2px solid var(--ink-soft); outline-offset:2px}
.btn{appearance:none; -webkit-appearance:none; box-shadow:none;
  display:inline-block; width:100%; padding:13px 16px; border:1px solid transparent; border-radius:10px;
  background:var(--ink); color:var(--bg); font:inherit; font-weight:600; cursor:pointer;
  margin-top:16px; transition:opacity .15s}
.btn:hover{opacity:.88}
.btn.ghost{background:transparent; color:var(--ink); border:1px solid var(--line)}
.btn.small{width:auto; padding:9px 14px; margin:0; font-size:14px}
.tabs{display:flex; gap:8px; margin-bottom:6px}
.tabs button{flex:1; padding:10px; border:1px solid var(--line); background:transparent;
  border-radius:10px; font:inherit; cursor:pointer; color:var(--muted)}
.tabs button.on{background:var(--ink); color:var(--bg); border-color:var(--ink)}
.muted{color:var(--muted); font-size:13px}
.err{color:#8a2f2f; font-size:14px; min-height:18px; margin-top:8px}
.ok{color:#2f6b3f}
.plans{display:grid; gap:12px; grid-template-columns:1fr 1fr}
@media(max-width:520px){.plans{grid-template-columns:1fr}}
.plan{border:1px solid var(--line); border-radius:14px; padding:16px; background:var(--moon);
  display:flex; flex-direction:column; gap:6px; cursor:pointer; transition:border-color .15s}
.plan:hover{border-color:var(--ink-soft)}
.plan .price{font-size:22px; font-weight:600}
.plan .name{font-size:14px; color:var(--muted)}
.pill{display:inline-block; font-size:12px; padding:3px 10px; border-radius:999px;
  background:rgba(63,58,52,.10); color:var(--ink-soft)}
.pill.on{background:#2f6b3f; color:#fff}
.pill.off{background:rgba(63,58,52,.14)}
.foot{margin-top:34px; font-size:13px; color:var(--muted); text-align:center}
.site-footer{margin-top:34px; padding-top:18px; border-top:1px solid var(--line); text-align:center}
.site-footer .links{font-size:13px; margin:0 0 8px}
.site-footer .links .sep{margin:0 8px; color:var(--muted)}
.site-footer .legal{margin:0; font-size:11.5px; line-height:1.6; color:var(--muted)}
.tg-wrap{margin-top:18px; display:flex; justify-content:center}
hr{border:0; border-top:1px solid var(--line-soft); margin:22px 0}
.legal p{color:var(--ink-soft)} .legal h2{margin-top:26px}

/* ── Account dashboard ──────────────────────────────────────────────────── */
.dash-top{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:26px}
.dash-right{display:flex; align-items:center; gap:12px}
.via-chip{font-size:12px; color:var(--ink-soft); background:rgba(63,58,52,.10);
  border-radius:999px; padding:5px 12px}
h1 .wave{font-weight:400}
.note{border-radius:14px; padding:16px 18px; margin:0 0 16px; border:1px solid var(--line-soft)}
.note-ok{background:#dfe8dc; border-color:#2f6b3f; color:#234b2d}
.note-warn{background:#efe7d2; border-color:#b08a2f}

.stat-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:22px 0}
.stat{background:var(--bg-card); border:1px solid var(--line-soft); border-radius:16px;
  padding:18px 16px; text-align:center}
.stat.stat-on{border-color:#2f6b3f}
.stat .num{font-size:26px; font-weight:700; line-height:1.1; display:flex; align-items:center; justify-content:center; gap:7px}
.stat .lbl{font-size:12px; color:var(--muted); margin-top:6px; letter-spacing:.02em}
.on-dot{width:9px; height:9px; border-radius:50%; background:#2f6b3f; display:inline-block}

.sec-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:30px 0 12px}
.sec-head h2{margin:0}
h2.mt{margin-top:30px}

.tariff-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:12px}
.tariff{position:relative; background:var(--bg-card); border:1px solid var(--line-soft);
  border-radius:16px; padding:20px 16px; display:flex; flex-direction:column; gap:6px}
.tariff.feat{border-color:var(--ink); background:linear-gradient(180deg,#e7e2d5,#ded8c9)}
.tariff .badge{position:absolute; top:-10px; left:50%; transform:translateX(-50%);
  background:var(--ink); color:var(--bg); font-size:11px; font-weight:600;
  padding:4px 12px; border-radius:999px; white-space:nowrap}
.tariff .t-title{font-size:14px; color:var(--ink-soft); min-height:34px}
.tariff .price{font-size:24px; font-weight:700}
.tariff .price .per{font-size:14px; font-weight:400; color:var(--muted)}
.tariff .t-sub{font-size:12px; color:var(--muted); min-height:30px}
.tariff .t-buy{margin-top:8px; padding:11px}

@media(max-width:720px){
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .tariff-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:430px){
  .tariff-grid{grid-template-columns:1fr}
}

/* Expandable answer history */
.hist-item{border-bottom:1px solid var(--line-soft)}
.hist-item:last-child{border-bottom:0}
.hist-head{appearance:none;-webkit-appearance:none; display:flex; justify-content:space-between;
  align-items:center; gap:12px; width:100%; background:none; border:0; margin:0;
  padding:12px 2px; font:inherit; color:var(--ink); cursor:pointer; text-align:left}
.hist-head:hover{color:var(--ink-soft)}
.hist-chev{color:var(--muted); flex:0 0 auto}
.hist-body{padding:2px 2px 16px; color:var(--ink-soft); line-height:1.7}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width:520px){
  .wrap{ padding:28px 16px 64px; }
  h1{ font-size:22px; }
  h2{ font-size:16px; }
  .card{ padding:18px; border-radius:14px; }
  .brand{ margin-bottom:24px; }
  .row{ flex-wrap:wrap; gap:4px; }
  .plans{ grid-template-columns:1fr; }
  .tabs button{ padding:11px 8px; }
}
@media (max-width:380px){
  .wrap{ padding:22px 12px 56px; }
  h1{ font-size:20px; }
}
