/* ============================================================
   Fetchit! Help — Main Stylesheet
   Brand: #B0600F orange, warm grays
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange:        #B0600F;
    --orange-light:  #D4781A;
    --orange-pale:   #FDF3E8;
    --orange-border: #E8C49A;
    --sidebar-bg:    #2C2420;
    --sidebar-hover: #3D3028;
    --sidebar-active:#B0600F;
    --sidebar-text:  #E8D5C4;
    --sidebar-muted: #9A8070;
    --sidebar-width: 220px;
    --gray-100:      #F7F5F3;
    --gray-200:      #EDE9E4;
    --gray-300:      #D5CFC8;
    --gray-600:      #6B6560;
    --gray-800:      #2E2B28;
    --text:          #2E2B28;
    --text-secondary:#6B6560;
    --link:          #B0600F;
    --tip-bg:        #FDF3E8;
    --tip-border:    #B0600F;
    --note-bg:       #FFF8EC;
    --note-border:   #D4901A;
    --radius:        8px;
    --shadow:        0 2px 12px rgba(0,0,0,0.10);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    background: var(--gray-100);
}

/* ── Layout ─────────────────────────────────────────────── */
.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-header img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-header .brand {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.sidebar-header .brand span {
    color: var(--orange-light);
}

.sidebar nav {
    padding: 10px 0 20px;
    flex: 1;
}

.nav-section {
    margin-bottom: 4px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--sidebar-muted);
    padding: 14px 16px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.nav-section-title .arrow {
    font-size: 9px;
    transition: transform 0.2s;
}

.nav-section-title.collapsed .arrow {
    transform: rotate(-90deg);
}

.nav-items {
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.nav-items.collapsed {
    max-height: 0 !important;
}

.nav-items a {
    display: block;
    padding: 6px 16px 6px 20px;
    font-size: 13px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-items a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-items a.active {
    background: rgba(176, 96, 15, 0.25);
    border-left-color: var(--orange-light);
    color: #fff;
    font-weight: 500;
}

/* ── Main content area ──────────────────────────────────── */
.main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.content {
    max-width: 760px;
    padding: 36px 40px 60px;
    flex: 1;
}

/* ── Page header ────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--orange) 0%, #7A3A08 100%);
    padding: 28px 40px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.page-hero img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.page-hero-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.page-hero-text p {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-top: 2px;
}

/* ── Typography ─────────────────────────────────────────── */
h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange-border);
    letter-spacing: -0.3px;
}

h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--orange);
    margin: 28px 0 10px;
    padding-left: 10px;
    border-left: 3px solid var(--orange);
}

h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 18px 0 6px;
}

p { margin-bottom: 12px; }

ul, ol {
    margin: 0 0 14px 0;
    padding-left: 22px;
}

li { margin-bottom: 5px; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: "SF Mono", Monaco, Menlo, monospace;
    font-size: 12px;
    background: var(--gray-200);
    padding: 2px 5px;
    border-radius: 3px;
    color: #8B3A0A;
}

/* ── Field table ────────────────────────────────────────── */
.field-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.field-table thead th {
    background: var(--gray-800);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: left;
}

.field-table tbody tr:nth-child(odd)  { background: #fff; }
.field-table tbody tr:nth-child(even) { background: var(--gray-100); }

.field-table tbody tr:hover { background: var(--orange-pale); }

.field-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    vertical-align: top;
}

.field-table td:first-child {
    font-weight: 600;
    white-space: nowrap;
    width: 150px;
    color: var(--gray-800);
}

.field-table tbody tr:last-child td { border-bottom: none; }

/* ── Tip / Note callouts ────────────────────────────────── */
.tip, .note {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 16px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tip {
    background: var(--tip-bg);
    border: 1px solid var(--orange-border);
}

.note {
    background: var(--note-bg);
    border: 1px solid var(--note-border);
}

.tip-icon, .note-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.tip p, .note p { margin: 0; font-size: 13px; }

/* ── Welcome page cards ─────────────────────────────────── */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.topic-card {
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
    display: block;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.topic-card:hover {
    box-shadow: 0 4px 16px rgba(176,96,15,0.15);
    border-color: var(--orange-border);
    transform: translateY(-1px);
    text-decoration: none;
}

.topic-card .card-icon { font-size: 22px; margin-bottom: 8px; }
.topic-card .card-title { font-size: 13px; font-weight: 600; color: var(--orange); margin-bottom: 4px; }
.topic-card .card-desc  { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb a { color: var(--orange); }
.breadcrumb .sep { color: var(--gray-300); }

/* ── Zoom controls ──────────────────────────────────────── */
.zoom-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 6px 14px;
    background: #ECEAE6;
    border-bottom: 1px solid var(--gray-300);
    flex-shrink: 0;
}

.zoom-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    background: #fff;
    color: var(--gray-800);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, border-color 0.1s;
}
.zoom-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-600);
}
.zoom-btn:active { background: var(--gray-300); }

.zoom-pct {
    font-size: 11px;
    color: var(--gray-600);
    min-width: 34px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.zoom-reset {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--gray-300);
    border-radius: 5px;
    background: #fff;
    color: var(--gray-600);
    font-size: 11px;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.zoom-reset:hover {
    background: var(--gray-200);
    border-color: var(--gray-600);
    color: var(--gray-800);
}
.zoom-reset:active { background: var(--gray-300); }
