/* 1CCoder cabinet (lk.1ccoder.ru). Tokens, header and footer are copied from the site theme
   (themes/1ccoder/assets/custom.css) so both look the same; fonts are served from here. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexSans-Regular-Cyrillic.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexSans-Regular-Latin1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexSans-Medium-Cyrillic.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexSans-Medium-Latin1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexSans-SemiBold-Cyrillic.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexSans-SemiBold-Latin1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-Regular-Cyrillic.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-Regular-Latin1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-Medium-Cyrillic.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-Medium-Latin1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexMono-SemiBold-Cyrillic.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexMono-SemiBold-Latin1.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF; }

:root {
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #FDFCFC;
  --bg-weak: #F8F7F7;
  --border: #D0CFCE;
  --text: #646262;
  --text-weak: #9A9898;
  --strong: #201D1D;
  --strong-lift: #302C2C;
  --accent: #F8FAC7;
  --accent-strong: #E8EC9A;
  --radius: 14px;
  --code-fn: #0000FF;
  --code-punct: #FF0000;
  --code-bg: #EFF0F1;
  --warn-bg: #FBEFEC;
  --warn-border: #EDCDC5;
  --warn-text: #7A2E22;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--strong); }
[hidden] { display: none !important; }

.lp-container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------- Header (as on the site) ------------------------------- */
.lp-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.lp-header .lp-container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.lp-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--strong); text-decoration: none; }
.lp-logo-mark {
  height: 34px; display: inline-flex; align-items: center; padding: 0 10px;
  background: var(--code-bg); border: 1px solid var(--strong); border-radius: 9px;
  font-family: var(--mono); font-weight: 600; font-size: clamp(10px, 2.4vw, 13px);
  color: var(--code-fn); letter-spacing: -0.5px; white-space: nowrap;
}
.lp-logo-mark .lp-punct { color: var(--code-punct); }
.lp-nav { display: flex; align-items: center; gap: 32px; }
.lp-nav a { font-family: var(--mono); font-size: 16px; line-height: 24px; color: var(--strong); text-decoration: none; }
.lp-nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lp-kicker { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.03em; color: var(--text-weak); }
.lp-kicker::before { content: "// "; }

/* ------------------------------- Footer (as on the site) ------------------------------- */
.lp-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 64px; }
.lp-footer .lp-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.lp-footer-links { display: flex; gap: 20px; font-family: var(--mono); font-size: 13px; }
.lp-footer-links a { text-decoration: none; }
.lp-footer-copy { font-size: 13px; color: var(--text-weak); }
.lp-footer-legal { flex-basis: 100%; font-size: 12px; line-height: 1.7; color: var(--text-weak); }
.lp-footer-legal p { margin: 0; }
.lp-footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lp-footer-legal a:hover { color: var(--text); }

/* ------------------------------- Cabinet ------------------------------- */
.lk { padding-top: 56px; min-height: 60vh; }
.lk a:not(.lk-btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lk-title {
  margin: 8px 0 16px; font-family: var(--mono); font-weight: 500; color: var(--strong);
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.15; letter-spacing: -0.02em;
}
.lk-title--sm { font-size: clamp(20px, 3vw, 28px); margin: 4px 0 0; overflow-wrap: anywhere; }
.lk-lead { max-width: 620px; margin: 0 0 32px; font-size: 17px; }
.lk-muted { color: var(--text-weak); font-size: 14px; }

.lk-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 24px; }
.lk-auth-panel { max-width: 460px; }

.lk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.lk-section { padding: 32px 0; border-top: 1px solid var(--border); }
.lk-h2 { margin: 0 0 20px; font-family: var(--mono); font-weight: 500; font-size: 22px; color: var(--strong); letter-spacing: -0.01em; }
.lk-h3 { margin: 24px 0 12px; font-family: var(--mono); font-weight: 500; font-size: 15px; color: var(--strong); }
.lk-actions { margin: 20px 0 0; }

/* Tabs */
.lk-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-weak); }
.lk-tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 5px; font-family: var(--mono); font-size: 14px; color: var(--text); cursor: pointer; }
.lk-tab[aria-selected="true"] { background: var(--bg); color: var(--strong); box-shadow: 0 0 0 1px var(--border); }

