@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

.hydra-docs {
    --hydra-black: #000000;
    --hydra-white: #ffffff;
    --hydra-green: #00c853;
    --hydra-green-soft: rgba(0, 200, 83, 0.12);
    --hydra-border: rgba(0, 0, 0, 0.12);
    --hydra-text-muted: #5f5f5f;
    --hydra-surface-muted: #f5f7f5;
    --hydra-shadow: 0 32px 80px rgba(0, 0, 0, 0.12);
    --hydra-radius-sm: 10px;
    --hydra-radius-md: 14px;
    --hydra-radius-lg: 18px;

    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    min-height: calc(100vh - 120px);
    margin: clamp(12px, 2vw, 24px);
    border: 1px solid var(--hydra-border);
    border-radius: 28px;
    overflow: hidden;
    background: var(--hydra-white);
    box-shadow: var(--hydra-shadow);
    color: var(--hydra-black);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: hydraDocsEnter 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hydra-docs__sidebar {
    border-right: 1px solid var(--hydra-border);
    background:
        linear-gradient(175deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 245, 0.92)),
        var(--hydra-white);
    padding: 22px 18px;
    overflow: auto;
}

.hydra-docs__sidebar-head {
    margin-bottom: 14px;
}

.hydra-docs__sidebar-head h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hydra-docs__subhead {
    margin: 6px 0 0;
    color: var(--hydra-text-muted);
    font-size: 0.88rem;
}

.hydra-docs__controls {
    position: sticky;
    top: 0;
    z-index: 3;
    margin: 0 -6px 12px;
    padding: 10px 6px 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 72%, rgba(255, 255, 255, 0));
}

.hydra-docs__search-wrap {
    margin: 8px 0 6px;
}

.hydra-docs__nav-toggle {
    display: none;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    background: var(--hydra-white) !important;
    cursor: pointer;
    margin: 8px 0 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    isolation: isolate;
    transition: border-color 0.16s ease;
}

.hydra-docs__nav-toggle:hover,
.hydra-docs__nav-toggle:focus-visible {
    border-color: rgba(0, 0, 0, 0.24);
    background: var(--hydra-white) !important;
}

.hydra-docs__nav-toggle:active {
    background: var(--hydra-white) !important;
}

.hydra-docs__nav-toggle:focus {
    outline: none;
    box-shadow: none;
}

.hydra-docs__nav-toggle.is-active,
.hydra-docs__nav-toggle.is-active:hover,
.hydra-docs__nav-toggle.is-active:focus-visible {
    background: var(--hydra-white) !important;
}

.hydra-docs__nav-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--hydra-white);
    z-index: 0;
}

.hydra-docs__nav-toggle-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.82;
    color: var(--hydra-black);
    background: transparent;
    transform: rotate(0deg);
    transition: transform 0.18s ease, opacity 0.16s ease;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.hydra-docs__nav-toggle.is-active .hydra-docs__nav-toggle-icon {
    transform: rotate(180deg);
    opacity: 0.95;
}

.hydra-docs__search {
    width: 100%;
    border: 1px solid var(--hydra-border);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hydra-black);
    background: var(--hydra-white);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.hydra-docs__search::placeholder {
    color: #7a7a7a;
}

.hydra-docs__search:hover {
    border-color: rgba(0, 0, 0, 0.28);
}

.hydra-docs__search:focus {
    outline: none;
    border-color: var(--hydra-black);
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.14);
}

.hydra-docs__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 30px;
}

.hydra-docs__nav-panel.is-collapsed {
    display: none;
}

.hydra-docs__nav-panel[hidden] {
    display: none !important;
}

