:root {
    --bg: #f7f5f0;
    --surface: #ffffff;
    --text: #1f2328;
    --muted: #6b6f76;
    --border: #e2ded4;
    --accent: #7a3e1d;
    --accent-text: #ffffff;
    --ok-bg: #e8f4ea;
    --ok-text: #1e5b2b;
    --err-bg: #fbeaea;
    --err-text: #8a1f1f;
    --conf-high: transparent;
    --conf-mid: #fff3c4;
    --conf-low: #fde0cf;
    --conf-unknown: #f9c9c9;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
code { background: #eee9de; padding: 0 .25em; border-radius: 3px; }

.topbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
    padding: .75rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { font-weight: 600; text-decoration: none; color: var(--text); }
.brand-ota { font-family: Amiri, serif; font-size: 1.3rem; color: var(--accent); margin-right: .35rem; }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.topbar nav a { text-decoration: none; color: var(--text); }
.topbar nav a:hover { color: var(--accent); }

.container { max-width: 1000px; margin: 1.5rem auto; padding: 0 1rem; }
.container.narrow { max-width: 520px; }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.25rem; margin-bottom: 1.25rem;
}

label { display: block; margin-bottom: .75rem; font-weight: 500; }
.label { font-weight: 600; }
input, textarea, select {
    width: 100%; padding: .55rem .7rem; margin-top: .3rem; font: inherit;
    border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 .4rem 0 0; }
.check { display: flex; align-items: center; font-weight: 400; margin: 0; }
fieldset.radios { border: 0; padding: 0; margin: 0 0 .75rem; }
fieldset.radios legend { font-weight: 500; margin-bottom: .3rem; }
fieldset.radios .check { margin-bottom: .4rem; }

button, .button {
    display: inline-block; padding: .5rem 1rem; border-radius: 6px; border: 1px solid transparent;
    font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
}
.primary { background: var(--accent); color: var(--accent-text); }
.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.small { padding: .3rem .7rem; font-size: .9rem; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.danger { color: var(--err-text) !important; }
form.inline { display: inline; }

.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: .5rem; }
.row.between { justify-content: space-between; margin-top: 0; }
.row.between .row { margin-top: 0; }
.row .check { margin-right: auto; }
.filters input { flex: 2 1 200px; margin: 0; }
.filters select { flex: 1 1 140px; margin: 0; }
.grid2, .grid3 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.hint { color: var(--muted); font-size: .9rem; margin: .25rem 0 .75rem; }
.hidden { display: none !important; }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.flash.ok { background: var(--ok-bg); color: var(--ok-text); }
.flash.err { background: var(--err-bg); color: var(--err-text); }
ul.flash { padding-left: 2rem; }

.ottoman {
    font-family: Amiri, "Noto Naskh Arabic", "Times New Roman", serif;
    font-size: 1.75rem; line-height: 2.4; white-space: pre-wrap; text-align: right;
}
.ota, .ota-input { font-family: Amiri, "Noto Naskh Arabic", serif; font-size: 1.25rem; }
.ottoman.rika { font-family: "Aref Ruqaa Osmanlica", Amiri, serif; font-size: 1.9rem; }
.script-choice { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.script-choice label { padding: .3rem .8rem; cursor: pointer; font-size: .9rem; }
.script-choice input { position: absolute; opacity: 0; pointer-events: none; }
.script-choice label:has(input:checked) { background: var(--accent); color: #fff; }
.script-choice label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.w { border-radius: 4px; padding: 0 .1em; cursor: pointer; }
.w:hover { outline: 2px solid var(--accent); }
.hint .w { cursor: default; font-size: .85rem; padding: .05rem .4rem; }
.src-LEXICON_WORD { background: var(--conf-high); }
.src-LEXICON_STEM { background: var(--conf-high); box-shadow: inset 0 -2px 0 #c9d8c5; }
.src-ACRONYM { background: var(--conf-mid); }
.src-RULE { background: var(--conf-low); }
.src-UNKNOWN { background: var(--conf-unknown); }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.table th, .table td { padding: .5rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: #f1ede4; font-weight: 600; font-size: .9rem; }
.table td.ota { text-align: right; }
.table td.note { color: var(--muted); font-size: .85rem; max-width: 220px; }
.table td.actions { white-space: nowrap; }
.table td.actions a { margin-right: .75rem; }
form.approve { display: flex; gap: .4rem; align-items: center; }
form.approve input, form.approve select { margin: 0; }
form.approve input.short, input.short { max-width: 140px; }
input.email { max-width: 240px; }
a.button { display: inline-block; text-decoration: none; text-align: center; }
.google-login { display: block; padding: .6rem 1rem; border-radius: 8px; }
.divider { text-align: center; color: var(--muted); margin: 1rem 0 .25rem; font-size: .9rem; }
@media (max-width: 760px) {
    .table { display: block; overflow-x: auto; }
    form.approve { flex-wrap: wrap; }
}

.badge { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; background: #efe8da; }
.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.tabs a { padding: .35rem .8rem; border-radius: 99px; text-decoration: none; border: 1px solid var(--border); background: var(--surface); }
.tabs a.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pager { display: flex; gap: 1rem; justify-content: center; margin: 1rem 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; text-decoration: none; color: var(--text); }
.tile-num { font-size: 2rem; font-weight: 600; color: var(--accent); }
.tile-label { font-weight: 500; }
.tile-sub { color: var(--muted); font-size: .85rem; }


.help ol, .help ul { padding-left: 1.3rem; }
.help li { margin-bottom: .6rem; }
.help .ex { display: block; color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.help .ota { font-size: 1.2rem; }
.help td .ota { font-size: 1.15rem; }
.help .table td { vertical-align: top; }
.toc { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.toc a { text-decoration: none; }
.help-link { font-size: .85rem; font-weight: 400; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 1rem; }

/* Admin → API: kullanım grafikleri */
.usage .usage-tiles { margin: .75rem 0 1rem; }
.usage .tile { border-color: var(--border); }
.usage .tile-num { font-size: 1.6rem; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 760px) { .charts { grid-template-columns: 1fr; } }
.chart { margin: 0; min-width: 0; }
.chart figcaption { font-weight: 600; margin-bottom: .4rem; }
.chart-box { position: relative; height: 240px; }
.usage-table { margin-top: 1rem; }
.usage-table summary { cursor: pointer; color: var(--accent); }
.table-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.table-scroll .table td, .table-scroll .table th { white-space: nowrap; text-align: right; }
.table-scroll .table td:first-child, .table-scroll .table th:first-child { text-align: left; }

/* /eklenti: Chrome eklentisi tanıtım sayfası. Renkler eklentinin ikonu ve mağaza görselleriyle aynı. */
.ext-hero { background: linear-gradient(135deg, #134e4a 0%, #0b2f2c 100%); color: #fff; padding: 3.5rem 1rem; }
.ext-hero-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 2.5rem; }
.ext-hero-icon { flex: none; width: 148px; height: 148px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .3)); }
.ext-kicker { margin: 0 0 .5rem; color: #99e0d6; font-weight: 500; font-size: .9rem; letter-spacing: .02em; }
.ext-hero h1 { font-size: 2.4rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -.015em; }
.ext-ota { font-family: Amiri, serif; font-weight: 700; font-size: 1.15em; white-space: nowrap; }
.ext-lead { margin: 0 0 1.5rem; font-size: 1.1rem; line-height: 1.6; color: #d6f2ee; max-width: 640px; }
.ext-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.ext-btn { background: #fff; color: #0f4f49; font-weight: 600; padding: .75rem 1.4rem; border-radius: 8px; }
.ext-btn:hover { background: #e6f7f4; }
.ext-soon { display: inline-block; padding: .6rem 1.1rem; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .4);
            color: #fff; font-weight: 500; }
.ext-link { color: #99e0d6; text-decoration: none; }
.ext-link:hover { color: #fff; }
.ext-trust { margin: 1.25rem 0 0; font-size: .85rem; color: #99e0d6; }
@media (max-width: 720px) {
    .ext-hero { padding: 2.25rem 1rem; }
    .ext-hero-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
    .ext-hero-icon { width: 88px; height: 88px; }
    .ext-hero h1 { font-size: 1.8rem; }
}

.ext { margin-top: 2.5rem; }
.ext section { margin-bottom: 2.5rem; }
.ext-h2, .ext-compare h2, .ext-final h2 { font-size: 1.45rem; text-align: center; margin-bottom: 1.25rem; }
.ext kbd { font: inherit; font-size: .85em; padding: .05em .4em; border: 1px solid var(--border); border-bottom-width: 2px;
           border-radius: 4px; background: #faf8f3; white-space: nowrap; }

.ext-compare > input { position: absolute; opacity: 0; pointer-events: none; }
.ext-tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ext-tabs label { margin: 0; padding: .4rem 1rem; border-radius: 99px; border: 1px solid var(--border);
                  background: var(--surface); cursor: pointer; font-size: .95rem; }
#v-latin:checked ~ .ext-tabs label[for=v-latin],
#v-matbu:checked ~ .ext-tabs label[for=v-matbu],
#v-rika:checked ~ .ext-tabs label[for=v-rika] { background: #134e4a; border-color: #134e4a; color: #fff; }
#v-latin:focus-visible ~ .ext-tabs label[for=v-latin],
#v-matbu:focus-visible ~ .ext-tabs label[for=v-matbu],
#v-rika:focus-visible ~ .ext-tabs label[for=v-rika] { outline: 2px solid #134e4a; outline-offset: 2px; }
.ext-shot { margin: 0; }
.ext-shot img { display: none; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border);
                box-shadow: 0 12px 32px rgba(31, 35, 40, .12); }
#v-latin:checked ~ .ext-shot .shot-latin,
#v-matbu:checked ~ .ext-shot .shot-matbu,
#v-rika:checked ~ .ext-shot .shot-rika { display: block; }
.ext-shot figcaption { text-align: center; margin-top: .75rem; }

.ext-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.ext-feature { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; }
.ext-feature h3 { font-size: 1.05rem; margin: .6rem 0 .4rem; }
.ext-feature p { margin: 0; color: #3d4148; }
.ext-ic { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem;
          border-radius: 10px; background: #e3f3f0; color: #134e4a; font-size: 1.25rem; }
.ext-ic-ota { font-family: Amiri, serif; font-size: 1.6rem; font-weight: 700; line-height: 1; }
.ext-ex { display: block; margin-top: .4rem; color: var(--muted); font-size: .9rem; }
.ext-ex .ota { font-size: 1.15rem; }

.ext-who p { margin-top: 0; }
.ext-who-list { padding-left: 1.2rem; margin: 0; }
.ext-who-list li { margin-bottom: .4rem; }

.ext-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid;
             grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.ext-steps li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--border);
                border-radius: 10px; padding: 1.25rem 1.25rem 1.25rem 4rem; }
.ext-steps li::before { content: counter(step); position: absolute; left: 1.1rem; top: 1.15rem; width: 2rem; height: 2rem;
                        border-radius: 50%; background: #134e4a; color: #fff; font-weight: 600;
                        display: flex; align-items: center; justify-content: center; }
.ext-steps h3 { margin: .2rem 0 .3rem; font-size: 1.05rem; }
.ext-steps p { margin: 0; }

.ext-settings th { width: 130px; }
.ext-settings .ota { font-size: 1.3rem; }
.ext-settings .ota.rika { font-family: "Aref Ruqaa Osmanlica", Amiri, serif; }

.ext-faq { border-top: 1px solid var(--border); padding: .75rem 0; }
.ext-faq:first-of-type { border-top: 0; padding-top: 0; }
.ext-faq summary { cursor: pointer; font-weight: 600; }
.ext-faq p { margin: .5rem 0 0; }

.ext-final { text-align: center; padding: 2rem 1rem; border-radius: 12px;
             background: linear-gradient(135deg, #134e4a 0%, #0b2f2c 100%); color: #d6f2ee; }
.ext-final h2 { color: #fff; }
.ext-final p { margin: 0; }
.ext-final a:not(.button) { color: #fff; }

.ext-promo { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 10px;
             background: linear-gradient(135deg, #134e4a 0%, #0b2f2c 100%); color: #d6f2ee; text-decoration: none; }
.ext-promo img { flex: none; }
.ext-promo strong { color: #fff; }
.ext-promo-go { margin-left: auto; color: #fff; font-weight: 600; white-space: nowrap; }
.ext-promo:hover .ext-promo-go { text-decoration: underline; }
@media (max-width: 640px) { .ext-promo { flex-wrap: wrap; } .ext-promo-go { margin-left: 0; } }
