:root {
    --background: #f4f4f4;
    --text: #161616;
    --text-secondary: #525252;
    --grid: #e0e0e0;
    --bar: #4c4c4c;
    --hover: #393939;
    --container: 400px;
    --link: #8a3ffc;
}

* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background: #fff;
    color: var(--text);
    margin: 0; 
}

header {
    background: #fff;
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
}

header a {
    text-decoration: none;
}

h1 {
    width: 256px;
    text-align: left;
    font-size: 2rem;
    font-family: monospace;
    color: var(--background);
    background: var(--text);
    line-height: .75;
    padding: .5rem 0;
    padding-left: 28px;
}

main {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 4rem 4rem 3rem;
    border: 1px solid var(--grid);
    background: var(--background);
    position: relative;
}


/** SLACK */
#slackButton {
    position: absolute;
    top: 40vh;
    z-index: 999;
    left: 50%;
    transform: translate(-50%, -50%);
}

#slackButton a {
    box-shadow: 1px 2px 8px 1px rgba(0,0,0,.3);
}

/** LOADING */
#loading {
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    padding: 2rem;
    position: absolute;
    left: 0;
    transition: all 300ms ease-out;
}

#loading p {
    margin-bottom: 3rem;
}

#loading * {
    transition: all 300ms ease-out;
}

#loading .error {
    color: #da1e28;
    font-weight: 700;
    font-size: 1.25 rem;
    margin-bottom: 0;
}


/** UTILITIES */
.opaque {
    opacity: 0.1;
    pointer-events: none;
}

.remove {
    display: none;
}

.hide {
    opacity: 0;
}

.small {
    font-size: 0.75rem;
    font-weight: 400;
}


/** BARCHART */
.barchart {
    width: 256px;
    min-height: 900px;
    position: relative;
    transition: all 300ms ease-out;
}

.scale {
    font-family: monospace;
    font-weight: 400;
    font-size: .675rem;
    display: flex;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--grid);
    padding-bottom: 12px;
    width: 300px;
    color: var(--text-secondary);
}

.scale span {
    transform: translateX(-50%);
    min-width: 64px;
    text-align: center;
}

.grid {
    position: absolute;
    top: 16px;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px);
    background-size: 64px 100%;
    pointer-events: none;
    border-right: 1px solid var(--grid);

}

.bar {
    background: var(--bar);
    position: relative;
    min-width: 1px;
    max-height: 36px;
    min-height: 30px;
    margin-top: 8px;
    font-size: 1.5rem;
}

.bar::after {
    content: attr(data-count);
    font-family: monospace;
    font-weight: 700;
    font-size: .75rem;
    color: var(--text-secondary);
    position: absolute;
    right: 0rem;
    display: block;
    transform: translate(125%, 50%);
}

.bar:hover, .bar:active {
    cursor: copy;
    background: var(--hover);
}

.bar:hover::after, .bar:active::after {
    color: var(--text);
}

.reaction {
    position: absolute;
    left: -36px;
    cursor: default;
}

.reaction img {
    width: 26px;
    display: block;
    position: relative;
    top: -4px;
}


/** SHARE BUTTON */
.share {
    background: var(--link);
    color: var(--background);
    border: 1px solid var(--grid);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    padding: .5rem 1rem;
    display: block;
    margin: 4rem auto 0;
    cursor: copy;
    transition: all 200ms ease-out;
}
.share:hover {
    background: rgba(138, 63, 252, .8);
}
.share[disabled] {
    background: var(--grid);
    color: var(--text-secondary);
    cursor: not-allowed;
}
.tooltip { /* Tooltip originally generated by Claude. Thanks Claude! */
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bar);
    color: var(--background);
    font-size: .75rem;
    font-family: monospace;
    font-weight: 700;
    padding: .25rem .5rem;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 1px 2px 8px 1px rgba(0,0,0,.3);
    pointer-events: none;
    z-index: 999;
    transition: all 300ms ease-out;
}


/** DESCRIPTION */
.description {
    margin-top: 8rem;
    font-family: sans-serif;
    color: var(--text);
    margin-left: -36px;
    margin-right: -24px;
}

.description h2 {
    font-size: 1.25rem;
    color: var(--text);
}

.description p {
    font-size: 1.125rem;
    line-height: 1.5;
}

.description a {
    color: var(--link);
}

/** FOOTER */
footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 2rem 0;
    padding: 0 .5rem;
}

footer p a {
    color: var(--link);
}