/* Base styles extracted from inline <style> for better CSP and maintainability */
/* 
 * LOGO COLORS:
 * Primary: #d5e222 (bright yellow-green)
 * Secondary: #195b91 (dark blue)
 * These colors define the brand identity and should be used consistently across the application
 */
:root {
  --text: #111;
  --muted: #555;
  --primary: #2ea44f;
  --primary-contrast: #fff;
  --secondary: #586069;
  --border: #e1e4e8;
  --link: #0366d6;
  --surface: #fff;
  --surface-alt: #f6f8fa;
}

html, body { height: 100%; min-width: min-content; font-size: clamp(1rem, 0.6rem + 2vw, 1.15rem);}
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; margin: 0; color: var(--text); background: var(--surface); }

/* Slightly reduce font size at desktop breakpoint for better fit */
html.responsive-desktop-font {
  font-size: 1.022rem; /* Slightly shrink font size at 550px+ viewport width */
}

header, footer { padding: 1rem; background: var(--surface-alt); }

nav a { margin-right: .75rem; text-decoration: none; color: var(--link); }

.header-nav { display: flex; gap: 1.5rem; margin-top: 1rem; }
.header-nav a { margin-right: 0; color: var(--text); font-weight: 500; }
.header-nav a:hover { color: var(--link); }

main { padding-bottom: 1rem; }

.container { max-width: 68.75rem; margin: 0 auto; }

.muted { color: var(--muted); font-size: 0.825rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); }

.card { border: 1px solid var(--border); border-radius: 0.375rem; padding: 1rem; background: var(--surface); }

.btn { display: inline-block; background: var(--primary); color: var(--primary-contrast); padding: .5rem .9rem; border-radius: 0.375rem; text-decoration: none; }
.btn.secondary { background: var(--secondary); }

/* small utilities to replace inline styles */
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem;}
.flex-center { display: flex; align-items: center; }
.gap-sm { gap: .5rem; }
.v-middle { vertical-align: middle; }
.mt-sm { margin-top: .5rem; }
.mt-md { margin-top: 1rem; }
.ml-sm { margin-left: .5rem; }

/* Zoom Controls */
.zoom-controls-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-left: auto;
}

.btn-zoom-nav {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-zoom-nav:hover {
    background: var(--surface-alt);
    border-color: var(--link);
    color: var(--link);
}

/* Zoom Modal */
.zoom-modal {
    opacity: 80%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.zoom-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 0.75rem;
    max-width: 31.25rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.zoom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    cursor: move;
    user-select: none;
}

.zoom-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.zoom-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.zoom-modal-close:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.zoom-modal-body {
    padding: 1.5rem;
}

.zoom-section {
    margin-bottom: 1.5rem;
}

.zoom-section:last-child {
    margin-bottom: 0;
}

.zoom-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text);
}

.zoom-description {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.zoom-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.zoom-buttons .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
}

.zoom-divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

.zoom-checkbox-setting {
    margin-top: 1rem;
}

.zoom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.zoom-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--link);
}
