@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

/* ============================================================
   Czech Studies — shared theme (design system) · "Sunset".
   Canonical source of the common look for BOTH czech-web and
   czech-admin. czech-web serves this file; czech-admin links to
   it. Edit here to change the shared style in both places.
   ============================================================ */

:root {
  --bg:      #FBF6EF;   /* warm cream page */
  --ink:     #2A2320;
  --muted:   #8A7F76;
  --card:    #ffffff;
  --line:    #ECE3D8;   /* warm hairline */
  --plum:    #6D3B7E;
  --plum-2:  #7C4A8D;
  --coral:   #E8623F;
  --coral-2: #D6532F;
  --sep:     #C7CBD1;   /* grey separator */
  --arrow:   #A6ABB4;   /* grey collapsible arrow */
  --radius:  14px;
  --shadow:  0 1px 2px rgba(40,24,16,.05), 0 8px 24px rgba(40,24,16,.06);
  --shadow-hover: 0 2px 4px rgba(40,24,16,.07), 0 14px 34px rgba(40,24,16,.10);
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

.wrap { width: min(1040px, 92vw); margin-inline: auto; }
.muted { color: var(--muted); }
.muted-link { color: var(--plum); text-decoration: none; }
.muted-link:hover { text-decoration: underline; }

/* ---- Header ---- */
.site-header {
  background: linear-gradient(135deg, var(--plum) 0%, var(--coral) 100%);
  color: #fff;
  padding: 1.0rem 0 1.8rem;
  border-bottom: 2px solid var(--coral-2);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-title { margin: 0; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.01em; }
.site-tagline { margin: .6rem 0 .2rem; font-size: 1.05rem; opacity: .95; }
.site-subtagline { margin: 0; font-size: .95rem; opacity: .82; }
/* admin header variant */
.brand { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; }
.brand small { font-family: var(--font-body); font-weight: 400; opacity: .85; }
.who { font-size: .9rem; opacity: .95; }
.who a { color: #fff; }

main.wrap { padding: 1.6rem 0 3rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; border: 0; border-radius: 10px; cursor: pointer;
  padding: .55rem 1rem; font-size: .95rem; font-weight: 600; text-decoration: none;
  font-family: inherit;
}
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-2); }
.btn-ghost { background: #F1E9DF; color: var(--ink); }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; }
.btn[disabled], .btn.disabled { opacity: .5; cursor: not-allowed; }

.pill {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  color: var(--plum); background: #EFE6F4; padding: .15rem .5rem; border-radius: 999px;
  align-self: flex-start;
}

/* ---- Back link (section page / admin sub-pages) ---- */
.back-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--plum); text-decoration: none; font-size: .95rem; font-weight: 600;
  margin-bottom: 1rem;
}
.back-link:hover { text-decoration: underline; }

/* ---- Page header (section page) ---- */
.page-title { margin: 0 0 .2rem; font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; }
.page-title::after { content: ""; display: block; width: 44px; height: 3px; margin-top: .5rem; background: var(--sep); border-radius: 2px; }

/* ---- Tag filter bar (section page) ---- */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 1.4rem 0 .2rem;
}
.filter-label {
  font-family: var(--font-body); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .07em; font-weight: 700; color: var(--muted); margin-right: .35rem;
}
.tag-chip {
  font-family: var(--font-body); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; color: var(--plum); background: #EFE6F4;
  border: 1px solid #E4D6EE; padding: .38rem .85rem; border-radius: 999px;
  line-height: 1; cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.tag-chip:hover { background: #E7D8F0; border-color: #D3BCE3; }
.tag-chip:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.tag-chip.active { background: var(--plum); color: #fff; border-color: var(--plum); }
.clear-filters {
  font-family: var(--font-body); font-size: .8rem; font-weight: 600; color: var(--coral);
  background: none; border: 0; padding: .38rem .4rem; margin-left: .1rem; cursor: pointer;
}
.clear-filters:hover { text-decoration: underline; }
.clear-filters:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

/* ---- Home: section selection cards ---- */
.section-grid {
  display: grid; gap: 1rem; margin-top: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.section-card {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.3rem 1.4rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.section-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #E0D3C4; }
.section-card h2 { margin: 0; font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; }
.section-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.section-card .chev { margin-top: .5rem; color: var(--coral); font-size: .85rem; font-weight: 600; }

/* ---- Collapsible groups (inside a section page) ---- */
.group { margin-top: 1.4rem; }
.group-summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: .6rem; padding: .15rem 0; user-select: none;
}
.group-summary::-webkit-details-marker { display: none; }
.group-summary::before {
  content: ""; flex: 0 0 auto; width: 0; height: 0;
  border-left: 8px solid var(--arrow); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform .15s ease;
}
.group[open] > .group-summary::before { transform: rotate(90deg); }
.group-summary:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: 4px; }
.group-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; color: var(--plum); }

/* ---- Link cards (items) ---- */
.link-grid {
  display: grid; gap: 1rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.link-card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.1rem 1.15rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #E0D3C4; }
.link-title { font-weight: 700; font-size: 1.02rem; }
.link-desc { color: var(--muted); font-size: .9rem; }

/* ---- Card surface (generic, e.g. admin panels) ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 1.4rem 1.5rem;
}

/* ---- State / notice ---- */
#notice {
  margin: 1rem 0 0; padding: .6rem .9rem; border-radius: 10px;
  background: #FBECDE; border: 1px solid #F1C9A6; color: #9A4A22; font-size: .9rem;
}
.state { color: var(--muted); padding: 2rem 0; }

@media (max-width: 480px) {
  .site-header { padding: 1rem 0 1.4rem; }
  .section-grid, .link-grid { grid-template-columns: 1fr; }
}
