:root {
    --tgks-text: #202123;
    --tgks-muted: #6b7077;
    --tgks-border: #e5e7eb;
    --tgks-surface: #f7f7f8;
    --tgks-hover: #eceeef;
    --tgks-panel: #ffffff;
    --tgks-accent: #e75925;
    --tgks-radius: 14px;
    --tgks-panel-width: 340px;
    --tgks-ease: cubic-bezier(.22, 1, .36, 1);
}

.tgks-workspace,
.tgks-workspace * { box-sizing: border-box; }

.tgks-workspace {
    color: var(--tgks-text);
    transition: grid-template-columns 340ms var(--tgks-ease), gap 340ms var(--tgks-ease);
}

.tgks-content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.tgks-content-heading { min-width: 0; }

.tgks-context-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid var(--tgks-border);
    border-radius: 9px;
    background: var(--tgks-surface);
    color: #3f444a;
    font: inherit;
    font-size: 13px;
    line-height: 1;
    font-weight: 750;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.tgks-context-trigger:hover,
.tgks-context-trigger:focus-visible,
.tgks-workspace.is-context-open .tgks-context-trigger {
    border-color: #d8dce0;
    background: var(--tgks-hover);
    color: var(--tgks-text);
    outline: none;
}

.tgks-sidebar { scrollbar-width: thin; }

.tgks-folder {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 12px;
    flex: 0 0 16px;
    margin-right: 7px;
    border: 1.5px solid #8b9198;
    border-radius: 2px;
    background: transparent;
}

.tgks-folder::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -5px;
    width: 7px;
    height: 5px;
    border: 1.5px solid #8b9198;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    background: var(--tgks-surface);
}

.tgks-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #666c73;
    font: inherit;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.tgks-icon-button:hover,
.tgks-icon-button:focus-visible { background: var(--tgks-hover); color: var(--tgks-text); outline: none; }

.tgks-context {
    min-width: 0;
    width: 100%;
    max-width: var(--tgks-panel-width);
    align-self: start;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    border: 1px solid var(--tgks-border);
    border-radius: var(--tgks-radius);
    background: var(--tgks-panel);
    box-shadow: 0 18px 44px rgba(25, 31, 38, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(36px);
    pointer-events: none;
    transition: transform 340ms var(--tgks-ease), opacity 220ms ease, visibility 220ms ease;
}

.tgks-workspace.is-context-open .tgks-context {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.tgks-context-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 18px 16px 20px;
    border-bottom: 1px solid var(--tgks-border);
}

.tgks-context-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #858b92;
    font-size: 10px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tgks-context-header h2 { margin: 0; color: var(--tgks-text); font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.tgks-context-body { max-height: calc(100vh - 205px); overflow: auto; padding: 18px 20px 24px; }
.tgks-context-section + .tgks-context-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--tgks-border); }
.tgks-context-section h3 { margin: 0 0 11px; color: var(--tgks-text); font-size: 14px; line-height: 1.25; letter-spacing: -.01em; }
.tgks-context-section p { margin: 0 0 13px; color: var(--tgks-muted); font-size: 13.5px; line-height: 1.55; }
.tgks-context-links { display: grid; gap: 4px; }

.tgks-context-links a {
    display: grid;
    gap: 3px;
    min-height: 44px;
    padding: 10px 11px;
    border-radius: 7px;
    color: #3f444a;
    text-decoration: none !important;
}

.tgks-context-links a:hover,
.tgks-context-links a:focus-visible { background: var(--tgks-surface); color: var(--tgks-text); outline: none; }
.tgks-context-links span { font-size: 13.5px; line-height: 1.3; font-weight: 700; }
.tgks-context-links small { color: #8a9097; font-size: 11px; line-height: 1.25; font-weight: 600; }

.tgks-context-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--tgks-accent);
    color: #fff !important;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 750;
    text-decoration: none !important;
}

.tgks-context-backdrop { display: none; }

@media (min-width: 1100px) {
    .tgks-workspace.tgks-has-context { grid-template-columns: var(--tgks-left-column, 280px) minmax(0, 1fr) 0; }
    .tgks-workspace.tgks-has-context.is-context-open { grid-template-columns: var(--tgks-left-column, 280px) minmax(0, 1fr) var(--tgks-panel-width); }
    .tgks-workspace.tgks-has-context.is-context-open { column-gap: var(--tgks-open-gap, 36px); }
}

@media (max-width: 1099px) {
    .tgks-context {
        position: fixed;
        z-index: 100002;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(420px, 94vw);
        max-width: none;
        max-height: none;
        border-width: 0 0 0 1px;
        border-radius: 0;
        transform: translateX(102%);
    }
    .tgks-context-body { max-height: calc(100vh - 82px); }
    .tgks-context-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100001;
        background: rgba(20, 24, 28, .34);
        opacity: 0;
        visibility: hidden;
        transition: opacity 220ms ease, visibility 220ms ease;
    }
    .tgks-workspace.is-context-open .tgks-context-backdrop { opacity: 1; visibility: visible; }
    body.tgks-overlay-open { overflow: hidden; }
}

@media (max-width: 767px) {
    .tgks-content-header { gap: 12px; }
    .tgks-context-trigger { min-width: 42px; padding: 9px 11px; }
    .tgks-context-trigger span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .tgks-context { width: 100vw; }
    .tgks-context-header { padding-top: max(18px, env(safe-area-inset-top)); }
    .tgks-context-body { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .tgks-workspace,
    .tgks-context,
    .tgks-context-backdrop,
    .tgks-context-trigger { transition: none !important; }
}