.hydra-docs__nav-panel.is-filter-animating {
    animation: hydraDocsFilterFade 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes hydraDocsFilterFade {
    from {
        opacity: 0.72;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hydra-docs__filter {
    border: 1px solid var(--hydra-border);
    background: var(--hydra-white);
    color: var(--hydra-black);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.hydra-docs__filter:hover,
.hydra-docs__filter:focus-visible {
    border-color: var(--hydra-black);
    background: var(--hydra-surface-muted);
}

.hydra-docs__filter.is-active {
    border-color: var(--hydra-black);
    background: var(--hydra-black);
    color: var(--hydra-white);
}

.hydra-docs__group + .hydra-docs__group {
    margin-top: 28px;
}

.hydra-docs__group h2 {
    margin: 0 0 8px;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hydra-text-muted);
}

.hydra-docs__tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hydra-docs__tree > li + li {
    margin-top: 7px;
}

.hydra-docs__doc-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hydra-docs__doc-row > a[data-doc-link] {
    flex: 1 1 auto;
}

.hydra-docs__child-toggle {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--hydra-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.16s ease;
}

.hydra-docs__child-toggle:hover,
.hydra-docs__child-toggle:focus-visible {
    border-color: var(--hydra-border);
    background: var(--hydra-surface-muted);
    color: var(--hydra-black);
}

.hydra-docs__child-toggle-icon {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    transition: transform 0.16s ease;
}

[data-doc-parent-item].is-collapsed .hydra-docs__child-toggle-icon {
    transform: rotate(-45deg);
    margin-top: 0;
}

.hydra-docs__tree--child {
    position: relative;
    margin-top: 8px;
    margin-left: 14px;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.12);
}

.hydra-docs__tree--child::after {
    content: '';
    position: absolute;
    left: -1px;
    bottom: 0;
    width: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.hydra-docs__tree--child > li + li {
    margin-top: 6px;
}

.hydra-docs__tree--child.is-animating {
    overflow: hidden;
    will-change: height, opacity;
}

.hydra-docs__group a {
    display: block;
    border: 1px solid transparent;
    border-radius: var(--hydra-radius-md);
    text-decoration: none;
    color: var(--hydra-black);
    padding: 10px 11px;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.hydra-docs__group a:hover,
.hydra-docs__group a:focus-visible {
    border-color: var(--hydra-black);
    background: var(--hydra-surface-muted);
    transform: translateY(-1px);
}

.hydra-docs__group a.is-active {
    border-color: rgba(0, 200, 83, 0.35);
    background: var(--hydra-green-soft);
}

.hydra-docs__doc-title {
    font-weight: 700;
    font-size: 0.93rem;
    line-height: 1.3;
}

.hydra-docs__content {
    position: relative;
    padding: 30px clamp(18px, 3vw, 44px) 44px;
    background: var(--hydra-white);
}

.hydra-docs__content::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 92% 0%, rgba(0, 200, 83, 0.07), transparent 45%),
        radial-gradient(circle at 10% 100%, rgba(0, 0, 0, 0.04), transparent 35%);
}

.hydra-docs__content > * {
    position: relative;
}

.hydra-docs__view-switch {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 0 16px;
    padding: 10px 0 12px;
    display: inline-flex;
    gap: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 72%, rgba(255, 255, 255, 0));
}

.hydra-docs__view-switch.is-hidden {
    display: none;
}

.hydra-docs__view-btn {
    border: 1px solid var(--hydra-border);
    background: var(--hydra-white);
    color: var(--hydra-black);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.16s ease;
}

.hydra-docs__view-btn:hover,
.hydra-docs__view-btn:focus-visible {
    border-color: var(--hydra-black);
    background: var(--hydra-surface-muted);
}

.hydra-docs__view-btn.is-active {
    background: var(--hydra-black);
    border-color: var(--hydra-black);
    color: var(--hydra-white);
}

.hydra-docs__loading {
    margin: 0 0 16px;
    color: var(--hydra-text-muted);
    font-weight: 600;
    display: none !important;
}

.hydra-docs__article-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.3vw, 2.4rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-weight: 900;
}

.hydra-docs__meta {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hydra-docs__meta-pill {
    display: inline-flex;
    border-radius: 999px;
    background: var(--hydra-white);
    border: 1px solid var(--hydra-border);
    padding: 5px 11px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hydra-text-muted);
}

