/* Stock Screener shared design system. Consolidated from inline <style>
   blocks previously duplicated across htdocs/index.php, htdocs/portal.php,
   htdocs/results.php, and htdocs/brief.php. Behavior-preserving cleanup only. */

/* Body baseline */
body {
    font-family: Arial, sans-serif;
    margin: 2rem auto;
    max-width: 1080px;
    padding: 0 1rem 3rem;
    color: #1f2933;
}

/* Typography */
h1, h2 { margin-bottom: 0.75rem; }
h2 { margin-top: 0; }
p { line-height: 1.5; }

/* Tables */
table { border-collapse: collapse; width: 100%; }
th, td {
    border-bottom: 1px solid #d9e2ec;
    padding: 0.75rem;
    text-align: left;
    vertical-align: middle;
}
th { background: #f5f7fa; }

/* Inputs and buttons */
input[type="number"] {
    width: 7rem;
    padding: 0.45rem 0.5rem;
}
input[type="text"] {
    width: 16rem;
    padding: 0.55rem 0.65rem;
    font-size: 1rem;
    text-transform: uppercase;
}
button {
    background: #0b69a3;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    padding: 0.7rem 1rem;
}

/* Flash banners */
.flash {
    border-radius: 8px;
    margin: 1rem 0;
    padding: 0.85rem 1rem;
}
.flash-success { background: #e3f9e5; color: #1f5132; }
.flash-error   { background: #fde8e8; color: #7b1e1e; }

/* Brief layout primitives */
.subtitle { color: #52606d; margin-top: -0.15rem; }
.notes {
    background: #f5f7fa;
    border-left: 4px solid #d9e2ec;
    border-radius: 6px;
    margin: 1rem 0 1.5rem;
    padding: 0.85rem 1rem;
}
.headline-card {
    background: #f5f7fa;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 1.5rem 0;
    padding: 1.25rem;
}
.headline-label {
    color: #52606d;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}
.headline-value { font-size: 2rem; font-weight: 700; }
.category-section { margin-top: 1.75rem; }
.category-score {
    color: #52606d;
    font-weight: 700;
    margin: 0.25rem 0 0.75rem;
}
.empty, .error { border-radius: 8px; padding: 1rem; }
.empty { background: #f5f7fa; }
.error { background: #fde8e8; color: #7b1e1e; }
.footer-links { margin-top: 2rem; }

/* Misc helpers */
.badge {
    background: #d9e2ec;
    border-radius: 999px;
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    padding: 0.15rem 0.55rem;
}
.direction { color: #52606d; font-size: 0.95rem; margin-left: 0.5rem; }
.actions { margin-top: 1rem; }
.help { color: #52606d; font-size: 0.9rem; margin-top: 0.5rem; }
.tip  { color: #52606d; font-size: 0.9rem; margin-top: 0.25rem; }
a { color: #0b69a3; }
label { display: block; font-weight: 600; margin-bottom: 0.4rem; }

/* Site navigation (harmonized header partial) */
.site-nav {
    margin-bottom: 1.5rem;
}
.site-nav a,
.site-nav span {
    margin-right: 1rem;
}
.site-nav .is-active {
    font-weight: 700;
}

.hero-banner {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0 0 1.5rem;
}

.section-banner {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 0 0 1rem;
}

.decor-figure {
    display: block;
    max-width: 220px;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

.decor-right {
    float: right;
    margin: 0 0 1rem 1rem;
}

@media (max-width: 700px) {
    .decor-right {
        float: none;
        max-width: 100%;
        margin: 1rem auto;
    }
}

.headline-decor {
    grid-column: 1 / -1;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 12px;
}

.mascot {
    max-width: 240px;
}

.form-with-mascot {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.form-with-mascot form {
    flex: 1 1 320px;
}

.category-icon {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}
