body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td {
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
    background: #f0f4f7;
    color: #141414;
    line-height: 1.28;
    font-size: 13px;
}

a {
    color: #008eb3;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#header {
    background-color: #008eb3;
    background-image: linear-gradient(to bottom, #00b4db, #0083b0);
    min-height: 120px;
}

.page-width {
    width: min(980px, calc(100% - 24px));
    margin: 0 auto;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 120px;
}

.brand-row .brand-icon {
    height: 115px;
    width: auto;
    flex: 0 0 auto;
}

.brand-text {
    width: min(470px, 72vw);
    height: auto;
    filter: drop-shadow(3px 3px 0 #004d61) drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.35));
}

#navigation {
    background-color: #008eb3;
    background-image: linear-gradient(to bottom, #00b4db, #007a99);
    min-height: 38px;
}

.nav-tabs,
.sub-nav-links,
.resource-tabs,
.item-list,
.quick-links,
.dropdown {
    list-style: none;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
}

.nav-tabs li {
    position: relative;
    display: block;
}

.nav-tabs li > a {
    display: block;
    padding: 0 15px;
    line-height: 38px;
    height: 38px;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 -1px 0 #004d61;
}

.nav-tabs li.active > a {
    background: #f5f5f5;
    color: #008eb3;
    text-shadow: none;
    text-decoration: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.nav-tabs li a span {
    font-size: 10px;
    padding-left: 3px;
}

.dropdown {
    display: none;
    position: absolute;
    top: 38px;
    left: 0;
    z-index: 50;
    min-width: 180px;
    border: 1px solid #0080a0;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.nav-tabs li:hover .dropdown,
.dropdown.open {
    display: block;
}

.dropdown li a {
    color: #155363;
    line-height: 30px;
    height: 30px;
    text-shadow: none;
    font-size: 12px;
    white-space: nowrap;
}

.dropdown li a:hover {
    background: #edf8fb;
    text-decoration: none;
}

#sub-nav {
    background-color: #f5f5f5;
    min-height: 30px;
    clear: both;
}

.toolbar-search {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 4px 0;
}

.toolbar-search form {
    display: flex;
    align-items: center;
}

.toolbar-search button {
    width: 34px;
    height: 30px;
    border: 0;
    background: #f1b400;
    background-image: url("search.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    color: transparent;
    font-size: 0;
    cursor: pointer;
}

.toolbar-search input {
    width: 170px;
    height: 30px;
    border: 1px solid #d8d8d8;
    border-left: 0;
    padding: 0 8px;
    color: #555555;
    font: inherit;
}

.sub-nav-links {
    display: flex;
    flex-wrap: wrap;
    padding-left: 10px;
}

.sub-nav-links li a {
    display: block;
    line-height: 30px;
    padding: 0 10px;
    color: #777777;
    font-size: 12px;
    font-weight: bold;
}

.sub-nav-links li a.active,
.sub-nav-links li a:hover {
    color: #008eb3;
    text-decoration: none;
}

#breadcrumb {
    background-color: #008eb3;
    background-image: linear-gradient(to bottom, #00b4db, #008eb3);
    border: 1px solid #007a99;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 10px;
    color: #ffffff;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

#breadcrumb a {
    color: #e0f7fa;
}

#breadcrumb span.arrow {
    font-size: 10px;
    margin: 0 5px;
}

.content-shell {
    background: #ffffff;
    margin-top: 15px;
    min-height: 520px;
    margin-bottom: 0;
}

.content-pad {
    padding: 15px;
}

.page-heading {
    border-bottom: 1px solid #e6e6e6;
    padding: 15px;
}

.page-heading h1 {
    color: #141414;
    font-size: 22px;
    font-weight: normal;
    margin-bottom: 4px;
}

.page-heading p {
    color: #666666;
    font-size: 12px;
}

.resource-header {
    padding: 15px;
    border-bottom: 1px solid #e6e6e6;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 15px;
    align-items: center;
}

.resource-icon {
    width: 64px;
    height: 64px;
    background-color: #008eb3;
    color: white;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
    line-height: 64px;
    border-radius: 4px;
    border: 1px solid #005f78;
}

.resource-title h1 {
    font-size: 22px;
    font-weight: normal;
    margin-bottom: 3px;
}

.resource-title h1 span.version {
    color: #888888;
}

.resource-title p {
    color: #666666;
    font-size: 12px;
}

.download-button {
    display: inline-block;
    min-width: 122px;
    padding: 10px 14px;
    border: 1px solid #2d6717;
    border-radius: 3px;
    background: linear-gradient(to bottom, #6dbb39, #3b8f1c);
    color: #ffffff;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 -1px 0 #22520f;
}

.download-button:hover {
    text-decoration: none;
    background: linear-gradient(to bottom, #7acb44, #3f981f);
}

.resource-tabs {
    padding-left: 15px;
    min-height: 30px;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.resource-tabs li a {
    display: block;
    border: 1px solid #d9d9d9;
    background-color: #f9f9f9;
    padding: 0 12px;
    line-height: 28px;
    color: #141414;
    font-size: 12px;
    font-weight: bold;
}

.resource-tabs li.active a {
    background-color: #ffffff;
    border-bottom-color: #ffffff;
    text-decoration: none;
}

.tool-content {
    padding: 20px 15px 40px;
    font-size: 13px;
}

.tool-content h2,
.content-pad h2 {
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: #155363;
}

.tool-content h3,
.content-pad h3 {
    font-size: 14px;
    color: #155363;
    margin-bottom: 5px;
}

.tool-content p,
.content-pad p {
    margin-bottom: 10px;
}

.layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
}

.panel {
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    background: #ffffff;
}

.panel-title {
    background: #f5f5f5;
    border-bottom: 1px solid #d9d9d9;
    color: #155363;
    font-weight: bold;
    padding: 8px 10px;
}

.panel-body {
    padding: 10px;
}

.item-list li {
    border-bottom: 1px solid #eeeeee;
}

.item-list li:last-child {
    border-bottom: 0;
}

.item-list a.item-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 12px 0;
    color: #141414;
}

.item-list a.item-row:hover {
    background: #f8fcfd;
    text-decoration: none;
}

.item-icon {
    width: 52px;
    height: 52px;
    border: 1px solid #005f78;
    border-radius: 4px;
    background: #008eb3;
    color: #ffffff;
    font-weight: bold;
    line-height: 52px;
    text-align: center;
}

.meta {
    color: #777777;
    font-size: 12px;
}

.badge {
    display: inline-block;
    border: 1px solid #c7dce3;
    background: #edf8fb;
    color: #155363;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 4px;
    margin-top: 5px;
}

.status {
    color: #ffffff;
    background: #4a8f2a;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    align-self: start;
}

.status.planned {
    background: #9a6b16;
}

.notice {
    border: 1px solid #c7dce3;
    background: #edf8fb;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 12px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.forum-button {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #777777;
    border-radius: 3px;
    background: linear-gradient(to bottom, #ffffff, #d9d9d9);
    color: #141414;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
}

.forum-button.primary {
    border-color: #00647d;
    background: linear-gradient(to bottom, #00b4db, #008eb3);
    color: #ffffff;
    text-shadow: 0 -1px 0 #004d61;
}

.contact-link {
    font-size: 18px;
    font-weight: bold;
}

.site-footer {
    background: #ffffff;
    color: #777777;
    padding: 14px 0 26px;
    font-size: 12px;
}

.footer-row {
    padding-top: 12px;
}

.browser-tools {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 14px;
}

.filter-panel {
    border-right: 1px solid #eeeeee;
    padding-right: 12px;
}

.filter-title {
    color: #155363;
    font-weight: bold;
    margin: 0 0 8px;
}

.filter-group {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.filter-chip {
    border: 1px solid #c7dce3;
    background: #f8fcfd;
    color: #155363;
    border-radius: 3px;
    min-height: 28px;
    padding: 0 8px;
    text-align: left;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    background: #008eb3;
    border-color: #007a99;
    color: #ffffff;
}

.browser-main {
    min-width: 0;
}

.browser-search {
    display: flex;
    margin-bottom: 12px;
}

.browser-search button {
    width: 38px;
    border: 0;
    background: #f1b400;
    background-image: url("search.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    color: transparent;
    font-size: 0;
}

.browser-search input {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1px solid #d8d8d8;
    border-left: 0;
    padding: 0 10px;
    font: inherit;
}

.browser-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.browser-card {
    border: 1px solid #d9d9d9;
    background: #ffffff;
    border-radius: 3px;
    padding: 10px;
    min-height: 116px;
    cursor: pointer;
}

.browser-card:hover {
    background: #f8fcfd;
}

.browser-card h3 {
    font-size: 14px;
    color: #155363;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.browser-card p {
    color: #777777;
    font-size: 12px;
    margin-bottom: 8px;
}

.preview-panel {
    margin-top: 14px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    border-radius: 3px;
}

.preview-head {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    background: #f5f5f5;
    border-bottom: 1px solid #d9d9d9;
    padding: 8px 10px;
}

.preview-title {
    color: #155363;
    font-weight: bold;
    overflow-wrap: anywhere;
}

.preview-body {
    padding: 10px;
}

.preview-body audio,
.preview-body video {
    width: 100%;
    max-height: 420px;
    background: #111111;
}

.video-shell {
    background: #101010;
    padding: 10px;
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.code-window {
    border: 1px solid #222222;
    background: #1e1e1e;
    color: #d4d4d4;
    max-height: 360px;
    overflow: auto;
    padding: 12px;
    font: 12px/1.5 Consolas, "Courier New", monospace;
    white-space: pre-wrap;
}

.empty-state {
    color: #777777;
    padding: 12px;
    border: 1px dashed #d9d9d9;
    background: #fbfbfb;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.catalog-crumb {
    color: #777777;
    font-weight: bold;
}

.catalog-crumb button {
    border: 0;
    background: transparent;
    color: #008eb3;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
    padding: 0;
}

.catalog-search {
    display: flex;
    flex: 0 1 300px;
}

.catalog-search button {
    width: 38px;
    border: 0;
    background: #f1b400 url("search.png") no-repeat center / 16px 16px;
    color: transparent;
    font-size: 0;
}

.catalog-search input {
    flex: 1;
    min-width: 0;
    height: 34px;
    border: 1px solid #d8d8d8;
    border-left: 0;
    padding: 0 10px;
    font: inherit;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.category-tile {
    min-height: 78px;
    border: 1px solid #007a99;
    border-radius: 4px;
    background: linear-gradient(to bottom, #00b4db, #008eb3);
    color: #ffffff;
    text-align: left;
    padding: 12px;
    cursor: pointer;
    font: inherit;
    text-shadow: 0 -1px 0 #004d61;
}

.category-tile strong,
.category-tile span {
    display: block;
}

.category-tile strong {
    font-size: 16px;
    margin-bottom: 4px;
}

.category-tile span {
    font-size: 12px;
}

.download-row {
    width: 100%;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    color: #141414;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 10px;
    align-items: center;
    text-align: left;
    padding: 10px;
    cursor: pointer;
    font: inherit;
}

.download-row:hover {
    background: #f8fcfd;
}

.download-row strong,
.download-row small {
    display: block;
}

.resource-frame {
    margin-top: 14px;
    border: 1px solid #d9d9d9;
    background: #ffffff;
    border-radius: 3px;
}

.shadebox-sitebar {
    height: 36px;
    background: linear-gradient(to bottom, #00b4db, #007a99);
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
    font-family: "Trebuchet MS", Helvetica, Arial, sans-serif;
}

.shadebox-sitebar strong {
    font-size: 16px;
    font-style: italic;
    text-shadow: 1px 1px 0 #004d61;
}

.shadebox-sitebar a {
    color: #ffffff;
    font-weight: bold;
    text-decoration: none;
}

.letter {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.2s;
}

.letter:hover {
    transform: scale(1.1);
}

@keyframes fallAway {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--fall-x), 100vh) rotate(var(--fall-rot));
        opacity: 0;
    }
}

.falling {
    animation: fallAway 1.2s forwards cubic-bezier(0.55, 0.085, 0.68, 0.53);
    pointer-events: none;
}

@media (max-width: 720px) {
    .brand-row {
        min-height: 96px;
    }

    .brand-row .brand-icon {
        height: 82px;
    }

    .nav-tabs li {
        flex: 1 1 50%;
    }

    .nav-tabs li a {
        width: 100%;
        text-align: center;
        padding: 0 8px;
    }

    .dropdown {
        position: static;
        min-width: 100%;
    }

    .layout-grid,
    .resource-header,
    .item-list a.item-row,
    .browser-tools {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        border-right: 0;
        border-bottom: 1px solid #eeeeee;
        padding-right: 0;
        padding-bottom: 12px;
    }

    .toolbar-search {
        flex: 1 1 100%;
        margin-left: 0;
    }

    .toolbar-search input {
        width: 100%;
    }

    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-search {
        flex-basis: auto;
    }

    .resource-header {
        align-items: start;
    }
}