.hydra-docs__short-wrap {
    margin-top: 24px;
    border: 1px solid rgba(0, 200, 83, 0.22);
    background:
        linear-gradient(180deg, rgba(0, 200, 83, 0.06), rgba(255, 255, 255, 0.96)),
        var(--hydra-white);
    border-radius: var(--hydra-radius-lg);
    padding: 18px;
}

.hydra-docs__short {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.62;
}

.hydra-docs__curious {
    margin-top: 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--hydra-black);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 7px 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transition: background 0.32s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.hydra-docs__curious:hover,
.hydra-docs__curious:focus-visible {
    background: linear-gradient(90deg, var(--hydra-black) 0%, var(--hydra-green) 100%);
    color: var(--hydra-white);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.hydra-docs__full {
    margin-top: 24px;
    line-height: 1.72;
    color: #0f0f0f;
    animation: hydraDocContentIn 0.2s ease;
}

.hydra-docs__full.is-fade-in {
    animation: hydraDocContentFade 0.24s ease;
}

.hydra-docs__full h2,
.hydra-docs__full h3,
.hydra-docs__full h4 {
    letter-spacing: -0.02em;
}

.hydra-docs__full a {
    color: #066136;
    font-weight: 600;
}

.hydra-docs__full img {
    border-radius: 14px;
}

#hydra-docs-app[data-view-mode="desktop"] .hydra-docs-view-mobile,
#hydra-docs-app[data-view-mode="desktop"] .hydra-docs-device-shot--mobile {
    display: none !important;
}

#hydra-docs-app[data-view-mode="mobile"] .hydra-docs-view-desktop,
#hydra-docs-app[data-view-mode="mobile"] .hydra-docs-device-shot--desktop {
    display: none !important;
}

.hydra-docs-device-screenshots {
    margin: 24px 0;
}

.hydra-docs-device-shot {
    width: 100%;
    margin: 0 0 16px;
    max-width: min(760px, 100%);
}

.hydra-docs-device-shot--desktop {
    max-width: min(920px, 100%);
}

.hydra-docs-device-shot--mobile {
    max-width: clamp(180px, 26vw, 320px);
    aspect-ratio: 9 / 19.5;
    border-radius: 14px;
    overflow: hidden;
}

.hydra-docs-device-shot:last-child {
    margin-bottom: 0;
}

.hydra-docs-device-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.hydra-docs-device-shot--mobile img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center top;
    transform: none;
    clip-path: inset(0 2.5% 0 2.5% round 12px);
}

.hydra-docs__empty {
    color: var(--hydra-text-muted);
}

.hydra-docs__group.is-hidden,
.hydra-docs__group li.is-hidden {
    display: none;
}

.hydra-docs-quickcuts {
    --hydra-black: #000000;
    --hydra-white: #ffffff;
    --hydra-green: #00c853;
    --hydra-border: rgba(0, 0, 0, 0.12);
    --hydra-text-muted: #5f5f5f;
    --hydra-shadow: 0 32px 80px rgba(0, 0, 0, 0.12);

    margin: clamp(12px, 2vw, 24px);
    padding: clamp(18px, 3vw, 36px);
    border: 1px solid var(--hydra-border);
    border-radius: 28px;
    background: var(--hydra-white);
    box-shadow: var(--hydra-shadow);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--hydra-black);
}

.hydra-docs-quickcuts__header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -0.03em;
}

.hydra-docs-quickcuts__header p {
    margin: 10px 0 0;
    color: var(--hydra-text-muted);
    text-align: center;
}

.hydra-docs-quickcuts__search-wrap {
    margin: 16px auto 0;
    max-width: 560px;
    position: relative;
}

.hydra-docs-quickcuts__search {
    width: 100%;
    border: 1px solid var(--hydra-border);
    border-radius: 999px;
    min-height: 60px;
    padding: 14px 62px 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--hydra-black);
    background: var(--hydra-white);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.hydra-docs-quickcuts__search::placeholder {
    color: #7a7a7a;
    font-weight: 300;
    text-align: left;
}

