/* URSA core styles: editor bar, dialogs, calendar and news basics. Versions restyle the look; these keep editing usable. */
#ursa-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9999; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: #14163a; color: #fff; padding: 8px 10px; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); font: 500 14px/1.2 system-ui, sans-serif; max-width: calc(100vw - 20px); }
#ursa-bar .ursa-who { opacity: .75; padding: 0 6px; font-size: 12px; }
#ursa-bar button { font: inherit; border: 0; border-radius: 9px; padding: 9px 12px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
#ursa-bar button[aria-pressed="true"], #ursa-bar button[data-a="edit"] { background: var(--brand-green); color: #10240a; font-weight: 700; }
#ursa-bar button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ursa-editing [data-k], .ursa-editing [data-k-html] { outline: 2px dashed color-mix(in srgb, var(--brand-green) 80%, transparent); outline-offset: 3px; border-radius: 4px; cursor: text; }
.ursa-editing [data-k]:focus, .ursa-editing [data-k-html]:focus { outline: 3px solid var(--brand-green); background: color-mix(in srgb, var(--brand-green) 10%, transparent); }
.ursa-img-edit { outline: 3px dashed var(--brand-green); outline-offset: 3px; cursor: pointer; }
.ursa-listbtn { font: 600 13px system-ui, sans-serif; background: var(--brand-green); color: #10240a; border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer; margin: 6px 0; }
#ursa-toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -150%); background: #14163a; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 10000; font: 500 14px system-ui, sans-serif; transition: transform .25s; }
#ursa-toast.on { transform: translate(-50%, 0); } #ursa-toast.bad { background: #8A1C12; }
.ursa-dlg { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); color: #1a1c3d; box-shadow: 0 30px 80px rgba(0,0,0,.35); font: 15px/1.45 system-ui, sans-serif; }
.ursa-dlg.wide { width: min(820px, calc(100vw - 24px)); }
.ursa-dlg::backdrop { background: rgba(16,18,50,.55); backdrop-filter: blur(3px); }
.ursa-dlg header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e3e5ef; position: sticky; top: 0; background: #fff; z-index: 1; }
.ursa-dlg h2 { margin: 0; font-size: 19px; color: var(--brand-navy); }
.ursa-x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #555; padding: 4px 8px; }
.ursa-dlg-body { padding: 16px 20px 20px; }
.ursa-f { display: block; font-weight: 600; font-size: 13px; margin: 10px 0; color: #333a5a; }
.ursa-f input:not([type=checkbox]):not([type=color]), .ursa-f select, .ursa-f textarea, .ursa-dlg input[type=email], .ursa-dlg select, .ursa-dlg input[name=code] { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: 15px system-ui, sans-serif; padding: 10px 12px; border: 1.5px solid #c8cbe0; border-radius: 10px; background: #fff; color: #1a1c3d; }
.ursa-f textarea { min-height: 90px; }
.ursa-dlg label:not(.ursa-f) { display: block; font-weight: 600; font-size: 13px; margin: 10px 0; }
.ursa-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-top: 12px; }
.ursa-row > .ursa-f { flex: 1; min-width: 140px; }
.ursa-btn { display: inline-flex; align-items: center; gap: 6px; font: 700 14px system-ui, sans-serif; background: var(--brand-navy); color: #fff; border: 2px solid var(--brand-navy); border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; }
.ursa-btn.ghost { background: #fff; color: var(--brand-navy); } .ursa-btn.sm { padding: 6px 10px; font-size: 13px; }
.ursa-btn:focus-visible { outline: 3px solid var(--brand-green); outline-offset: 2px; }
.ursa-err { color: #8A1C12; font-weight: 600; min-height: 1em; margin: 8px 0 0; } .ursa-note { color: #4a5072; margin: 0 0 8px; }
.ursa-col { display: flex; align-items: center; gap: 10px; margin-top: 4px; } .ursa-col input { width: 48px; height: 34px; border: 0; padding: 0; background: none; }
.ursa-arr { border: 1px solid #e3e5ef; border-radius: 12px; padding: 10px; margin: 10px 0; } .ursa-arr legend { font-weight: 700; color: var(--brand-navy); padding: 0 6px; }
.ursa-item { display: flex; gap: 8px; border-bottom: 1px dashed #e3e5ef; padding: 6px 0; } .ursa-item > :first-child { flex: 1; }
.ursa-tools { display: flex; flex-direction: column; gap: 4px; } .ursa-tools button { border: 1px solid #c8cbe0; background: #fff; border-radius: 6px; cursor: pointer; width: 30px; height: 28px; }
.ursa-obj { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.ursa-obj > .ursa-arr { grid-column: 1 / -1; }
.ursa-tbl { width: 100%; border-collapse: collapse; } .ursa-tbl td, .ursa-tbl th { text-align: left; padding: 8px; border-bottom: 1px solid #e3e5ef; }
.ursa-rich { border: 1.5px solid #c8cbe0; border-radius: 10px; min-height: 140px; padding: 10px 12px; }
.ursa-when { font-weight: 700; color: var(--brand-navy); }

/* calendar */
.cal-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-top h3 { margin: 0; min-width: 11ch; text-align: center; font-family: var(--font-head); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav button, .cal-seg button, .cal-add, .cal-sub { font: 600 14px var(--font-body); border: 2px solid var(--brand-navy); background: #fff; color: var(--brand-navy); border-radius: 999px; padding: 7px 14px; cursor: pointer; text-decoration: none; }
.cal-nav button { width: 40px; height: 40px; padding: 0; font-size: 20px; }
.cal-seg { display: inline-flex; } .cal-seg button:first-child { border-radius: 999px 0 0 999px; } .cal-seg button:last-child { border-radius: 0 999px 999px 0; border-left: 0; }
.cal-seg button[aria-pressed="true"], .cal-add { background: var(--brand-navy); color: #fff; }
.cal-act { display: flex; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { font: 700 12px var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: #5a607e; text-align: center; padding: 4px 0; }
.cal-d { min-height: 92px; background: #fff; border: 1px solid #e3e5ef; border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-d.out { background: transparent; border-color: transparent; } .cal-d.today { border: 2px solid var(--brand-red); }
.cal-n { font: 700 13px var(--font-body); color: #5a607e; }
.cal-e { text-align: left; font: 600 12px/1.2 var(--font-body); border: 0; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); color: #1a1c3d; border-radius: 6px; padding: 4px 6px; cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .cal-list.past { opacity: .75; }
.cal-li { width: 100%; text-align: left; display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #e3e5ef; border-left: 6px solid var(--c); border-radius: 12px; padding: 10px 14px; cursor: pointer; font: inherit; color: inherit; }
.cal-li strong { display: block; } .cal-li small { color: #5a607e; }
.cal-date { display: grid; place-items: center; min-width: 52px; font: 800 22px/1 var(--font-head); color: var(--c); } .cal-date b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.cal-sec { margin: 16px 0 8px; font-family: var(--font-head); } .cal-empty { color: #5a607e; }
@media (max-width: 640px) { .cal-d { min-height: 54px; padding: 3px; } .cal-e { font-size: 0; padding: 0; height: 8px; border-left-width: 0; background: var(--c); } .cal-h { font-size: 10px; } }

/* news */
.news-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.news-card { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #e3e5ef; } .news-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.news-card > div { padding: 14px 16px; } .news-card time { font-size: 13px; color: #5a607e; } .news-card h3 { margin: 4px 0 8px; font-family: var(--font-head); }
.news-empty { color: #5a607e; font-style: italic; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* lists edited in place on the page */
.ursa-inline { margin: 12px 0 20px; background: #fbfdf6; border: 3px solid var(--brand-green); border-radius: 14px; padding: 16px 18px; color: #1a1c3d; font: 15px/1.45 system-ui, sans-serif; text-align: left; }
.ursa-inline header { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; } .ursa-inline header strong { color: var(--brand-navy); font-size: 17px; } .ursa-inline header span { color: #4a5072; font-size: 14px; }
.ursa-inline .ursa-f { color: #333a5a; } .ursa-editing .ursa-listbtn { display: inline-block; }
.ursa-editing [data-k-img] { cursor: pointer; }

.ursa-emoji { grid-column: 1 / -1; background: #fff; border: 2px solid #c8cbe0; border-radius: 12px; padding: 10px; margin-top: 8px; } .ursa-emoji p { margin: 6px 0 4px; font: 700 12px system-ui; color: #4a5072; text-transform: uppercase; letter-spacing: .06em; }
.ursa-emoji input { width: 100%; font: 15px system-ui; padding: 8px 10px; border: 1.5px solid #c8cbe0; border-radius: 8px; margin: 6px 0; } .ursa-emo-row { display: flex; flex-wrap: wrap; gap: 4px; }
.ursa-emo-row button { font-size: 24px; line-height: 1; width: 42px; height: 42px; border: 1px solid #e3e5ef; border-radius: 10px; background: #fff; cursor: pointer; } .ursa-emo-row button:hover, .ursa-emo-row button:focus-visible { background: #eef6e2; border-color: var(--brand-green); }

/* editors can hide cards and sections from visitors */
.ursa-block { position: relative; outline: 2px dashed rgba(43,46,114,.35); outline-offset: 2px; } .ursa-block.is-off > :not(.ursa-toggle) { opacity: .35; filter: grayscale(1); }
.ursa-toggle { position: absolute; z-index: 20; top: 6px; left: 6px; font: 700 12px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 6px 10px; cursor: pointer; background: #14163a; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.ursa-block.is-off > .ursa-toggle { background: #8A1C12; } .ursa-chk { display: flex !important; gap: 8px; align-items: center; } .ursa-chk input { width: auto !important; margin: 0 !important; }
