/* Application layout uses the landing primitives in base.css. */
.wrap {
  width:min(1120px,calc(100% - 40px));
  margin:auto;
  padding:var(--space-8) 0;
}
.topbar {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--space-3) var(--space-6);
  padding-block:var(--space-5);
  border-bottom:1px solid var(--line);
}
.topbar nav {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--space-2) var(--space-5);
}
.topbar .languages {
  margin-left:auto;
  gap:0;
}
.topbar nav:last-child {
  width:100%;
}
.topbar a,.topbar button {
  min-height:44px;
  display:inline-flex;
  align-items:center;
}
.topbar a:hover {
  color:var(--accent);
}
.inline {
  display:inline;
}
.muted,.hint,.small,.src {
  color:var(--muted);
}
.small,.hint,.src {
  font-size:13px;
}
.break {
  overflow-wrap:anywhere;
}
a:hover {
  text-decoration:underline;
}
h1 {
  font-size:clamp(32px,4vw,52px);
  margin-bottom:var(--space-6);
}
h2 {
  font-size:26px;
  margin-bottom:var(--space-5);
}
h3 {
  font-size:var(--text-heading);
}
.card {
  padding:var(--space-6);
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  margin-bottom:var(--space-6);
  min-width:0;
}
.row-between {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:var(--space-4);
  flex-wrap:wrap;
}
.hero {
  background:transparent;
  border:0;
  padding:30px 0 48px;
}
.hero h1 {
  max-width:850px;
  font-size:clamp(40px,5vw,64px);
}
.hero>p {
  max-width:700px;
}
.urlform {
  display:flex;
  gap:var(--space-3);
  margin:28px 0 16px;
}
.urlform input {
  flex:1;
  min-width:0;
  min-height:64px;
  font-size:18px;
}
.urlform .btn {
  min-width:180px;
}
button.link {
  background:none;
  border:0;
  color:var(--muted);
  padding:var(--space-2) 0;
}
form {
  margin-block:16px;
}
form.inline {
  margin:0;
}
.alert {
  padding:var(--space-4);
  background:var(--tint);
  border:1px solid var(--line);
  margin-block:16px;
}
.alert.bad {
  color:var(--negative);
}
.login {
  max-width:520px;
  margin:5vh auto;
}
.google-login {
  width:100%;
  margin:16px 0;
}
.login .btn {
  width:100%;
}
.reqlist {
  list-style:none;
  padding:0;
  margin:16px 0 0;
}
.reqlist li {
  border-top:1px solid var(--line);
}
.req {
  display:flex;
  align-items:center;
  gap:var(--space-4);
  padding:var(--space-5) 0;
  min-height:88px;
}
.req:hover {
  background:var(--bg);
  text-decoration:none;
}
.thumb {
  width:72px;
  height:54px;
  background:var(--tint);
  flex:none;
  border-radius:4px;
  overflow:hidden;
}
.thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.req-main {
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}
.req-main b {
  overflow-wrap:anywhere;
  font-weight:500;
}
.req-side {
  text-align:right;
  font-size:14px;
}
.status-label,.badge,.acc {
  display:inline-block;
  font-size:13px;
  color:var(--muted);
  margin:4px 8px 4px 0;
}
.good,.mid {
  color:var(--accent);
}
.bad {
  color:var(--negative);
}
.head {
  display:grid;
  grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
  gap:var(--space-8);
}
.gallery,.headinfo {
  min-width:0;
}
.gallery .main {
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
}
.noimg {
  display:grid;
  place-items:center;
  background:var(--tint);
  color:var(--muted);
}
.head h1 {
  font-size:32px;
  margin:16px 0;
}
.price {
  font-size:30px;
  font-weight:500;
}
.pln {
  font-size:15px;
  color:var(--muted);
}
.facts {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--space-4);
  margin-top:var(--space-6);
}
.facts div {
  border-top:1px solid var(--line);
  padding-top:var(--space-3);
  display:flex;
  flex-direction:column;
  overflow-wrap:anywhere;
}
.facts div>span:empty {
  display:none;
}
.facts b {
  font-size:14px;
  font-weight:500;
}
.facts small {
  font-size:var(--text-small);
  color:var(--muted);
}
.settings-form {
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-4);
  align-items:end;
}
.settings-form label {
  flex:1 1 180px;
  margin:0;
}
.settings-form p {
  width:100%;
  margin:0;
}
.settings-form input,.settings-form select {
  min-width:0;
}
summary {
  flex-wrap:wrap;
  gap:var(--space-2);
  padding-block:14px;
  min-height:48px;
}
summary:hover {
  color:var(--accent);
}
summary .link {
  color:var(--accent);
}
details[open]>summary {
  margin-bottom:var(--space-3);
}
details p {
  padding:0;
}
.podium {
  display:flex;
  gap:var(--space-8);
  flex-wrap:wrap;
}
.place {
  display:flex;
  flex-direction:column;
  gap:var(--space-1);
  flex:1 1 150px;
  border-top:1px solid var(--line);
  padding-top:var(--space-4);
}
.place b {
  font-weight:500;
}
.place .m {
  font-size:26px;
}
.pflag:empty {
  display:none;
}
.pflag {
  color:var(--muted);
  font-size:var(--text-small);
}
.cname {
  display:flex;
  gap:var(--space-3);
  align-items:start;
}
.cname b {
  font-weight:500;
}
.m {
  font-size:23px;
  font-weight:600;
  white-space:nowrap;
}
.unk {
  color:var(--muted);
}
.mcell small {
  display:block;
  font-size:11px;
}
.taxlines,.comps {
  padding-left:16px;
}
.taxlines li,.comps li {
  margin-bottom:var(--space-3);
}
.taxlines b {
  white-space:nowrap;
}
.taxlines small {
  display:block;
}
.grid2 {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:var(--space-6);
}
.flags {
  list-style:none;
  padding:0;
}
.flags li {
  border-top:1px solid var(--line);
  padding:var(--space-4) 0;
}
.flags b {
  font-weight:500;
}
q {
  display:block;
  color:var(--muted);
  font-size:14px;
  margin-top:var(--space-2);
  overflow-wrap:anywhere;
}
.desc {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  margin-bottom:var(--space-6);
}
.carousel {
  position:relative;
  overflow:hidden;
  border-radius:4px;
}
.track {
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.track img {
  scroll-snap-align:center;
}
.carousel .nav {
  position:absolute;
  top:42%;
  width:44px;
  height:44px;
  padding:0;
  background:var(--paper);
  color:var(--ink);
  border:1px solid var(--line);
  font-size:26px;
}
.prev {
  left:8px;
}
.next {
  right:8px;
}
.count {
  position:absolute;
  top:8px;
  right:8px;
  background:var(--paper);
  padding:var(--space-1) var(--space-2);
  font-size:var(--text-small);
}
.dots {
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  background:var(--paper);
}
.dots button {
  width:44px;
  height:44px;
  min-height:44px;
  border:0;
  border-radius:0;
  background:var(--paper);
  padding:0;
}
.dots button:after {
  content:'';
  width:6px;
  height:6px;
  background:var(--line);
}
.dots button.on:after {
  background:var(--accent);
}
table {
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  margin-top:var(--space-6);
}
th,td {
  text-align:left;
  padding:14px 10px;
  border-top:1px solid var(--line);
  overflow-wrap:anywhere;
}
th {
  font-size:var(--text-small);
  color:var(--muted);
  font-weight:400;
}
table a {
  color:var(--accent);
  display:inline-flex;
  align-items:center;
  min-height:44px;
}
footer {
  font-size:13px;
  color:var(--muted);
  border-top:1px solid var(--line);
}
footer a {
  display:inline-flex;
  min-height:44px;
  align-items:center;
}
.loading-rows {
  margin-bottom:var(--space-6);
}
.loading-rows i {
  display:block;
  height:52px;
  border-top:1px solid var(--line);
  background:var(--tint);
  animation:row-fill 1.8s ease-in-out 2;
}
.loading-rows i:nth-child(2) {
  animation-delay:.15s;
}
.loading-rows i:nth-child(3) {
  animation-delay:.3s;
}
.loading-rows i:nth-child(4) {
  animation-delay:.45s;
}
@keyframes row-fill {
  0%,100%{opacity:.35}50%{opacity:1};
}
@media(max-width:760px) {
  .shell {
    width:calc(100% - 40px);
  }
  .topbar .wordmark {
    font-size:19px;
  }
  .topbar .languages {
    margin-left:0;
  }
  .topbar {
    gap:var(--space-2);
  }
  .topbar nav:last-child {
    gap:var(--space-1) var(--space-4);
    font-size:14px;
  }
  .wrap {
    padding-top:var(--space-6);
  }
  .card {
    padding:var(--space-5);
  }
  .urlform {
    flex-direction:column;
  }
  .head,.grid2 {
    grid-template-columns:1fr;
  }
  .head {
    gap:var(--space-6);
  }
  .facts {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .req {
    flex-wrap:wrap;
    gap:var(--space-3);
  }
  .req-side {
    width:100%;
    padding-left:84px;
    text-align:left;
  }
  table,tbody,tr,td {
    display:block;
  }
  thead {
    display:none;
  }
  tr {
    border-top:1px solid var(--line);
    padding-block:var(--space-3);
  }
  td {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);
    gap:var(--space-3);
    border:0;
    padding:var(--space-2) 0;
  }
  td:before {
    content:attr(data-label);
    font-size:var(--text-small);
    color:var(--muted);
  }
  .podium {
    gap:var(--space-4);
  }
  .place {
    flex-basis:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .place .m {
    text-align:right;
  }
  .place small {
    grid-column:1/-1;
  }
  .settings-form>* {
    max-width:100%;
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
  }
}
.report-table {
  margin:24px 0 0;
  table-layout:fixed;
}
.report-table th,.report-table td {
  vertical-align:top;
}
.report-table th:first-child {
  width:26%;
}
.report-table .cname {
  display:table-cell;
}
.report-table tbody th>span {
  vertical-align:top;
}
.report-table td b {
  font-weight:500;
}
.report-table .m {
  font-weight:600;
}
.report-table .margin {
  white-space:normal;
}
.report-table details {
  text-align:left;
}
.report-table summary {
  font-size:var(--text-small);
  min-height:44px;
}
.report-table a {
  color:var(--accent);
  min-height:44px;
  display:inline-flex;
  align-items:center;
}
.report-table .small {
  font-size:var(--text-small);
}
.report-table .acc {
  font-size:11px;
}
.report-table .mcell small {
  font-weight:400;
}
.report-table .unk {
  color:var(--muted);
}
/* Report cards retain a full country heading and a separate margin column. */
.report-table th,.report-table td { padding:10px; overflow-wrap:normal; word-break:normal; }
.report-table .cname>span:last-child { display:inline; }
.report-table .cname b { white-space:nowrap; }
.report-table .cname small,.report-table .cname .status-label { display:block; margin:0; }
.report-table .acc { margin:0 0 0 6px; }
.report-table summary { padding-block:4px; }
.report-table details:not([open]) { display:inline-block; margin-right:10px; }
.report-table td>div:last-child { display:inline-block; }
.report-table .small.muted { display:block; }
.dots { flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; scrollbar-width:thin; }
.dots button { flex:0 0 44px; }
@media(min-width:761px) {
  .report-table summary,.report-table a { min-height:28px; }
}
@media(max-width:760px) {
  .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; }
  .topbar .languages { margin-left:0; width:auto; flex-wrap:nowrap; }
  .topbar .languages a { padding-inline:5px; font-size:11px; }
  .topbar .wordmark { font-size:17px; gap:5px; }
  .topbar .wordmark svg { width:24px; flex:none; }
  .topbar .app-nav { grid-column:1/-1; display:flex; flex-wrap:nowrap; justify-content:space-between; gap:8px; font-size:12px; white-space:nowrap; }
  .nav-balance { color:var(--muted); font-size:12px; }
  .head h1,.req-main b { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .head h1 { font-size:26px; }
  .report-table,.report-table tbody { display:block; width:100%; }
  .report-table tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px 12px; padding:16px 0; position:relative; }
  .report-table tbody .cname { grid-column:1/-1; grid-row:1; display:flex; align-items:center; width:100%; min-height:44px; padding:0 0 0 0; padding-right:36%; border:0; gap:8px; font-size:13px; }
  .report-table .cname b { white-space:normal; overflow-wrap:normal; word-break:normal; hyphens:none; }
  .report-table .country-code { flex:none; }
  .report-table .cname>span:last-child { min-width:0; }
  .report-table td { display:block; min-width:0; border:0; padding:0; }
  .report-table td:before { display:block; margin-bottom:4px; }
  .report-table td:nth-child(2) { grid-column:1; grid-row:2; }
  .report-table td:nth-child(3) { grid-column:2; grid-row:2; }
  .report-table .mcell { grid-column:2; grid-row:1; justify-self:end; text-align:right; max-width:100%; }
  .report-table .margin:before { display:none; }
  .report-table .m { font-size:20px; }
  .report-table .small { font-size:11px; }
  .report-table .acc { display:block; margin:0; }
  .report-table summary,.report-table a { min-height:44px; }
  .report-table .mcell small { font-size:10px; overflow-wrap:normal; }
}
.app-nav .nav-balance { margin-left:auto; color:var(--muted); font-size:13px; white-space:nowrap; }
@media (max-width:760px) { .app-nav .nav-balance { font-size:12px; } }

/* Переключатель языков: одинаковая ячейка, текст строго по центру. */
.languages, .topbar nav.languages, .topbar nav.languages:last-child { display:flex; gap:2px; flex:none; width:auto; justify-content:flex-end; }
.languages a { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; width:40px; min-width:40px; height:40px; min-height:40px; padding:0; margin:0; line-height:1; text-align:center; letter-spacing:.02em; }
@media (max-width:420px) { .languages a { width:30px; min-width:30px; } }

.topup-form { max-width: 42rem; }
.topup-form label { display: block; margin-block: 1rem; }
.topup-form input, .topup-form select, .topup-form textarea { display: block; width: 100%; box-sizing: border-box; }
.topup-request { padding-block: 1.5rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.topup-request form { margin-block: .75rem; }

/* Пополнение: в шапке на телефоне хватает ссылки с балансом. */
.topbar .app-nav .btn { min-height:40px; padding-block:8px; }
@media (max-width:760px) { .topbar .app-nav .btn { display:none; } }
.wrap .btn + small, .wrap .btn + p { display:block; margin-top:16px; }

.topup-layout { display: grid; gap: 2rem; align-items: start; }
.topup-layout > * { min-width: 0; }
.topup-layout .topup-form { max-width: none; }
.topup-plans { border: 0; padding: 0; margin: 0; min-width: 0; }
.topup-plans legend { font-size: 1.25rem; font-weight: 500; }
.plan-card { display: flex; gap: .75rem; padding: 1rem; margin-bottom: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.plan-card input, .plan-any input { accent-color: var(--accent); flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: .3rem; }
.plan-content { display: grid; flex: 1; min-width: 0; }
.plan-heading { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; justify-content: space-between; }
.plan-price { font-size: 2rem; line-height: 1.3; font-weight: 500; margin-top: .25rem; }
.plan-rate, .plan-facts, .plan-note { color: var(--muted); font-size: .875rem; }
.plan-facts { display: grid; margin-top: .5rem; }
.plan-facts > span::before { content: '•'; margin-right: .5rem; }
.plan-popular { border-color: var(--accent); }
.plan-badge { color: var(--accent); font-size: .75rem; }
.plan-card:has(input:checked) { background: var(--tint); border-color: var(--accent); outline: 1px solid var(--accent); }
.plan-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.plan-any { display: flex; gap: .75rem; align-items: center; min-height: 44px; cursor: pointer; }
.plan-note { margin-top: .75rem; }
@media (min-width: 1000px) {
  .topup-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .topup-plans { grid-row: auto; }
}
.plan-card input, .plan-any input { min-height: 0; padding: 0; }
.plan-content { color: var(--ink); }
.plan-price { color: var(--ink); }

/* Раскрывающиеся блоки отчёта: явный признак кликабельности. */
.report-table summary { color:var(--accent); justify-content:flex-start; gap:6px; cursor:pointer; }
.report-table summary::after { content:""; flex:none; width:6px; height:6px; margin-left:2px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-2px) rotate(45deg); transition:transform .15s; }
.report-table details[open]>summary::after { transform:translateY(1px) rotate(-135deg); }
summary .link { font-size:inherit; font-weight:500; text-decoration:underline; text-underline-offset:3px; white-space:nowrap; }
summary .link::before { content:"✎"; display:inline-block; margin-right:4px; text-decoration:none; }