.hydra-docs-quickcuts__search:hover {
    border-color: rgba(0, 0, 0, 0.28);
}

.hydra-docs-quickcuts__search:focus {
    outline: none;
    border-color: var(--hydra-black);
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.14);
}

.hydra-docs-quickcuts__search-badge {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hydra-black);
    color: var(--hydra-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.06rem;
    font-weight: 900;
    line-height: 1;
    border: 0;
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.24);
    text-shadow: none;
    pointer-events: none;
}

.hydra-docs-quickcuts__search-badge::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(0, 200, 83, 0.42);
}

.hydra-docs-quickcuts__search:hover + .hydra-docs-quickcuts__search-badge,
.hydra-docs-quickcuts__search:focus + .hydra-docs-quickcuts__search-badge {
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.3);
}

.hydra-docs-quickcuts__search:hover + .hydra-docs-quickcuts__search-badge::after,
.hydra-docs-quickcuts__search:focus + .hydra-docs-quickcuts__search-badge::after {
    border-color: rgba(0, 200, 83, 0.62);
}

.hydra-docs-quickcuts__group {
    margin-top: clamp(44px, 7vw, 80px);
}

.hydra-docs-quickcuts__group h2 {
    margin: 0 0 16px;
    display: block;
    text-align: center;
    font-size: clamp(1.8rem, 7vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hydra-black);
}

@media (min-width: 981px) {
    .hydra-docs-quickcuts__group h2 {
        font-size: 3rem;
        font-weight: 900;
    }
}

.hydra-docs-quickcuts__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.hydra-docs-quickcuts__card {
    border: 1px solid var(--hydra-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    min-height: 244px;
    display: flex;
    flex-direction: column;
}

.hydra-docs-quickcuts__card h3 {
    margin: 0;
    padding: 12px 14px;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--hydra-white);
    background: var(--hydra-black);
}

.hydra-docs-quickcuts__card p {
    margin: 12px 14px 0;
    color: #212121;
    font-size: 0.94rem;
    line-height: 1.5;
    max-height: 7.75em;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.hydra-docs-quickcuts__empty {
    color: var(--hydra-text-muted);
    -webkit-mask-image: none;
    mask-image: none;
}

.hydra-docs__curious-link {
    display: inline-block;
    margin: auto 14px 14px;
    text-decoration: none;
    align-self: flex-end;
    position: relative;
    z-index: 1;
}

.hydra-docs-quickcuts__group.is-hidden,
.hydra-docs-quickcuts__card.is-hidden,
.hydra-docs-quickcuts__no-results.is-hidden {
    display: none;
}

.hydra-docs-quickcuts__no-results {
    margin: 20px 0 0;
    text-align: center;
    color: var(--hydra-text-muted);
    font-weight: 600;
}

@keyframes hydraDocsEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hydraDocContentIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hydraDocContentFade {
    from {
        opacity: 0.02;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hydra-docs {
        grid-template-columns: 1fr;
        margin: 10px;
        border-radius: 20px;
        overflow: visible;
    }

    .hydra-docs__sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--hydra-border);
        max-height: none;
        overflow: visible;
        position: relative;
        z-index: 6;
    }

    .hydra-docs__controls {
        position: sticky;
        top: 0;
        z-index: 8;
        background: var(--hydra-white);
        padding-bottom: 10px;
    }

    .hydra-docs__controls::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 1px;
        background: rgba(0, 0, 0, 0.08);
        pointer-events: none;
    }

    .hydra-docs__nav-toggle {
        display: inline-flex;
    }

    .hydra-docs__nav-panel {
        position: relative;
        z-index: 7;
        margin-top: 8px;
        border: 1px solid var(--hydra-border);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.98);
        padding: 10px;
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
        max-height: min(62vh, 520px);
        overflow: auto;
    }
}
