/* Tehnoetika platforma — editorijalna tema (Sapere Aude: Lora/Spectral + krem/zlato), akcent po publikaciji (--accent). */
:root {
  --accent: #8c1b11;          /* fallback burgundy; publikacija ga override-a preko Head inline stila */
  --gold: #b8935a;            /* topli tan/zlato — dekorativni akcent (rubrike, hairline detalji) */
  --ink: #1a1a1a;             /* skoro crna (Substack ink) */
  --muted: #4f4f4f;           /* deck / sekundarni tekst */
  --faint: #8a8078;           /* meta labele, datumi */
  --line: #e4ded4;            /* hairline borderi */
  --rule: #1a1a1a;            /* jaki crni print-rule */
  --bg: #fafafa;              /* Substack off-white */
  --footer-bg: #f3f0e9;       /* topli off-white footer */
  --serif: 'Lora', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  --serif-display: 'Spectral', 'Lora', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; height: auto; }
main { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* Uska čitljiva mjera za članke / arhivu / statične stranice (~70ch). */
.reading-col { max-width: 720px; margin: 0 auto; }

/* Sekcijska labela — sans, uppercase, "print rubrika". */
.section-label {
  font-family: var(--sans); font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .18em; color: var(--faint); margin: 0 0 1rem;
  padding-bottom: .6rem; border-bottom: 2px solid var(--rule);
}

/* ---------- Tenant masthead ---------- */
.site-header { text-align: center; padding: 2.4rem 1rem 1.1rem; border-bottom: 2px solid var(--rule); margin-bottom: 2.4rem; }
.site-identity { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); }
.site-identity:hover { text-decoration: none; }
.site-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.site-name {
  font-family: var(--serif-display); font-weight: 500; line-height: 1.05;
  font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: .01em;
}
.site-tagline { font-family: var(--serif); font-style: italic; color: var(--muted); margin: .5rem auto 1.1rem; max-width: 620px; font-size: 1.05rem; }
.site-nav {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .4rem .9rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
}
.site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a + a { border-left: 1px solid var(--line); padding-left: .9rem; }

