:root {
    --bg: #f5f7fa;
    --panel: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --line: #dbe3ef;
    --brand: #0f766e;
    --brand-2: #2563eb;
    --danger: #b91c1c;
    --warning: #b7791f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--brand-2);
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px;
}

.topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    min-height: 48px;
}

.brand,
.nav,
.row-actions,
.actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.brand {
    color: var(--text);
    font-weight: 700;
}

.brand-mark {
    align-items: center;
    background: var(--brand);
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.nav a,
.link-button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    padding: 8px 6px;
}

.nav .nav-button {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    min-width: 74px;
    padding: 9px 12px;
    text-align: center;
}

.nav .nav-button:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.auth-grid,
.grid-2 {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.grid-2 {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.narrow {
    max-width: 680px;
    margin: 60px auto;
}

.panel,
.metric,
.symbol-card,
.notice {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.panel {
    padding: 18px;
}

.form-panel {
    display: grid;
    gap: 14px;
}

.form-panel h2,
.panel h2,
.page-head h1,
.auth-grid h1 {
    margin: 0;
}

.eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.muted,
.form-note,
small {
    color: var(--muted);
}

label {
    color: var(--muted);
    display: grid;
    gap: 6px;
    font-size: 14px;
}

input {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
}

.check-row {
    align-items: center;
    display: flex;
}

.check-row input {
    min-height: auto;
    width: auto;
}

.primary,
.button,
.small {
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px;
}

.button.ghost,
.small {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.wide {
    width: 100%;
}

.small {
    min-height: 32px;
    padding: 6px 10px;
}

.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.notice {
    margin-bottom: 14px;
    padding: 12px 14px;
}

.notice-danger {
    border-color: #fecaca;
    color: var(--danger);
}

.page-head {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 20px 0;
}

.search-inline {
    align-items: center;
    display: flex;
    gap: 10px;
}

.search-inline input {
    width: 250px;
}

.metric-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.metric {
    padding: 16px;
}

.metric span,
.status-line span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
}

.metric strong {
    font-size: 26px;
}

.analysis-stack {
    counter-reset: analysis-section;
    display: grid;
    gap: 16px;
}

.analysis-accordion {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.analysis-accordion:hover {
    border-color: #bfd1e3;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.analysis-accordion > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 6px 16px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    list-style: none;
    min-height: 92px;
    padding: 18px 22px;
    position: relative;
}

.analysis-accordion > summary::-webkit-details-marker {
    display: none;
}

.analysis-accordion > summary::before {
    align-items: center;
    background: #0f766e;
    border: 1px solid #c9e3df;
    border-radius: 10px;
    color: #fff;
    content: counter(analysis-section, decimal-leading-zero);
    counter-increment: analysis-section;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    grid-column: 1;
    grid-row: 1 / span 2;
    height: 44px;
    justify-content: center;
    letter-spacing: .04em;
    width: 44px;
}

.analysis-accordion > summary::after {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--brand);
    content: "Detay";
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-content: center;
    min-height: 34px;
    min-width: 72px;
    padding: 8px 13px;
}

.analysis-accordion[open] > summary {
    border-bottom: 1px solid var(--line);
    background: #fbfdff;
}

.analysis-accordion[open] > summary::after {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    content: "Gizle";
}

.analysis-accordion > summary span {
    color: var(--text);
    font-size: 21px;
    font-weight: 800;
    grid-column: 2;
    grid-row: 1;
    line-height: 1.2;
}

.analysis-accordion > summary small {
    color: var(--muted);
    font-size: 14px;
    grid-column: 2;
    grid-row: 2;
    line-height: 1.45;
    max-width: 760px;
}

.analysis-accordion > .grid-2,
.analysis-accordion > .panel {
    border: 0;
    border-radius: 0;
    margin-top: 0;
}

.analysis-accordion > .grid-2 {
    background: #f8fafc;
    gap: 14px;
    padding: 18px;
}

.analysis-accordion > .grid-2 .panel,
.analysis-accordion > .panel {
    padding: 18px;
}

.analysis-accordion > .grid-2 .panel {
    box-shadow: none;
}

.analysis-accordion .panel-head h2 {
    font-size: 22px;
    line-height: 1.2;
}

.analysis-accordion .panel-head {
    border-bottom: 1px solid #edf2f7;
    margin: -2px 0 14px;
    padding-bottom: 12px;
}

.panel-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 11px 8px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

td small {
    display: block;
}

.symbol-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.symbol-card {
    color: var(--text);
    display: grid;
    gap: 6px;
    padding: 14px;
}

.score-list {
    display: grid;
    gap: 12px;
}

.score-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 140px 1fr 56px;
}

.bar {
    background: #e8eef7;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.bar i {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    display: block;
    height: 100%;
}

.kv-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kv-grid div,
.status-line {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
}

.kv-grid span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

.indicator-grid {
    align-items: stretch;
}

.indicator-card {
    display: grid;
    gap: 6px;
}

.indicator-card strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.indicator-card p {
    color: #334155;
    font-size: 12px;
    line-height: 1.42;
    margin: 0;
}

.indicator-card p b {
    color: var(--text);
}

.block-note {
    line-height: 1.55;
    margin: 12px 0 0;
}

.explain-columns {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.explain-columns div,
.news-list a {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.explain-columns span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.news-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.news-list a {
    color: var(--text);
}

.news-list small {
    color: var(--muted);
}

code {
    background: #eef2ff;
    border-radius: 4px;
    padding: 2px 5px;
}

.formula-grid,
.catalog-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.formula-family,
.catalog-grid div {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.formula-family h3 {
    font-size: 15px;
    margin: 0 0 10px;
    text-transform: capitalize;
}

.formula-detail {
    border-top: 1px solid #e6edf6;
}

.formula-detail:first-of-type {
    border-top: 0;
}

.formula-row {
    align-items: center;
    border-top: 0;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto 18px;
    list-style: none;
    padding: 9px 0;
}

.formula-row::-webkit-details-marker {
    display: none;
}

.formula-row::after {
    color: var(--brand);
    content: "+";
    font-weight: 800;
    text-align: right;
}

.formula-detail[open] .formula-row::after {
    content: "-";
}

.formula-row span {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.formula-row strong {
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
}

.formula-explain {
    background: #ffffff;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    margin: 0 0 10px;
    padding: 10px 11px;
}

.formula-explain strong {
    display: block;
    font-size: 14px;
    margin-bottom: 7px;
}

.formula-explain p {
    color: #334155;
    font-size: 13px;
    line-height: 1.45;
    margin: 6px 0;
}

.formula-explain small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 1.4;
    margin-top: 8px;
}

.catalog-grid p {
    color: var(--muted);
    line-height: 1.5;
    margin: 8px 0 0;
}

.radar-form {
    align-items: center;
}

.radar-form input[type="number"] {
    max-width: 120px;
}

.check-line {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    gap: 7px;
    white-space: nowrap;
}

.check-line input {
    height: 16px;
    width: 16px;
}

.radar-table td {
    font-size: 13px;
}

.symbol-link {
    color: var(--brand);
    font-weight: 800;
}

.radar-detail summary {
    color: var(--brand);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    white-space: nowrap;
}

.radar-detail summary::-webkit-details-marker {
    display: none;
}

.radar-detail div {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 7px;
    margin-top: 9px;
    min-width: 320px;
    padding: 10px;
}

.radar-detail p {
    color: #334155;
    line-height: 1.45;
    margin: 0;
}

.radar-detail strong {
    font-size: 12px;
    margin-top: 4px;
    text-transform: uppercase;
}

.radar-detail span {
    color: var(--muted);
    line-height: 1.4;
}

.answer-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.answer-list details {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.answer-list summary {
    color: var(--brand);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.answer-list p {
    color: #334155;
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0 0;
}

.horizon-list {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.horizon-list strong {
    color: var(--text);
    font-size: 12px;
    margin-top: 4px;
    text-transform: uppercase;
}

.horizon-list span {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #334155;
    display: block;
    font-size: 13px;
    line-height: 1.45;
    padding: 9px 10px;
}

.vote-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.vote-pill {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 8px 10px;
    text-transform: capitalize;
}

.vote-pill.positive {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.vote-pill.negative {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.vote-pill.neutral {
    background: #f8fafc;
    border-color: #dbe3ef;
    color: #475569;
}

@media (max-width: 820px) {
    .auth-grid,
    .explain-columns,
    .grid-2,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .page-head,
    .search-inline,
    .topbar,
    .nav {
        align-items: stretch;
        flex-direction: column;
    }

    .search-inline input {
        width: 100%;
    }

    .analysis-accordion > summary {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 104px;
        padding: 15px;
    }

    .analysis-accordion > summary::before {
        height: 40px;
        width: 40px;
    }

    .analysis-accordion > summary::after {
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
        margin-top: 4px;
    }

    .analysis-accordion > summary span,
    .analysis-accordion > summary small {
        grid-column: 2;
    }

    .analysis-accordion > summary span {
        font-size: 18px;
    }

    .analysis-accordion > .grid-2 {
        padding: 12px;
    }
}
