/* ShieldCinema look for the HTML manual: the apps' dark glass, ice-blue accent,
   and text big enough to read from the couch (it's also shown on the Shield). */

.navy {
    --bg: #0b0b12;
    --fg: #e9e9f1;
    --sidebar-bg: #11111b;
    --sidebar-fg: #a0a0b8;
    --sidebar-non-existant: #55556a;
    --sidebar-active: #4facfe;
    --sidebar-spacer: #1d1d2c;
    --scrollbar: #2a2b45;
    --icons: #a0a0b8;
    --icons-hover: #f0f0f5;
    --links: #4facfe;
    --inline-code-color: #ffd479;
    --theme-popup-bg: #161622;
    --theme-popup-border: #2a2b45;
    --theme-hover: #1d1d2c;
    --quote-bg: #14141f;
    --quote-border: #4facfe;
    --table-border-color: #2a2b45;
    --table-header-bg: #1a1a28;
    --table-alternate-bg: #12121c;
    --searchbar-border-color: #2a2b45;
    --searchbar-bg: #161622;
    --searchbar-fg: #f0f0f5;
    --searchresults-header-fg: #a0a0b8;
    --searchresults-border-color: #2a2b45;
    --searchresults-li-bg: #161622;
    --search-mark-bg: #4facfe55;
}

html {
    font-size: 70%; /* mdBook sizes from rem: ~11.2px base -> body text ~18px */
}
.content {
    font-size: 1.6rem;
    line-height: 1.65;
}
.content main {
    max-width: 960px;
}
.content h1 {
    color: #f0f0f5;
    letter-spacing: 0.01em;
}
.content h2,
.content h3 {
    color: #f0f0f5;
    margin-top: 2.2em;
}
.content h3 {
    border-bottom: 1px solid #2a2b45;
    padding-bottom: 0.25em;
}

/* Pictures: a glass card with a caption. */
figure.shot {
    margin: 1.6em 0 2em;
    padding: 10px;
    background: #14141f;
    border: 1px solid #2a2b45;
    border-radius: 14px;
}
figure.shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}
figure.shot figcaption {
    color: #a0a0b8;
    font-size: 0.85em;
    padding: 8px 4px 2px;
}

/* Tables and notes */
.content table {
    font-size: 0.92em;
}
.content blockquote {
    border-radius: 10px;
}

/* Big, obvious focus for the Shield's D-pad (and keyboards). */
a:focus,
button:focus,
.chapter li a:focus {
    outline: 3px solid #4facfe;
    outline-offset: 3px;
    border-radius: 6px;
}

/* The sidebar's chapters, a little roomier for a remote. */
.chapter li.chapter-item {
    line-height: 1.6;
    margin-block-start: 0.4em;
}
.chapter li a.active {
    color: #4facfe;
    font-weight: 600;
}

/* "Admin" marker: features only owner/admin profiles see. */
.admin-badge {
    display: inline-block;
    vertical-align: 0.15em;
    margin: 0 0.15em;
    padding: 0.1em 0.55em;
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.5;
    color: #ffb347;
    border: 1px solid #ffb34799;
    background: #ffb3471a;
    border-radius: 999px;
    white-space: nowrap;
}
h1 .admin-badge, h2 .admin-badge, h3 .admin-badge, h4 .admin-badge { font-size: 0.45em; }
td .admin-badge, li .admin-badge, figcaption .admin-badge { font-size: 0.72em; }

/* Phone screenshots stay phone-sized. */
figure.shot.phone {
    max-width: 340px;
}

/* Shield app: no toolbar buttons (a remote can't reach them); the title reads as a menu. */
html.in-app .menu-bar .left-buttons,
html.in-app .menu-bar .right-buttons { display: none !important; }
html.in-app .menu-bar { justify-content: center; }
html.in-app .menu-title {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    padding: 6px 36px;
    flex: 0 0 auto;
    width: auto;
    margin: 6px auto;
    border: 1px solid var(--searchbar-border-color, #4a90d9);
    border-radius: 999px;
    background: rgba(74, 144, 217, 0.12);
}
html.in-app .menu-title::after {
    content: "SELECT \00B7  Contents & Search";
    font-size: 0.45em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
}

html.in-app :focus, html.in-app :focus-visible { outline: none; }

/* Narrow readers (the Shield app's reading pane, phones): nothing scrolls
   sideways — a remote can't scroll a box sideways, so long commands and wide
   tables wrap to fit instead of being cut off. */
html.in-app pre, html.in-app pre > code {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
    overflow-x: visible !important;
}
html.in-app .table-wrapper { overflow-x: visible !important; }
html.in-app .content table { width: 100%; font-size: 0.86em; }
html.in-app .content table td, html.in-app .content table th {
    padding: 4px 8px;
    overflow-wrap: break-word;
    hyphens: auto;
}
html.in-app .content table td code { overflow-wrap: anywhere; }
html.in-app .content code { overflow-wrap: anywhere; }
@media (max-width: 700px) {
    pre, pre > code { white-space: pre-wrap !important; overflow-wrap: anywhere; }
    .content table td, .content table th { overflow-wrap: break-word; hyphens: auto; }
}
