@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url(fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url(fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: block;
  src: url(fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: block;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light dark;
    --bg: #F4F2EE;
    --panel: #FFFFFF;
    --hover: #E6E3DD;
    --field: #FFFFFF;
    --line: #E2DED7;
    --line-2: #D3CFC7;
    --ink: #141312;
    --ink-2: #3B3834;
    --muted: #635E57;
    --dim: #A39E96;
    --accent: #4A5899;
    --btn: #4A5899;
    --on-btn: #F4F2EE;
    --pink: #A6505F;
    --green: #4E7A45;
    --font: Onest, system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #141312;
        --panel: #1C1B19;
        --hover: #26241F;
        --field: #0F0E0D;
        --line: #2C2A27;
        --line-2: #3B3834;
        --ink: #EEECE8;
        --ink-2: #C0BBB3;
        --muted: #9C978F;
        --dim: #57524B;
        --accent: #7B93FF;
        --btn: #7B93FF;
        --on-btn: #141312;
        --pink: #E59AA7;
        --green: #8CC79A;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #141312;
    --panel: #1C1B19;
    --hover: #26241F;
    --field: #0F0E0D;
    --line: #2C2A27;
    --line-2: #3B3834;
    --ink: #EEECE8;
    --ink-2: #C0BBB3;
    --muted: #9C978F;
    --dim: #57524B;
    --accent: #7B93FF;
    --btn: #7B93FF;
    --on-btn: #141312;
    --pink: #E59AA7;
    --green: #8CC79A;
}

:root[data-theme="light"] {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
}

code,
pre {
    font-family: var(--mono);
}

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 32px;
    padding: 20px 0 16px;
}

.hc-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.hc-wordmark {
    margin: 0;
    font: 800 var(--hc-size, 24px)/1 var(--mono);
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.hc-glob {
    position: relative;
    display: inline-block;
    width: 1.6em;
    height: 1em;
    vertical-align: -0.2em;
}

.hc-glob::before,
.hc-glob::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hc-glob::before {
    background: currentColor;
    -webkit-mask: url("mark/glob-brackets.svg") center / contain no-repeat;
    mask: url("mark/glob-brackets.svg") center / contain no-repeat;
}

.hc-glob::after {
    background: var(--accent);
    -webkit-mask: url("mark/glob-star.svg") center / contain no-repeat;
    mask: url("mark/glob-star.svg") center / contain no-repeat;
    transition: transform .6s cubic-bezier(.7, 0, .3, 1);
}

.hc-brand:hover .hc-glob::after,
.hc-brand:focus-within .hc-glob::after {
    transform: rotate(60deg);
}

@media (prefers-reduced-motion: reduce) {
    .hc-glob::after {
        transition: none;
    }
}

.hc-settings {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
}

.hc-pending body {
    visibility: hidden;
}

.hc-gear {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
}

.hc-gear:hover {
    border-color: var(--accent);
}

.hc-gear svg {
    width: 20px;
    height: 20px;
}

.hc-sets {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 240px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.hc-sets.open {
    display: flex;
}

.hc-user {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
}

.hc-who {
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hc-sets a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--ink);
    font: 500 15px var(--font);
    text-decoration: none;
}

.hc-sets a:hover {
    background: var(--hover);
}

.hc-sets .hc-out {
    color: var(--pink);
}

.hc-sets button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: none;
    color: var(--ink);
    font: 500 15px var(--font);
    text-align: left;
    cursor: pointer;
}

.hc-sets button:hover {
    background: var(--hover);
}

.hc-ico {
    flex: none;
    display: flex;
    justify-content: center;
    width: 26px;
}

.hc-ico svg {
    width: 22px;
    height: 22px;
}

.hc-ico .flag {
    width: 26px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

.hc-val {
    margin-left: auto;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.label {
    color: var(--muted);
    font: 500 13px/1.3 var(--font);
}

.panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
}

h2 {
    margin: 0 0 8px;
    font: 600 clamp(22px, 5vw, 28px)/1.2 var(--font);
    letter-spacing: -0.01em;
}

.lead {
    margin: 0 0 20px;
    color: var(--ink-2);
}

.btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--btn);
    border-radius: 8px;
    background: var(--btn);
    color: var(--on-btn);
    font: 500 15px/1 var(--font);
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s, border-color .15s;
}

