/* comparetld.com — tema: System (podrazumevano, prati sistem), Light, Dark (data-theme na <html>, theme.js) */
:root {
  --bg: #f8fafc; --surface: #ffffff; --surface-2: #f1f5f9; --border: #e2e8f0;
  --text: #0f172a; --muted: #64748b; --accent: #0284c7; --accent-2: #0369a1;
  --cta: #4f46e5; --cta-hover: #4338ca; --pick: #059669; --pick-bg: #ecfdf5;
  --ok: #059669; --warn: #b45309; --bad: #dc2626; --header: #ffffff; --code: #f1f5f9;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a; --surface: #111c33; --surface-2: #16223d; --border: #1e293b;
    --text: #e2e8f0; --muted: #94a3b8; --accent: #38bdf8; --accent-2: #7dd3fc;
    --cta: #4f46e5; --cta-hover: #6366f1; --pick: #34d399; --pick-bg: #052e22;
    --ok: #34d399; --warn: #fbbf24; --bad: #f87171; --header: #0a1120; --code: #0a1120;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f172a; --surface: #111c33; --surface-2: #16223d; --border: #1e293b;
  --text: #e2e8f0; --muted: #94a3b8; --accent: #38bdf8; --accent-2: #7dd3fc;
  --cta: #4f46e5; --cta-hover: #6366f1; --pick: #34d399; --pick-bg: #052e22;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171; --header: #0a1120; --code: #0a1120;
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
h1 { font-size: 2rem; line-height: 1.2; margin: 1.5rem 0 .75rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
h3 { font-size: 1.02rem; margin: 1.1rem 0 .35rem; }
p { margin: 0 0 .8rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--code); padding: .05rem .3rem; border-radius: 4px; }
.break { word-break: break-all; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-bottom: 3rem; min-height: 60vh; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 52rem; }
.accent { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* zaglavlje */
.site-header { background: var(--header); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 56px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; color: var(--text); }
.nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: .4rem .65rem; border-radius: 8px; font-size: .93rem; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a.nav-cta { background: var(--cta); color: #fff; font-weight: 600; }
.nav a.nav-cta:hover { background: var(--cta-hover); }
.theme-toggle {
  display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: .3rem .7rem; font: inherit; font-size: .85rem; cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.theme-icon::before { content: "◐"; }
[data-theme-choice="light"] .theme-icon::before { content: "☀"; }
[data-theme-choice="dark"] .theme-icon::before { content: "☾"; }

/* podnožje */
.site-footer { border-top: 1px solid var(--border); background: var(--header); color: var(--muted); font-size: .9rem; }
.footer-row { display: flex; gap: 1.25rem; flex-wrap: wrap; padding: 1.25rem 1rem; }
.site-footer a { color: var(--muted); }

/* kartice, mreža */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
a.card { display: block; color: var(--text); }
a.card:hover { border-color: var(--accent); text-decoration: none; }
.grid { display: grid; gap: 1rem; }
.cards-tld { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.features { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 1rem; }
.feature strong { display: block; margin-bottom: .25rem; }
.feature span { display: block; font-size: .92rem; }
.tld-card { display: flex !important; flex-direction: column; gap: .2rem; }
.tld-name { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.tld-price { font-weight: 700; font-size: 1.1rem; }
.section-title { margin: 2rem 0 1rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; font-weight: 700; color: var(--accent); }

/* naslovna */
.hero { text-align: center; padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2.6rem; }
.hero .lead { margin: 0 auto 1.25rem; }
.hero-links { color: var(--muted); }

/* pretraga */
.search { display: flex; gap: .5rem; max-width: 560px; margin: 0 auto 1rem; }
.search input, .filters input, .pick-form input {
  flex: 1; min-width: 0; font: inherit; padding: .65rem .85rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.search input:focus, .filters input:focus, .pick-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button, .btn-small {
  font: inherit; font-weight: 600; border: 0; border-radius: 10px; background: var(--accent); color: #fff;
  padding: .65rem 1.1rem; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
.btn-small { display: inline-block; padding: .3rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-small:hover { color: #fff; text-decoration: none; filter: brightness(1.08); }
.small-search { margin: .75rem 0 0; }
.small-search input { padding: .45rem .65rem; }
.small-search button { padding: .45rem .8rem; }

/* filteri i tabele */
.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.filters input { max-width: 340px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: var(--surface); color: var(--muted); border-radius: 0; padding: .45rem .8rem; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .55rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tbody tr:hover { background: var(--surface-2); }
.tld-link { font-weight: 700; }
.row-pick td { background: var(--pick-bg); }
.pill { display: inline-block; font-size: .78rem; padding: .05rem .5rem; border-radius: 999px; border: 1px solid var(--border); }
.pill-Open { color: var(--ok); }
.pill-Restricted { color: var(--warn); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-left: .3rem; white-space: nowrap; }
.badge-pick { background: var(--pick); color: #fff; margin-left: 0; }

/* strana TLD-a */
.crumbs { font-size: .88rem; color: var(--muted); margin-top: 1rem; }
.crumbs span { color: var(--text); }
.tld-head h1 { font-size: 2.4rem; margin-bottom: .25rem; }
.tld-country { color: var(--muted); margin-bottom: .5rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { font-size: .82rem; padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
a.chip-link:hover { border-color: var(--accent); text-decoration: none; }
.tld-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; margin-top: 1rem; align-items: start; }
.pick { border-color: var(--pick); }
.pick-head { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; margin-bottom: .5rem; }
.pick-note { margin-bottom: .5rem; }
.pick-prices { display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--muted); }
.pick-prices b { color: var(--text); font-size: 1.15rem; }
.pick-form { display: flex; gap: .5rem; margin-top: .5rem; }
.pick-form button { background: var(--pick); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; font-size: .93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.tld-side .facts { grid-template-columns: 1fr; gap: 0; }
.tld-side .facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .55rem; }
.tld-side .facts dt:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 46rem; }

/* journal */
.post-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.post-list li { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.post-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.post-card { height: 100%; display: flex !important; flex-direction: column; gap: .35rem; margin: 0; }
.post { max-width: 780px; }
.post-body img { max-width: 100%; height: auto; border-radius: 8px; }
.post-body h2 { margin-top: 1.6rem; }
.post-tlds { margin-top: 1.5rem; }

/* tekstovi sa starog sajta (WordPress): whois forma, tabele, slike, istaknuti blokovi */
.post-body .whois-inline { margin: 1.25rem 0; }
.post-body .search-form { display: flex; gap: .5rem; max-width: 560px; }
.post-body .search-input {
  flex: 1; min-width: 0; font: inherit; padding: .65rem .85rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.post-body .search-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.post-body .wp-block-table { overflow-x: auto; margin: 1rem 0; }
.post-body table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.post-body td { overflow-wrap: anywhere; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: .45rem .6rem; text-align: left; vertical-align: top; }
.post-body .is-style-stripes tbody tr:nth-child(odd) { background: var(--surface-2); }
.post-body figure { margin: 1.25rem 0; }
.post-body .wp-element-caption, .post-body figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.post-body .has-medium-font-size { font-size: 1.1rem; }
.post-body .wp-block-group.has-background { border-radius: 10px; margin: 1rem 0; }
.post-body .senka { box-shadow: 0 2px 10px rgba(15, 23, 42, .12); }
.post-body .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
/* tamna tema: fiksne boje iz starih tekstova → boje teme (u svetloj ostaju originalne) */
:root[data-theme="dark"] .post-body [style*="#003300"], :root[data-theme="dark"] .post-body [style*="#008000"] { color: var(--ok) !important; }
:root[data-theme="dark"] .post-body [style*="#ff0000"] { color: var(--bad) !important; }
:root[data-theme="dark"] .post-body [style*="background-color"], :root[data-theme="dark"] .post-body .has-background { background: var(--surface-2) !important; color: var(--text); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .post-body [style*="#003300"], :root:not([data-theme="light"]) .post-body [style*="#008000"] { color: var(--ok) !important; }
  :root:not([data-theme="light"]) .post-body [style*="#ff0000"] { color: var(--bad) !important; }
  :root:not([data-theme="light"]) .post-body [style*="background-color"], :root:not([data-theme="light"]) .post-body .has-background { background: var(--surface-2) !important; color: var(--text); }
}

/* whois */
.whois-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.whois-head h2 { margin: 0; }
.status { font-size: .8rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--surface-2); }
.status-available { color: var(--ok); }
.status-registered { color: var(--accent); }
.status-invalid, .status-unknown { color: var(--bad); }
.raw { background: var(--code); padding: 1rem; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-size: .82rem; max-height: 70vh; }
.notice { background: var(--surface-2); border-left: 3px solid var(--warn); padding: .6rem .9rem; border-radius: 6px; }
.whois-others { margin-top: .75rem; }

/* kuponi, greška */
.coupons { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.coupon strong { display: block; margin: .25rem 0; }
.coupon-discount { display: block; font-size: 1.6rem; font-weight: 800; color: var(--pick); }
.coupon-code { font-size: 1rem; }
.error-page { text-align: center; padding: 3rem 0; }

@media (max-width: 860px) {
  .tld-grid, .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  h1, .tld-head h1 { font-size: 1.7rem; }
  .header-row { flex-wrap: wrap; padding: .5rem 1rem; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .theme-toggle { margin-left: auto; }
  .pick-form, .search, .post-body .search-form { flex-direction: column; }
}
