/* =========================================================
   InterestThing Help — Modern Minimal Apple-Style
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: #222;
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
        Helvetica, Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* -----------------------------------------
   Page container
------------------------------------------*/

#help-pd {
    margin: 24px auto;
    padding: 0 24px 40px 24px;
    max-width: 960px;
}

/* -----------------------------------------
   Headings
------------------------------------------*/

h1 {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #111;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 4px;
    color: #222;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 4px;
    color: #333;
}

h4 {
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 4px;
    color: #333;
}

/* -----------------------------------------
   Text
------------------------------------------*/

p {
    margin: 4px 0 8px;
    color: #444;
}

p.topic-title {
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 6px;
    color: #222;
}

ul,
li {
    color: #444;
    margin-left: 18px;
    padding: 0;
}

ul {
    margin-top: 4px;
}

li {
    margin-bottom: 6px;
}

/* -----------------------------------------
   Links
------------------------------------------*/

a {
    color: #0a84ff; /* macOS blue */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* -----------------------------------------
   Navigation bar
------------------------------------------*/

#navbox {
    position: fixed;
    top: 0;
    left: 0;
    height: 32px;
    width: 100%;
    background: #f5f5f7;
    border-bottom: 1px solid #d2d2d7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    box-sizing: border-box;
    z-index: 100;
}

#navbox_left,
#navbox_right {
    font-size: 12px;
}

.navlink_left,
.navlink_right {
    color: #4a4a4a;
}

.navlink_left:hover,
.navlink_right:hover {
    color: #000;
}

/* Fix top spacing so content does not hide behind navbar */
#headerbox {
    margin-top: 52px;
    margin-bottom: 32px;

    /* NEW — align icon and title cleanly */
    display: flex;
    align-items: center;
    gap: 16px; /* nice spacing between icon and title */
}

/* -----------------------------------------
   Header/icon/title
------------------------------------------*/

#iconbox {
    margin: 0;
}

#pagetitle {
    margin: 0;
}

/* --------------------------------------------------------
   Screenshot layout — minimal, responsive, Apple-style
   -------------------------------------------------------- */

#screenshotbox {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

/* All screenshots */
#screenshotbox img,
#screenshotimg {
    display: block;
    margin-left: auto; /* added to center narrow windows */
    margin-right: auto; /* added to center narrow windows */
    height: auto;
    width: auto;
    max-width: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: none;
}

/* Portrait screenshots (auto-detected via aspect ratio) */
#screenshotbox img {
    max-height: 640px; /* keeps portrait iPhone shots reasonable */
}

/* Landscape screenshots */
#screenshotbox img.landscape {
    max-height: none; /* let Mac screenshots scale up */
}

/* On wide screens, arrange portrait screenshots in columns */
@media (min-width: 700px) {
    #screenshotbox {
        justify-content: flex-start;
    }

    #screenshotbox img {
        flex: 0 0 auto;
        max-height: 640px;
    }
}

/* --------------------------------------------------------
   SVG Diagram layout — minimal, responsive, Apple-style
   -------------------------------------------------------- */

#diagrambox {
    margin: 20px 0;
    display: flex;
    justify-content: center; /* center like screenshots */
}

/* SVG behaves differently than screenshots */
#diagrambox img {
    display: block;
    width: 100%; /* allow growth beyond 740 */
    max-width: 1200px; /* optional upper bound */
    height: auto; /* preserve aspect ratio */
}

/* -----------------------------------------
   Boxes, callouts, notes
------------------------------------------*/

#notebox {
    border: 1px solid #d2d2d7;
    background: #fafafb;
    padding: 12px 18px 6px 18px; /* slightly more bottom padding */
    border-radius: 8px;
    margin: 18px 0;
}

/* Toolbar box — like notebox but optimized for icons */
.toolbar-box {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 12px 0 18px;
    background-color: #fafafa;
}

/* Toolbar item: icon + label aligned properly */
.toolbar-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.toolbar-item img {
    width: 16px;
    height: auto;
    margin-right: 10px;
    display: block;
}

.note {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
}

/* -----------------------------------------
   Tables
------------------------------------------*/

table {
    border-collapse: collapse;
    width: 100%;
}

td,
tr {
    font-size: 13.5px;
    padding: 4px 2px;
}

tr {
    border-bottom: 1px solid #e5e5e7;
}

tr:last-child {
    border-bottom: none;
}

table.fixed-cols {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.fixed-cols td,
.fixed-cols th {
    padding: 4px 0px;
    vertical-align: top; /* top-aligns all cells */
    text-align: left; /* explicit left-align */
    word-wrap: break-word; /* prevents overflow in narrow cols */
    overflow-wrap: break-word;
    border-bottom: 1px solid #e5e5e7;
}

.fixed-cols col.code {
    width: 50px;
}

.fixed-cols col.method {
    width: 200px;
}

.fixed-cols col.aka {
    width: 180px;
}

.fixed-cols col.w120 {
    width: 120px;
}

.fixed-cols col.description {
    width: 100%;
}

/* -----------------------------------------
   Images
------------------------------------------*/

.center img,
.icon_center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* -----------------------------------------
   Highlighting
------------------------------------------*/

.highlight {
    font-weight: 600;
    color: #c88700;
}

.secondary {
    color: #666;
}

/* -----------------------------------------
   Code blocks
------------------------------------------*/

code {
    background: #f2f2f7;
    border-radius: 4px;
    padding: 2px 5px;
    font-family: "SF Mono", Menlo, monospace;
    font-size: 12px;
    color: #000;
}

/* -----------------------------------------
   Spacing helpers
------------------------------------------*/

#mainbox {
    margin-top: 12px;
}

.separator,
.rules,
.dots {
    border-bottom: 1px solid #e5e5e7;
    margin: 16px 0;
}