/* ---------- Subscribe ---------- */
.subscribe { background: var(--footer-bg); border: 1px solid var(--line); border-radius: 4px; padding: 1.4rem 1.5rem; margin: 0 0 2rem; }
.subscribe-lead { margin: 0 0 .7rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.subscribe-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.subscribe input[type="email"] { flex: 1 1 220px; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: 3px; font-size: 1rem; background: #fff; }
.subscribe button, .btn, button[type="submit"] {
  background: var(--accent); color: #fff; border: 0; border-radius: 3px;
  padding: .6rem 1.3rem; font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; cursor: pointer;
}
.btn { display: inline-block; }
.btn:hover { text-decoration: none; opacity: .92; }

/* ---------- Home: editorijalni grid (featured 2fr + Najnovije 1fr) ---------- */
.home { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.home-cta { margin-top: 3rem; padding-top: 2.4rem; border-top: 2px solid var(--rule); }
.home-cta .subscribe { margin: 0; }

/* Tematske sekcije ispod featured grida (First Things rubrike). */
.home-section { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 2px solid var(--rule); }
.home-section .section-label a { color: var(--ink); }
.home-section .section-label a:hover { color: var(--accent); text-decoration: none; }
.section-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem 2.6rem; }
.section-grid .post-card { border-top: 0; padding: 0; }
@media (max-width: 700px) { .section-grid { grid-template-columns: 1fr; } }

.hero { border: 0; }
.hero-cover { border-radius: 3px; margin-bottom: 1rem; width: 100%; }
.hero h2 { font-family: var(--serif-display); font-weight: 500; letter-spacing: -.01em; font-size: clamp(1.9rem, 3.4vw, 3rem); margin: 0 0 .5rem; line-height: 1.08; }
.hero h2 a { color: var(--ink); }
.hero h2 a:hover { color: var(--accent); text-decoration: none; }
.hero-subtitle { font-family: var(--serif); color: var(--muted); font-size: 1.2rem; line-height: 1.45; margin: 0 0 .6rem; }

/* Meta (datumi/kicker) — sans, uppercase. */
.hero time, .post-card time, .latest-item time {
  display: inline-block; font-family: var(--sans); font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; color: var(--faint);
}

/* Najnovije — tekstualna lista bez thumbnaila. */
.home-latest { position: sticky; top: 1.5rem; }
.latest { list-style: none; margin: 0; padding: 0; }
.latest-item { padding: .9rem 0; border-top: 1px solid var(--line); }
.latest-item:first-child { border-top: 0; padding-top: 0; }
.latest-item a { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; line-height: 1.2; color: var(--ink); display: block; margin-bottom: .3rem; }
.latest-item a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Post lista / kartice (arhiva + sekundarni) ---------- */
.post-list { display: flex; flex-direction: column; }
.post-card { display: flex; gap: 1.4rem; justify-content: space-between; align-items: start; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.post-card:first-child { border-top: 0; }
.post-card-text { flex: 1; }
.post-card h3 { font-family: var(--serif-display); font-weight: 500; font-size: 1.5rem; margin: 0 0 .35rem; line-height: 1.15; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--accent); text-decoration: none; }
.post-card-subtitle { font-family: var(--serif); color: var(--muted); margin: 0 0 .45rem; font-size: 1.02rem; line-height: 1.4; }
.post-card-thumb { width: 150px; height: 100px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }

.page-title { font-family: var(--serif-display); font-weight: 500; font-size: clamp(1.9rem, 3vw, 2.4rem); margin: 0 0 1.4rem; letter-spacing: -.01em; }
.pagination { display: flex; justify-content: space-between; padding: 1.8rem 0; font-family: var(--sans); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.more { margin-top: 1rem; font-family: var(--sans); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.empty { color: var(--muted); text-align: center; padding: 2rem 0; }

/* ---------- Article / reading ---------- */
.post h1 { font-family: var(--serif-display); font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5rem; }
.post-subtitle { font-family: var(--serif); color: var(--muted); font-size: 1.35rem; line-height: 1.35; margin: 0 0 1.2rem; }
.byline {
  display: flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem;
  padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
}
.byline img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.byline > span:not(.dot) { color: var(--accent); }
.byline .dot { color: var(--line); }
.byline time { color: var(--faint); }
.post-cover { border-radius: 3px; margin-bottom: 1.6rem; width: 100%; }

.post-body { font-family: var(--serif); font-size: var(--body-size, 1.25rem); line-height: 1.7; color: var(--ink); }
.post-body > p { margin: 0 0 1.1em; }
.post-body > p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-weight: 500; font-size: 3.4em;
  line-height: .74; padding: .05em .08em 0 0; color: var(--ink);
}
.post-body h2, .post-body h3, .post-body h4 { font-family: var(--serif-display); font-weight: 500; line-height: 1.2; margin: 1.6em 0 .5em; }
.post-body h2 { font-size: 1.6rem; }
.post-body h3 { font-size: 1.35rem; }
.post-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2rem auto; width: 40%; }
.post-body blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: .2em 0 .2em 1.3em; color: var(--muted); font-style: italic; }
.post-body img { border-radius: 3px; margin: 1em 0; }
.post-body code { background: #f2efe8; padding: .1em .35em; border-radius: 3px; font-size: .85em; font-family: ui-monospace, monospace; }
.post-body pre { background: #f2efe8; padding: 1em; border-radius: 6px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; }

.embed { position: relative; aspect-ratio: 16 / 9; margin: 1.4em 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 3px; }
.embed-video video { width: 100%; border-radius: 3px; margin: 1.4em 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); border-top: 2px solid var(--rule); margin-top: 4rem; padding: 2.5rem 1.5rem; }
.site-footer .subscribe { max-width: 620px; margin: 0 auto 1.4rem; background: #fff; }
.footer-meta { text-align: center; color: var(--faint); font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-meta a { color: var(--muted); }

.flash { padding: .8rem 1rem; border-radius: 4px; margin: 1rem 0; }
.flash-ok { background: #e8f5ee; border: 1px solid #b7dfc9; }
.flash-err { background: #fdeaea; border: 1px solid #f2bcbc; }

/* Tenant responsive */
@media (max-width: 820px) {
  .home { grid-template-columns: 1fr; gap: 2.4rem; }
  .home-latest { position: static; }
}
@media (max-width: 560px) {
  .post-card-thumb { width: 96px; height: 68px; }
  .post-body > p:first-of-type::first-letter { font-size: 2.8em; }
}

/* ---------- Platforma / dashboard ---------- */
.platform main.platform-main { max-width: 960px; padding-top: 1.5rem; }
.platform-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 3.5rem; padding: .6rem 1.5rem; border-bottom: 1px solid var(--line); }
.platform-header .brand { display: inline-flex; align-items: center; line-height: 1; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.platform-header .brand span { color: var(--accent); font-weight: 400; }
.platform-header nav { display: flex; align-items: center; gap: 1rem; }
.platform-header nav a { display: inline-flex; align-items: center; line-height: 1; }
.platform-header .inline-form { display: inline-flex; align-items: center; margin: 0; }
.platform-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem; }
.inline-form { display: inline; }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 1rem; padding: 0; }

.landing-hero { text-align: center; padding: 3rem 1rem 2rem; }
.landing-hero h1 { font-family: var(--serif); font-size: 2.2rem; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; padding: 1rem 0; }
.pub-card { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; color: var(--ink); background: #fff; }
.pub-card:hover { border-color: var(--accent); text-decoration: none; }
.pub-card h3 { margin: 0 0 .3rem; }
.pub-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.pub-card.new { border-style: dashed; text-align: center; color: var(--accent); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; margin: 1rem 0; }
.card.narrow { max-width: 420px; margin: 2rem auto; }
label { display: block; margin: .8rem 0; font-weight: 600; font-size: .95rem; }
label input, label select, label textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .5rem .7rem;
  border: 1px solid var(--line); border-radius: 6px; font-size: 1rem; font-family: inherit; font-weight: 400;
}
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
label.check input { width: auto; margin: 0; }
.muted { color: var(--muted); font-weight: 400; font-size: .9rem; }

.dash-nav { display: flex; align-items: center; gap: 1.2rem; padding: .8rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.dash-nav a.active { font-weight: 700; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Rubrike (dashboard) */
.cat-add { display: flex; gap: .6rem; margin: 1rem 0 1.4rem; flex-wrap: wrap; }
.cat-add input { flex: 1 1 260px; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: 6px; font-size: 1rem; background: #fff; }
.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: .5rem; }
.cat-list li > a { font-weight: 600; }
.cat-list li code { font-size: .85rem; }
.cat-list li .inline-form { margin-left: auto; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.table th, .table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.badge { font-size: .78rem; padding: .15rem .5rem; border-radius: 99px; background: #eee; }
.badge-published, .badge-confirmed { background: #e8f5ee; color: #14683f; }
.badge-draft, .badge-pending { background: #fdf3e0; color: #8a5a00; }
.badge-unsubscribed { background: #fdeaea; color: #a02020; }

/* Editor */
.editor { display: grid; grid-template-columns: 1fr 260px; gap: 1.5rem; align-items: start; }
@media (max-width: 800px) { .editor { grid-template-columns: 1fr; } .post-card-thumb { width: 90px; height: 64px; } }
.editor-title { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; border: 0; border-bottom: 1px solid var(--line); width: 100%; padding: .4rem 0; background: transparent; }
.editor-subtitle { font-size: 1.05rem; color: var(--muted); border: 0; border-bottom: 1px solid var(--line); width: 100%; padding: .4rem 0; margin-top: .3rem; background: transparent; }
.editor-toolbar { display: flex; gap: .4rem; align-items: center; margin: .8rem 0; flex-wrap: wrap; }
.editor-toolbar button { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: .35rem .7rem; cursor: pointer; }
.editor-toolbar button:hover { background: var(--paper, #f7f5f0); }
.editor-toolbar button.fmt { min-width: 2rem; padding: .35rem .55rem; font-size: .95rem; line-height: 1; text-align: center; }
.editor-toolbar .tb-sep { width: 1px; align-self: stretch; background: var(--line); margin: .1rem .3rem; }
#body-md { width: 100%; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .95rem; line-height: 1.6; padding: .8rem; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
#body-md.drag-over { border-color: var(--accent, #1a7f6b); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #1a7f6b) 20%, transparent); }
.preview-pane { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.4rem; margin-top: .8rem; }
.editor-side { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.editor-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.editor-actions button { width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: .5rem; cursor: pointer; }
.editor-actions button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.editor-actions button.warn { color: #8a5a00; }
.editor-actions button.danger, button.danger { color: #a02020; border-color: #f2bcbc; background: #fff; }
button.small { font-size: .8rem; padding: .2rem .5rem; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.media-item { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.media-item img, .media-item video { width: 100%; height: 140px; object-fit: cover; display: block; }
.media-item figcaption { padding: .5rem; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.media-item code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.logo-preview { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin-top: .5rem; }

/* Domovina SSO login */
#sso-box #sso-magic { width: 100%; }
.sso-or { display: flex; align-items: center; gap: .75rem; color: var(--muted, #888); margin: 1.1rem 0; font-size: .85rem; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
button.secondary { width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover { opacity: .92; }
#sso-status:not([hidden]) { display: block; }

/* Google sign-in button (službeni izgled: bijela pozadina, G logo) */
.btn-google {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  background: #fff; color: #3c4043; border: 1px solid #dadce0; border-radius: 8px;
  padding: .65rem 1rem; font-size: .95rem; font-weight: 500; line-height: 1; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn-google:hover { background: #f7f8f9; box-shadow: 0 1px 3px rgba(60,64,67,.18); border-color: #d2d5d9; }
.btn-google:active { background: #eef0f2; }
.btn-google .g-logo { flex: 0 0 auto; display: block; }

/* ================= Institucionalna stranica (PLAN-tehnoetika-site.md) ================= */

/* Mobilni izbornik: checkbox hack, bez JS-a. */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }
@media (max-width: 700px) {
  .nav-toggle-label {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: .6rem; cursor: pointer;
    font-family: var(--sans); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
    border: 1px solid var(--line); border-radius: 3px; padding: .45rem .9rem; background: #fff;
  }
  .site-nav { display: none; flex-direction: column; gap: 0; margin-top: .8rem; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 2px solid var(--accent); }
  .site-nav a { padding: .7rem 0; width: 100%; }
  .site-nav a + a { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}

.kicker {
  display: inline-block; font-family: var(--sans); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin-bottom: .6rem;
}
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.muted-note { color: var(--faint); font-family: var(--serif); font-style: italic; margin: .4rem 0 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.chips a {
  font-family: var(--sans); font-size: .78rem; font-weight: 600; padding: .3rem .8rem; border-radius: 99px;
  border: 1px solid var(--line); color: var(--ink); background: #fff;
}
.chips a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips a:hover { text-decoration: none; border-color: var(--ink); }

/* Institucionalna naslovnica */
.inst-intro { max-width: 760px; margin: 0 auto 2.4rem; text-align: center; }
.inst-intro .post-body > p:first-of-type::first-letter { float: none; font-size: inherit; font-weight: inherit; padding: 0; line-height: inherit; color: inherit; }
.inst-intro .post-body { font-size: calc(var(--body-size, 1.25rem) * 1.05); color: var(--muted); }
.inst-featured {
  border-top: 2px solid var(--rule); border-bottom: 1px solid var(--line); padding: 2rem 0 2.2rem; margin-bottom: 1rem; text-align: center;
}
.inst-featured h2 { font-family: var(--serif-display); font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 .5rem; line-height: 1.1; }
.inst-featured h2 a { color: var(--ink); }
.inst-featured-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: 1.2rem 0 0; }
.inst-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 3rem; align-items: start; }
.inst-grid > .home-section:only-child { grid-column: 1 / -1; }
@media (max-width: 820px) { .inst-grid { grid-template-columns: 1fr; gap: 0; } }

/* Aktivnosti */
.events { margin-bottom: 2.4rem; }
.event-card { display: flex; gap: 1.2rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.section-label + .event-card, .events .section-label + .event-card { border-top: 0; }
.event-date {
  flex: 0 0 64px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--ink); border-radius: 3px; background: #fff;
}
.event-day { font-family: var(--serif-display); font-size: 1.7rem; line-height: 1; font-weight: 500; }
.event-month { font-family: var(--sans); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.event-card.is-past .event-date { border-color: var(--line); color: var(--faint); }
.event-card.is-past .event-month { color: var(--faint); }
.event-text h3 { font-family: var(--serif-display); font-weight: 500; font-size: 1.35rem; margin: 0 0 .25rem; line-height: 1.2; }
.event-text h3 a { color: var(--ink); }
.event-meta { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin: 0 0 .35rem; }
.event-note-link { font-family: var(--sans); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.event-box { background: var(--footer-bg); border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.3rem; margin: 0 0 1.6rem; font-family: var(--sans); font-size: .95rem; }
.event-box p { margin: .3rem 0; }
.event-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .8rem !important; }
.event-past-note { font-family: var(--sans); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin-top: 1rem !important; }

/* Video */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.8rem 1.6rem; }
.video-card h3 { font-family: var(--serif-display); font-weight: 500; font-size: 1.2rem; line-height: 1.25; margin: .7rem 0 .25rem; }
.video-card h3 a { color: var(--ink); }
.video-card time { font-family: var(--sans); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.video-thumb:hover img { transform: scale(1.03); }
.video-thumb .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%;
  background: rgba(0,0,0,.62); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; padding-left: 4px;
}
.video-player { margin: 0 0 1.6rem; }
.video-player .embed { margin: 0; }

/* Projekti */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.project-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.project-text { padding: 1.1rem 1.2rem 1.3rem; }
.project-text h3 { font-family: var(--serif-display); font-weight: 500; font-size: 1.35rem; margin: .4rem 0 .35rem; line-height: 1.2; }
.project-text h3 a { color: var(--ink); }
.project-status { font-family: var(--sans); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding: .2rem .55rem; border-radius: 99px; background: #eee; }
.status-active { background: #e8f5ee; color: #14683f; }
.status-planned { background: #fdf3e0; color: #8a5a00; }
.status-done { background: #ecebe8; color: #555; }
.project-link { font-family: var(--sans); font-size: .78rem; font-weight: 700; }

/* Prilog (PDF Deklaracije) */
.attachment {
  display: flex; gap: 1rem; align-items: center; margin: 2rem 0; padding: 1.1rem 1.3rem;
  background: var(--footer-bg); border: 1px solid var(--line); border-radius: 4px; font-family: var(--sans);
}
.attachment p { margin: .6rem 0 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.attachment-icon {
  flex: 0 0 52px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 3px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: .8rem; letter-spacing: .08em;
}

/* Tipografski blokovi u tekstu */
.post-body figure.fig { margin: 1.6em 0; }
.post-body figure.fig img { margin: 0; display: block; width: 100%; }
.post-body figure.fig-center { max-width: 100%; }
.post-body figure.fig-wide { margin-left: calc(50% - min(48vw, 560px)); margin-right: calc(50% - min(48vw, 560px)); }
.post-body figure.fig-left { float: left; width: 45%; margin: .3em 1.4em .8em 0; }
.post-body figure.fig-right { float: right; width: 45%; margin: .3em 0 .8em 1.4em; }
@media (max-width: 600px) { .post-body figure.fig-left, .post-body figure.fig-right { float: none; width: 100%; margin: 1.4em 0; } }
.post-body figcaption { font-family: var(--sans); font-size: .82rem; color: var(--faint); margin-top: .5rem; line-height: 1.4; text-align: center; }
.post-body blockquote.pullquote {
  border: 0; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); padding: 1rem 0; margin: 2rem 0;
  font-family: var(--serif-display); font-size: 1.55em; line-height: 1.3; font-style: italic; color: var(--ink); text-align: center;
}
.post-body blockquote.pullquote p { margin: 0; }
.post-body table { border-collapse: collapse; width: 100%; font-size: .85em; margin: 1.4em 0; font-family: var(--sans); }
.post-body th, .post-body td { border-bottom: 1px solid var(--line); padding: .5em .6em; text-align: left; }
.post-body th { border-bottom: 2px solid var(--rule); }
.post-body sup.fnref { font-family: var(--sans); font-size: .65em; line-height: 0; }
.post-body sup.fnref a { text-decoration: none; padding: 0 .1em; }
.post-body .footnotes { clear: both; border-top: 1px solid var(--line); margin-top: 2.4rem; padding-top: 1rem; font-size: .8em; color: var(--muted); }
.post-body .footnotes ol { padding-left: 1.4em; }
.post-body .fnback { text-decoration: none; }
.post-body::after { content: ""; display: block; clear: both; }

.footer-info { max-width: 620px; margin: 0 auto 1.2rem; text-align: center; font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.footer-info p { margin: .3rem 0; }

/* ================= Dashboard: editor i nove stranice ================= */
.editor-main { position: relative; min-width: 0; }
.editor-toolbar { flex-direction: column; align-items: stretch; gap: .35rem; }
.tb-row { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.editor-toolbar button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.editor-panes.split { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.editor-panes.split .preview-pane { margin-top: 0; max-height: 70vh; overflow: auto; font-size: 1.05rem; }
@media (max-width: 1000px) { .editor-panes.split { grid-template-columns: 1fr; } }
.editor-status { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--faint); margin-top: .35rem; flex-wrap: wrap; }
.float-toolbar {
  position: absolute; z-index: 20; display: flex; gap: 2px; background: var(--ink); border-radius: 6px; padding: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.float-toolbar[hidden] { display: none; }
.float-toolbar button { background: transparent; color: #fff; border: 0; border-radius: 4px; padding: .35rem .6rem; cursor: pointer; font-size: .9rem; min-width: 2rem; }
.float-toolbar button:hover { background: rgba(255,255,255,.16); }
.type-fields { border: 1px solid var(--line); border-radius: 8px; padding: .4rem 1rem .6rem; margin: .8rem 0 0; background: #fff; }
.type-fields legend { font-weight: 700; font-size: .85rem; padding: 0 .3rem; }
.type-fields[hidden] { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
label[hidden] { display: none; }

.img-dialog { border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; max-width: 640px; width: calc(100% - 2rem); }
.img-dialog::backdrop { background: rgba(0,0,0,.35); }
.img-dialog h2 { margin: 0 0 .8rem; font-size: 1.2rem; }
.img-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .45rem; max-height: 260px; overflow: auto; padding: 2px; }
.img-choice { padding: 0; border: 2px solid transparent; border-radius: 6px; background: #f3f0e9; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.img-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-choice.selected { border-color: var(--accent); }
.img-upload { font-size: .8rem; color: var(--accent); font-weight: 700; }
.align-pick { border: 0; padding: 0; margin: .6rem 0; display: grid; grid-template-columns: 1fr 1fr; }
.align-pick legend { font-weight: 600; font-size: .95rem; margin-bottom: .2rem; }
.align-pick label { margin: .2rem 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.secondary-btn, button.secondary-btn[type="submit"] { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.dialog-actions button[disabled], .dialog-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }

.nav-editor input:not([type="checkbox"]) { width: 100%; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 6px; font-size: .95rem; }
.nav-table td { vertical-align: middle; }
.nav-ops { white-space: nowrap; }
.nav-ops button { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: .25rem .5rem; cursor: pointer; font-size: .85rem; }
.nav-ops button[disabled] { opacity: .35; cursor: default; }
.nav-add { display: grid; grid-template-columns: 1fr 1.4fr; gap: .6rem; margin: 1rem 0; }
.nav-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.warn-text { display: block; color: #a05a00; font-size: .78rem; margin-top: .2rem; }
.badge-featured { background: #efe6f7; color: #5b2a86; margin-left: .4rem; }
.media-upload { display: inline-flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.media-file { display: flex; align-items: center; justify-content: center; height: 140px; background: var(--accent); color: #fff; font-weight: 800; letter-spacing: .1em; }
.media-file:hover { text-decoration: none; opacity: .9; }

/* Ispis / PDF (npr. Deklaracija): samo tekst, bez izbornika i pretplate. */
@media print {
  body { background: #fff; }
  .site-nav, .nav-toggle-label, .site-footer, .attachment, .kicker, .event-actions { display: none !important; }
  .site-header { padding: 0 0 .6rem; margin-bottom: 1.2rem; border-bottom: 1px solid #000; }
  .site-logo { width: 36px; height: 36px; }
  .site-name { font-size: 1.3rem; }
  .site-tagline { margin: .2rem auto 0; font-size: .85rem; }
  main { padding: 0; max-width: none; }
  .reading-col { max-width: none; }
  .post h1 { font-size: 1.9rem; }
  .post-body { font-size: 11.5pt; line-height: 1.5; }
  .post-body > p:first-of-type::first-letter { float: none; font-size: inherit; padding: 0; line-height: inherit; }
  .post-cover { display: none; }
  .post-body h2, .post-body h3 { break-after: avoid; }
  .post-body p { orphans: 3; widows: 3; }
  a { color: inherit; text-decoration: none; }
}
