@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --stinson-font: "Space Grotesk", sans-serif;
  --stinson-blue-900: #0b2340;
  --stinson-blue-700: #12558f;
  --stinson-blue-500: var(--stinson-accent);
  --stinson-accent: #0ea5e9;
  --stinson-accent-2: #3b82f6;
  --stinson-accent-rgb: 14, 165, 233;
  --stinson-accent-2-rgb: 59, 130, 246;
  --stinson-page-bg: #dbe3ee;
}

html {
  font-size: 110%;
}


body,
#header,
#branding,
#user-tools,
#content,
#content-main,
.breadcrumbs,
.module,
.module caption,
.module h2,
.module th,
.module td,
.form-row label,
.submit-row,
.object-tools,
input,
textarea,
select,
button {
  font-family: var(--stinson-font);
}

body {
  background: linear-gradient(180deg, rgba(var(--stinson-accent-rgb), 0.08), transparent 45%), var(--stinson-page-bg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

#container {
  padding: 0px 0px 20px;
  box-sizing: border-box;
}

html.stinson-scroll-restore-pending {
  visibility: hidden;
}

#header {
  background: linear-gradient(120deg, rgba(var(--stinson-accent-rgb), 0.2), rgba(var(--stinson-accent-2-rgb), 0.08));
  border-bottom: 1px solid rgba(var(--stinson-accent-rgb), 0.2);
  color: var(--stinson-blue-900);
}

#header a,
#user-tools a {
  color: var(--stinson-blue-900);
}

#header a:hover,
#header a:focus,
#user-tools a:hover,
#user-tools a:focus {
  color: var(--stinson-blue-700);
}

#site-name {
  font-size: 1.85rem;
}

#site-name a {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stinson-header-link {
  font-weight: 500;
}

#user-tools {
  font-weight: 500;
}

#stinson-calendar-app,
#stinson-calendar-app *,
.fc {
  font-family: var(--stinson-font);
}

html[data-theme="light"] {
  --stinson-page-bg: #e7eef8;
  --body-bg: #e7eef8;
  --stinson-surface-bg: #d5e2f1;
  --stinson-row-bg: #c8d8ec;
  --stinson-input-bg: #ffffff;
  --stinson-blue-900: #0b1624;
  --stinson-blue-700: #1a4367;
  --stinson-blue-500: var(--stinson-accent);
  --stinson-accent: #2f78b3;
  --stinson-accent-2: #7ea5d6;
  --stinson-accent-rgb: 47, 120, 179;
  --stinson-accent-2-rgb: 126, 165, 214;
  --body-fg: #0b1624;
  --body-quiet-color: #2f4054;
  --body-medium-color: #1b2c40;
  --body-loud-color: #060f1c;
  --link-fg: #1a4367;
  --link-hover-color: #12314d;
  --link-selected-fg: #1a4367;
}

html[data-theme="dark"] {
  --stinson-page-bg: #141c2a;
  --body-bg: #1b2333;
  --stinson-surface-bg: rgba(15, 23, 42, 0.85);
  --stinson-row-bg: var(--stinson-surface-bg);
  --stinson-input-bg: rgba(15, 23, 42, 0.7);
  --body-fg: #e2e8f0;
  --body-quiet-color: #cbd5e1;
  --body-medium-color: #e2e8f0;
  --body-loud-color: #f8fafc;
  --link-fg: #7dd3fc;
  --link-hover-color: #bae6fd;
  --link-selected-fg: #93c5fd;
}

html[data-theme="dark"] .breadcrumbs {
  color: var(--body-quiet-color);
}

html[data-theme="dark"] #header {
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  color: #e2e8f0;
}

html[data-theme="dark"] #header a,
html[data-theme="dark"] #user-tools a,
html[data-theme="dark"] #user-tools button {
  color: #e2e8f0;
}

html[data-theme="dark"] #header a:hover,
html[data-theme="dark"] #header a:focus,
html[data-theme="dark"] #user-tools a:hover,
html[data-theme="dark"] #user-tools a:focus,
html[data-theme="dark"] #user-tools button:hover,
html[data-theme="dark"] #user-tools button:focus {
  color: #7dd3fc;
}

html[data-theme="light"] #header {
  background: linear-gradient(120deg, rgba(var(--stinson-accent-rgb), 0.1), rgba(var(--stinson-accent-2-rgb), 0.05));
  border-bottom: 1px solid rgba(var(--stinson-accent-rgb), 0.2);
  color: var(--stinson-blue-900);
}

html[data-theme="light"] #header a,
html[data-theme="light"] #user-tools a,
html[data-theme="light"] #user-tools button {
  color: var(--stinson-blue-900);
}

html[data-theme="light"] #header a:hover,
html[data-theme="light"] #header a:focus,
html[data-theme="light"] #user-tools a:hover,
html[data-theme="light"] #user-tools a:focus,
html[data-theme="light"] #user-tools button:hover,
html[data-theme="light"] #user-tools button:focus {
  color: var(--link-hover-color);
}