/* Forms */
.lk-form { display: grid; gap: 16px; }
.lk-register-only { display: grid; gap: 16px; }
.lk-field { display: grid; gap: 6px; }
.lk-field span { font-size: 14px; color: var(--strong); }
.lk-field em { font-style: normal; color: var(--text-weak); }
.lk-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--strong); font: inherit; font-size: 16px;
}
.lk-field input:focus { outline: none; border-color: var(--strong); box-shadow: 0 0 0 3px var(--accent); }
.lk-code-input { font-family: var(--mono) !important; letter-spacing: 0.2em; font-size: 20px !important; }
.lk-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.lk-check input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--strong); }
.lk-form-note { margin: 0; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--text-weak); }
.lk-code-sent { margin: 0; font-size: 14px; }
.lk-code-sent strong { color: var(--strong); overflow-wrap: anywhere; }
.lk-link { justify-self: center; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Buttons (as the site's checkout) */
.lk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border: 1px solid var(--border); border-radius: 4px;
  background: transparent; color: var(--strong);
  font-family: var(--mono); font-size: 15px; font-weight: 500; line-height: 24px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.lk-btn:hover { border-color: var(--strong); background: var(--bg-weak); }
.lk-btn--primary { border-color: var(--strong); background: var(--strong); color: var(--bg); }
.lk-btn--primary:hover { border-color: var(--strong-lift); background: var(--strong-lift); }
.lk-btn--wide { width: 100%; padding: 12px 16px; }
.lk-btn--danger { border-color: var(--warn-text); color: var(--warn-text); }
.lk-btn--danger:hover { background: var(--warn-bg); border-color: var(--warn-text); }
.lk-btn:disabled, .lk-btn:disabled:hover { opacity: .45; cursor: not-allowed; }
.lk-btn:focus-visible, .lk-tab:focus-visible, .lk-link:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-strong); }

/* Notices */
.lk-notice { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-weak); font-size: 14px; color: var(--strong); }
.lk-notice--ok { border-color: var(--accent-strong); background: var(--accent); }
.lk-notice--warn { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn-text); }
.lk-welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; background: var(--accent); border-color: var(--accent-strong); }
.lk-welcome p { margin: 0; max-width: 620px; color: var(--strong); }

/* Stats */
.lk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lk-stat { display: grid; gap: 4px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.lk-stat:first-child { background: var(--accent); border-color: var(--accent-strong); }
.lk-stat-label { font-size: 13px; color: var(--text); }
.lk-stat-value { font-family: var(--mono); font-size: 36px; font-weight: 500; line-height: 1.1; color: var(--strong); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lk-stat-value--sm { font-size: 24px; }

/* Tables */
.lk-table-wrap { margin-top: 20px; overflow-x: auto; }
.lk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lk-table caption { caption-side: bottom; text-align: left; padding-top: 10px; font-size: 13px; color: var(--text-weak); }
.lk-table th { text-align: left; font-weight: 500; font-size: 12px; font-family: var(--mono); color: var(--text-weak); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); white-space: nowrap; }
.lk-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--bg-weak); color: var(--strong); vertical-align: top; }
.lk-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lk-table tr.is-empty td { color: var(--text-weak); }
.lk-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-family: var(--mono); font-size: 11px; line-height: 18px; background: var(--bg-weak); border: 1px solid var(--border); color: var(--text); vertical-align: 1px; }

/* Daily bars */
.lk-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.lk-bar { flex: 1 1 0; min-width: 3px; background: var(--strong); border-radius: 2px 2px 0 0; position: relative; }
.lk-bar.is-zero { background: var(--border); height: 2px !important; }
.lk-bar:hover { background: var(--strong-lift); outline: 2px solid var(--accent-strong); }
.lk-bars-total { margin: 8px 0 0; }

/* Account */
.lk-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0 0 24px; font-size: 15px; }
.lk-dl dt { color: var(--text-weak); }
.lk-dl dd { margin: 0; color: var(--strong); overflow-wrap: anywhere; }
.lk-danger { border: 1px solid var(--warn-border); border-radius: var(--radius); }
.lk-danger summary { padding: 14px 20px; cursor: pointer; font-family: var(--mono); font-size: 14px; color: var(--warn-text); }
.lk-danger-body { padding: 0 20px 20px; font-size: 14px; }
.lk-danger-body ul { padding-left: 20px; }
.lk-danger-body li { margin-bottom: 6px; }

.lk-loading { padding: 80px 0; text-align: center; }

@media (max-width: 720px) {
  .lk-stats { grid-template-columns: 1fr; }
  .lk-stat-value { font-size: 30px; }
}
@media (max-width: 560px) {
  .lp-nav { gap: 12px; }
  .lp-nav a { font-size: 11px; }
  .lp-header .lp-container { flex-wrap: wrap; height: auto; min-height: 64px; row-gap: 4px; padding-top: 8px; padding-bottom: 8px; }
  .lk { padding-top: 32px; }
  .lk-panel { padding: 18px; }
}