.btn:disabled {
    cursor: default;
    opacity: .5;
}

.btn.ghost {
    border-color: var(--line);
    background: var(--panel);
    color: var(--ink);
    font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        filter: brightness(1.1);
    }

    .btn.ghost:hover {
        filter: none;
        border-color: var(--accent);
    }
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.hc-site {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hc-sep {
    flex: none;
    width: 1px;
    height: clamp(20px, 4.6vw, 26px);
    background: var(--line-2);
}

.hc-site-name {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    color: var(--ink);
    font: 600 clamp(19px, 5.6vw, 28px)/1.2 var(--font);
    letter-spacing: -0.02em;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hc-home {
    position: relative;
    flex: none;
    display: block;
    width: clamp(24px, 5.4vw, 32px);
    height: clamp(18px, 4vw, 24px);
}

.hc-home::before,
.hc-home::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hc-home::before {
    background: var(--ink);
    -webkit-mask: url("mark/brackets.svg") center / contain no-repeat;
    mask: url("mark/brackets.svg") center / contain no-repeat;
}

.hc-home::after {
    background: var(--accent);
    -webkit-mask: url("mark/star.svg") center / contain no-repeat;
    mask: url("mark/star.svg") center / contain no-repeat;
    transition: transform .6s cubic-bezier(.7, 0, .3, 1);
}

.hc-home:hover::after,
.hc-home:focus-visible::after {
    transform: rotate(60deg);
}

@media (prefers-reduced-motion: reduce) {
    .hc-home::after {
        transition: none;
    }
}

.hc-loader {
    position: relative;
    display: inline-block;
    width: 67px;
    height: 50px;
}

.hc-loader::before,
.hc-loader::after {
    content: "";
    position: absolute;
    inset: 0;
}

.hc-loader::before {
    background: var(--ink);
    -webkit-mask: url("mark/brackets.svg") center / contain no-repeat;
    mask: url("mark/brackets.svg") center / contain no-repeat;
}

.hc-loader::after {
    background: var(--accent);
    -webkit-mask: url("mark/star.svg") center / contain no-repeat;
    mask: url("mark/star.svg") center / contain no-repeat;
    animation: hc-loader 1.2s cubic-bezier(.7, 0, .3, 1) infinite;
}

@keyframes hc-loader {
    to {
        transform: rotate(60deg);
    }
}

.hc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hc-cards a {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 16px;
    align-content: start;
    height: 100%;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s;
}

@media (hover: hover) and (pointer: fine) {
    .hc-cards a:hover {
        border-color: var(--accent);
    }
}

.hc-cards a > :not(.hc-card-ico) {
    grid-column: 2;
}

.hc-cards b {
    display: block;
    font: 600 17px/1.3 var(--font);
}

.hc-cards span {
    display: block;
    color: var(--muted);
    font: 400 13px/1.6 var(--font);
}

.hc-cards p {
    margin: 8px 0 0;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.45;
}

.hc-card-ico {
    grid-row: 1 / span 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 2px;
    border-radius: 9px;
    background: var(--hover);
    box-shadow: 0 0 0 1px var(--line-2);
    color: var(--ink);
}

.hc-card-ico svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hc-card-ico.hc-card-img {
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hc-card-img svg {
    width: 40px;
    height: 40px;
}

.hc-card-ico img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
}

.hc-card-ico img.plate {
    border-radius: 9px;
    box-shadow: 0 0 0 1px var(--line-2);
}

.hc-card-ico img.flag {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--line-2);
}

.hc-site-ico {
    flex: none;
    width: clamp(30px, 7.6vw, 38px);
    height: clamp(30px, 7.6vw, 38px);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hc-dot {
    fill: var(--accent);
    stroke: none;
}

.hc-dot-red {
    fill: #E5484D;
    stroke: none;
}

.hc-dot-ink {
    fill: currentColor;
    stroke: none;
}