#user-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  --stinson-user-tools-size: 30px;
  font-size: 0.92rem;
  color: var(--body-quiet-color, #475569);
}

#user-tools strong {
  color: var(--body-fg, #0f172a);
  font-weight: 600;
}

#user-tools a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--stinson-accent-rgb), 0.25);
  background: rgba(var(--stinson-accent-rgb), 0.12);
  color: var(--stinson-blue-900);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
}

#user-tools a:hover,
#user-tools a:focus {
  background: rgba(var(--stinson-accent-rgb), 0.22);
  border-color: rgba(var(--stinson-accent-rgb), 0.4);
}

#user-tools a:focus-visible {
  outline: 2px solid rgba(var(--stinson-accent-rgb), 0.4);
  outline-offset: 2px;
}

html[data-theme="dark"] #user-tools {
  color: #cbd5e1;
}

html[data-theme="dark"] #user-tools strong {
  color: #e2e8f0;
}

html[data-theme="dark"] #user-tools a {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(56, 189, 248, 0.4);
}

html[data-theme="dark"] #user-tools a:hover,
html[data-theme="dark"] #user-tools a:focus {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.6);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--stinson-user-tools-size, 30px);
  height: var(--stinson-user-tools-size, 30px);
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--stinson-blue-900);
  box-shadow: none;
  appearance: none;
  line-height: 0;
  vertical-align: middle;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--stinson-accent-rgb), 0.35);
  background: linear-gradient(140deg, rgba(var(--stinson-accent-rgb), 0.3), rgba(var(--stinson-accent-rgb), 0.12));
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.theme-toggle svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-when-dark {
  display: block;
}

html[data-theme="light"] .theme-toggle .theme-icon-when-light {
  display: block;
}

.theme-toggle:hover::before,
.theme-toggle:focus::before {
  border-color: rgba(var(--stinson-accent-rgb), 0.55);
  background: linear-gradient(140deg, rgba(var(--stinson-accent-rgb), 0.4), rgba(var(--stinson-accent-rgb), 0.16));
}

.theme-toggle:active::before {
  transform: scale(0.96);
}

.theme-toggle:focus-visible {
  outline: none;
}

.theme-toggle:focus-visible::before {
  box-shadow: 0 0 0 3px rgba(var(--stinson-accent-rgb), 0.35), 0 8px 18px rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] .theme-toggle {
  color: #e2e8f0;
}

html[data-theme="dark"] .theme-toggle::before {
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 18px rgba(8, 15, 30, 0.45);
}

html[data-theme="dark"] .theme-toggle:hover::before,
html[data-theme="dark"] .theme-toggle:focus::before {
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78));
  border-color: rgba(56, 189, 248, 0.65);
}

#user-tools {
  float: none;
  margin: 0;
}

#user-tools,
#logout-form button {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.92rem;
}

#logout-form {
  display: inline-flex;
  margin: 0;
}

#user-tools a,
#logout-form button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--stinson-user-tools-size);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--stinson-accent-rgb), 0.25);
  background: rgba(var(--stinson-accent-rgb), 0.12);
  color: var(--stinson-blue-900);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  border-bottom: none;
  font-family: var(--stinson-font);
  cursor: pointer;
  box-sizing: border-box;
}

#user-tools a:hover,
#user-tools a:focus,
#logout-form button:hover,
#logout-form button:focus {
  background: rgba(var(--stinson-accent-rgb), 0.22);
  border-color: rgba(var(--stinson-accent-rgb), 0.4);
}

#logout-form button:focus-visible {
  outline: 2px solid rgba(var(--stinson-accent-rgb), 0.4);
  outline-offset: 2px;
}

html[data-theme="dark"] #logout-form button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(56, 189, 248, 0.4);
}

html[data-theme="dark"] #logout-form button:hover,
html[data-theme="dark"] #logout-form button:focus {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.6);
}

.theme-toggle {
  -webkit-appearance: none;
  appearance: none;
}

.theme-toggle svg path {
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Message banner */
.messagelist {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.messagelist li {
  border-radius: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--stinson-accent-rgb), 0.25);
  background: rgba(var(--stinson-accent-rgb), 0.12);
  color: var(--body-fg);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.messagelist li a {
  color: inherit;
}

.messagelist li.stinson-message {
  transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease, margin 0.18s ease, padding 0.18s ease, border 0.18s ease;
  max-height: 160px;
}

.messagelist li.stinson-message-hidden {
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  margin: 0;
  padding: 0;
  border-width: 0;
  box-shadow: none;
}

html[data-theme="dark"] .messagelist li {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
  color: #e2e8f0;
}

html[data-theme="light"] .messagelist li {
  background: rgba(var(--stinson-accent-rgb), 0.1);
  border-color: rgba(var(--stinson-accent-rgb), 0.22);
  color: var(--body-fg);
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1), transparent 45%), var(--stinson-page-bg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

html[data-theme="light"] body {
  background: linear-gradient(180deg, rgba(var(--stinson-accent-rgb), 0.08), transparent 60%), var(--stinson-page-bg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
