:root {
    --page-bg: #efefef;
    --panel-bg: #fafafa;
    /* --text: #072029; */
    /* --text: rgb(35,38,41); */
    --text: #232629f2;
    --muted: #405b66;
    /* --muted: #222324e0; */
    /* --accent-blue: #2f63ff; */
    /* --accent-blue: #00a4e1; */ /* same as the blue color from logo */
    --accent-blue: #3182ce;
    --max-width: 960px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
    --radius: 6px;
    --panel-border: rgba(2,6,23,0.20);
    --panel-shadow: 0 1px 2px rgba(2,6,23,0.04);
    --flow-gap: 24px;
    --default-size: 0.93rem;
    --title-size: 1.3rem;
    --note-size: 0.8rem;
    --min-brand-height: 48px;
    --max-brand-height: 48px;

    line-height: 1.4;
    overflow-y: scroll; /* always show the scrollbar */
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 24px 32px;
    display: flex;
    justify-content: center;
}

.wrap {
    width: 100%;
    max-width: var(--max-width);
}

/* header: logo at left, navigation at right, navigation aligned with the logo. */
header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding-top: 24px;
    flex-wrap: wrap;
}

.header-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: var(--min-brand-height);
    gap: 24px;
    /* we use this to position our popup menu content relative to the header */
    position: relative;
}

#menu {
    display: flex;
    cursor: pointer;
}

.menu-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    max-height: var(--max-brand-height);
}

#menu.open .menu-image {
    content: url("close.svg");
}

/* properties of the actual div containing the popup menu content */
#menu-content {
    display: none;
    z-index: 999;
    flex-direction: column;
    padding: 8px 32px 8px 32px;
    margin: 48px 0 36px 0;
    font-size: var(--default-size);

    border: 1px solid #c8c9cd;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.50);
    border-radius: var(--radius);
    background: #383a3d;
    /* background: linear-gradient(#888, #383a3d );  */

    /* absolute positioning inside the header */
    position: absolute;
    top: 6px; right: 0px;

    /* don't forget to comment out 'display: none' if we enable transition effects */
    /*
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    */
}

#menu-content.active {
    display: flex;

    /* if we use transition effects */
    /*
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    */
}

.menu-content-link {
    display: block;
    /* color: #383a3d; */
    color: #fafafa;
    text-decoration: none;
    /* font-weight: 700; */
    font-size: var(--default-size);
    padding: 4px 0px 4px 0px;
    /* border-bottom: 1px dotted #383a3d; */
    /* border-left: 5px solid ; */
    border-bottom: 1px dotted #efefef;
    margin: 2px 0px 2px 0px;
}

.menu-content-link.no-bottom {
    border-bottom: none;
}

main {
    display: block;
    margin-top: 6px;
}

p {
    margin: 0 0 12px 0;
    color: var(--muted);
}

.logo {
    width: 100%;
    height: 100%;
    max-height: var(--max-brand-height);
    aspect-ratio: auto;
    display: flex;
    object-fit: contain;
    background: transparent;
}

.controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.button {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: var(--default-size);
    display: inline-block;
    color: var(--panel-bg);
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}

.button.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(0,0,0,0.20);
}

section {
    padding: 26px 32px 26px 32px;
    margin: 36px 0;
    background: var(--panel-bg);
    border-radius: var(--radius);
    border: 1px solid var(--panel-border);
    box-shadow: var(--panel-shadow);
    font-size: var(--default-size);
}

/* add a bit more margin before the first section */
#first-section {
    margin: 42px 0 36px 0;
}

.section-title {
    font-size: var(--title-size);
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

/* grid for screenshots, items stretch to the same row height */
.screenshots {
    display: grid;
    /* three columns */
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    /* ensure grid items stretch to the row height */
    align-items: stretch;
}

/* each screenshot container is a vertical flex column that fills the grid cell */
.shot {
    display: flex;
    flex-direction: column;
    /* important: fills the grid row height */
    height: 100%;
    /* background: transparent; */
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.10);
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* responsive image: scales to the column width, keeps aspect ratio */
.shot img {
    display: block;
    width: 100%;
    /* preserve aspect ratio */
    height: auto;
    max-width: 100%;
    object-fit: contain;
    padding: 6px;
}

/* description stays under the image and is pushed to the bottom when images vary in height */
.shot figcaption, .shot .caption {
    margin: 0;
    padding: 8px 10px;
    font-size: var(--note-size);
    color: var(--muted);
    line-height: 1.3;
    background: transparent;
    /* push the caption to the bottom of the .shot */
    margin-top: auto;
    text-align: left;
}

.features-list {
    display: grid;
    gap: 10px;
    padding-left: 6px;
    margin-top: 6px;
}

.feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.feature-text h4 {
    margin: 0;
    font-size: var(--default-size);
    color: var(--text);
}

.feature-text p {
    margin: 6px 0 0 0;
    color: var(--muted);
    font-size: var(--default-size);
}

.feature-bar {
    width: 4px;
    height: 0.9rem;
    border-radius: 0px;
    flex: 0 0 auto;
    margin-top: 4px;
    background: #dfe6eb;
}

.feature-ul {
    margin:0px 0 0 0px;
    color:var(--muted);
}

/* color classes used for the color band */
.feature-bar.red        { background: #ff3b3b; }
.feature-bar.yellow     { background: #ffc300; }
.feature-bar.green      { background: #28E07A; }
.feature-bar.blue       { background: #00a4e1; }

.downloads {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/*
.contact {
    margin-top: 8px;
    color: var(--muted);
}
*/

.license {
    margin-top: 8px;
    color: var(--muted);
}

footer {
    margin-top: 16px;
    padding-bottom: 36px;
    color: var(--muted);
    font-size: var(--default-size);
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
}

.mono {
    font-family: var(--mono);
    color: var(--muted);
}

a { 
    overflow-wrap: break-word;
}

a:focus {
    outline-offset: 3px;
}

/* no outline when clicking */
a:focus:not(:focus-visible) {
  outline: none;
}

.hidden {
    display: none;
}

.back {
    text-decoration: none;
    color: var(--text);
}

code {
    background: #efefef;
    padding: 4px 4px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.05);
    font-family: var(--mono);
    color: var(--muted);
}

.code-like {
    background: #efefef;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: auto;
    color: var(--muted);
    font-family: var(--mono);
    font-size: var(--default-size);
}

.info-box {
    color: var(--muted);
    /* background-color: #f8f9fa; */
    background-color: #ddeeff50;

    border: 1px solid #e2e8f0;
    border-left: 7px solid var(--accent-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
    border-radius: var(--radius);

    margin: 24px 0;
    padding: 16px;
}

.warning-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #fffbeb;
    border-left: 7px solid #d97706;
    border-radius: var(--radius);
    padding: 16px;
    margin: 24px 0 16px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}

.warning-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.warning-text {
    color: #78350f;
    font-size: var(--default-size);
}

dialog {
    border: none;
    padding: 0;
    background: transparent;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
}

dialog img {
    max-width: 87vw;
    max-height: 87vh;
    display: block;
    border-radius: 0px;
}

@media (max-width: 920px) {
    /* no outline on mobile devices */
    a, a:focus, a:active {
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
    }

    .nav-unit {
        display: none;
    }

    .band .sizer {
        display: none;
    }

    section {
        margin-top: 36px;
    }
}

@media (max-width: 640px) {
    /* mobile: single-column grid for screenshots, captions remain under images and centered by other rules as needed */
    .screenshots {
        grid-template-columns: 1fr;
    }
}