:root {
  --ink: #17324d;
  --muted: #617184;
  --line: #dce4eb;
  --surface: #ffffff;
  --surface-soft: #f4f7f9;
  --page: #e9eef2;
  --accent: #295f8f;
  --accent-warm: #d9653b;
  --shadow: 0 18px 55px rgba(28, 49, 69, 0.13);
  --radius: 18px;
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--page); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.container { width: min(1480px, calc(100% - 32px)); margin: 0 auto; }
.is-hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(23, 50, 77, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}
.site-header__inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--ink); font-size: 0.86rem; letter-spacing: 0.06em; }
.brand__name { font-size: 1.03rem; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 650; }
.site-nav a:hover { color: var(--ink); }

.hero { padding: 62px 0 48px; background: radial-gradient(circle at 80% 10%, rgba(217, 101, 59, 0.14), transparent 30%), linear-gradient(140deg, #f8fafb 0%, #edf3f7 100%); border-bottom: 1px solid rgba(23, 50, 77, 0.08); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--accent-warm); text-transform: uppercase; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.16em; }
.hero h1 { max-width: 920px; margin: 0; font-size: clamp(2rem, 4vw, 4.5rem); line-height: 0.98; letter-spacing: -0.055em; }
.hero__lead { max-width: 820px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.65; }
.hero__badge { width: 170px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border-radius: 38px; color: white; background: var(--ink); box-shadow: var(--shadow); transform: rotate(3deg); }
.hero__badge span { display: block; font-size: 4rem; font-weight: 900; line-height: 0.9; }
.hero__badge small { display: block; max-width: 100px; margin: 10px auto 0; line-height: 1.25; opacity: 0.72; }

.calendar-builder { padding: 32px 0 72px; scroll-margin-top: 92px; }
.builder-layout { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); gap: 28px; align-items: start; }
.control-panel { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding: 24px; border: 1px solid rgba(23, 50, 77, 0.08); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 30px rgba(28, 49, 69, 0.08); scrollbar-width: thin; }
.panel-heading, .panel-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-heading h2, .panel-section-heading h3 { margin: 0; letter-spacing: -0.03em; }
.panel-heading h2 { font-size: 1.55rem; }
.panel-section-heading h3 { font-size: 1.1rem; }
.control-panel hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.control-group { margin-top: 18px; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.control-label { display: block; margin-bottom: 7px; font-size: 0.79rem; font-weight: 800; color: #344b61; }
input[type="text"], input[type="date"], input[type="time"], input[type="month"], select {
  width: 100%; min-height: 44px; border: 1px solid #cfd9e2; border-radius: 11px; padding: 10px 12px; color: var(--ink); background: #fff; outline: none;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.appearance-controls { align-items: start; }
.theme-preview { --theme-accent: #295f8f; --theme-soft: #eaf2f8; --theme-ink: #17324d; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; height: 10px; margin-top: 8px; overflow: hidden; border-radius: 999px; }
.theme-preview span:nth-child(1) { background: var(--theme-accent); }
.theme-preview span:nth-child(2) { background: var(--theme-soft); }
.theme-preview span:nth-child(3) { background: var(--theme-ink); }

.line-options { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafb; }
.line-options .control-group { margin-top: 12px; }
.line-options .control-grid .control-group { margin-top: 0; }
.line-options .line-gap-control { margin-top: 14px; }
.line-options input[type="color"] { width: 100%; height: 44px; padding: 4px; border: 1px solid #cfd9e2; border-radius: 11px; background: white; cursor: pointer; }
.line-options input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.control-label--output { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-label--output output { color: var(--muted); font-size: 0.72rem; font-weight: 750; }

.switch-list { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 0.87rem; }
.switch-row small { margin-top: 3px; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.switch-row input { width: 19px; height: 19px; accent-color: var(--accent); flex: 0 0 auto; }

.connection-list { display: grid; gap: 10px; margin-top: 15px; }
.provider-connection { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.connection-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; border: 0; background: #fff; color: var(--ink); }
.connection-card:hover { background: #f9fbfc; }
.connection-card:disabled { cursor: progress; opacity: 0.72; }
.connection-card[data-state="connected"] { background: #f7fbf8; }
.connection-card[data-state="connected"] .connection-card__action { color: #27784b; background: #e2f3e8; }
.connection-card[data-state="unconfigured"] { background: #fafbfc; }
.connection-card__copy { min-width: 0; flex: 1; }
.connection-card strong, .connection-card small { display: block; }
.connection-card small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 0.72rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.connection-card__action { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #38536b; background: #edf2f6; font-size: 0.66rem; font-weight: 850; }
.connection-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; }
.connection-logo { width: 38px; height: 38px; display: block; object-fit: contain; }
.provider-panel { padding: 12px; border-top: 1px solid var(--line); background: #fbfcfd; }
.provider-account, .provider-panel__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.provider-account { color: var(--muted); font-size: 0.72rem; }
.provider-account > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-panel__heading { margin-top: 12px; color: #344b61; font-size: 0.76rem; }
.text-button { padding: 2px; border: 0; color: var(--accent); background: transparent; font-size: 0.7rem; font-weight: 800; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button:disabled { cursor: progress; opacity: 0.55; }
.calendar-source-list { display: grid; gap: 6px; margin-top: 9px; }
.calendar-source-row { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid #e1e7ec; border-radius: 10px; background: white; cursor: pointer; }
.calendar-source-row:hover { border-color: #bdcad4; }
.calendar-source-row input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--accent); }
.calendar-source-color { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--calendar-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--calendar-color) 18%, white); }
.calendar-source-name { min-width: 0; flex: 1; overflow: hidden; color: var(--ink); font-size: 0.76rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.calendar-source-badge { flex: 0 0 auto; padding: 2px 5px; border-radius: 999px; color: var(--muted); background: #eef2f5; font-size: 0.58rem; font-weight: 800; }
.calendar-source-empty { margin: 0; padding: 10px; color: var(--muted); text-align: center; font-size: 0.72rem; }
.provider-help { margin: 9px 2px 0; color: var(--muted); font-size: 0.66rem; line-height: 1.45; }

.grid-entry-help { margin: 15px 2px 0; }
.grid-entry-help strong { display: block; color: var(--ink); font-size: 0.82rem; }
.grid-entry-help p { margin: 5px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.5; }
.event-summary { min-height: 40px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #eef3f6; color: var(--muted); font-size: 0.76rem; }
.event-summary p { margin: 0; }
.event-summary strong, .event-summary span { display: block; }
.event-summary strong { color: var(--ink); }
.event-summary span { margin-top: 2px; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; padding: 10px 16px; border: 1px solid transparent; font-weight: 800; }
.button--primary { color: white; background: var(--ink); }
.button--primary:hover { background: #0d253b; }
.preview-toolbar .button--primary { background: var(--accent, var(--ink)); }
.preview-toolbar .button--primary:hover { filter: brightness(0.9); }
.button--secondary { color: white; background: var(--accent); }
.button--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.button--ghost:hover { background: var(--surface-soft); }
.button--small { min-height: 34px; padding: 7px 10px; font-size: 0.75rem; }
.button--full { width: 100%; }

.preview-panel { min-width: 0; overflow: auto; padding: 4px 4px 12px; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; color: var(--muted); font-size: 0.8rem; font-weight: 750; }
.preview-toolbar__status, .preview-toolbar__actions { display: flex; align-items: center; gap: 8px; }
.page-fit-status { padding-left: 8px; border-left: 1px solid var(--line); color: #27784b; font-size: 0.72rem; }
.preview-toolbar__status.is-overflowing .status-dot { background: #c44545; box-shadow: 0 0 0 4px rgba(196, 69, 69, 0.13); }
.preview-toolbar__status.is-overflowing .page-fit-status { color: #a52f2f; font-weight: 850; }
.preview-toolbar__actions { justify-content: flex-end; flex-wrap: wrap; }
.toolbar-button { min-height: 36px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #35a267; box-shadow: 0 0 0 4px rgba(53, 162, 103, 0.12); }
.calendar-sheet { --accent: #295f8f; --accent-strong: #17324d; --accent-soft: #eaf2f8; --paper-bg: #ffffff; --paper-ink: #17324d; --event-default: #d9653b; --calendar-font: "Inter", sans-serif; --calendar-grid-color: #d5dde4; --calendar-line-style: dotted; --calendar-line-color: #dbdbdb; --calendar-line-gap: 18px; --page-width: 11in; --page-height: 8.5in; position: relative; flex: 0 0 var(--page-width); inline-size: var(--page-width); block-size: var(--page-height); min-inline-size: var(--page-width); max-inline-size: var(--page-width); min-block-size: var(--page-height); max-block-size: var(--page-height); display: flex; flex-direction: column; padding: 0.25in; overflow: hidden; contain: size layout paint; border-radius: 8px; color: var(--paper-ink); background: var(--paper-bg); box-shadow: var(--shadow); font-family: var(--calendar-font); }
.calendar-sheet[data-paper="letter"][data-orientation="landscape"] { --page-width: 11in; --page-height: 8.5in; }
.calendar-sheet[data-paper="letter"][data-orientation="portrait"] { --page-width: 8.5in; --page-height: 11in; margin-inline: auto; }
.calendar-sheet[data-paper="a4"][data-orientation="landscape"] { --page-width: 297mm; --page-height: 210mm; }
.calendar-sheet[data-paper="a4"][data-orientation="portrait"] { --page-width: 210mm; --page-height: 297mm; margin-inline: auto; }
.calendar-sheet--overflowing { outline: 3px solid rgba(196, 69, 69, 0.75); outline-offset: 3px; }
.calendar-sheet__header { flex: 0 0 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 3px solid var(--accent); }
.calendar-sheet__header p { margin: 0; }
.calendar-sheet__header > div > p { color: var(--accent); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.68rem; font-weight: 900; }
.calendar-sheet__header h2 { margin: 5px 0 0; color: var(--accent-strong); font-size: clamp(1.65rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -0.04em; }
.calendar-sheet--hide-title .calendar-sheet__header > div > p { margin-bottom: 0; }
.calendar-sheet--hide-subtitle .calendar-sheet__header h2 { margin-top: 0; }
.calendar-sheet--compact-heading .calendar-sheet__header { min-height: 32px; padding-bottom: 8px; }
.calendar-sheet--compact-heading #calendar-output { margin-top: 8px; }
#sheet-period { text-align: right; color: var(--muted); font-size: 1rem; font-weight: 750; }
#calendar-output { flex: 1 1 0; min-width: 0; min-height: 0; block-size: 0; margin-top: 18px; overflow: hidden; }

.month-calendar { width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.calendar-header-row, .calendar-row { display: grid; grid-template-columns: repeat(var(--week-columns), minmax(0, 1fr)); }
.calendar-header-row { flex: 0 0 auto; }
.calendar-row { flex: 1 1 0; min-width: 0; min-height: 0; overflow: hidden; }
.calendar-weekday { padding: 8px 7px; color: var(--accent); text-transform: uppercase; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.06em; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, white); }
.calendar-weekday--week { color: var(--muted); }
.calendar-week-number { padding: 8px 6px; color: var(--muted); text-align: center; font-size: 0.72rem; font-weight: 800; border: 1px solid var(--calendar-grid-color); border-top: 0; background: #f7f9fa; }
.calendar-day { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--calendar-grid-color); border-top: 0; border-left: 0; overflow: hidden; }
.calendar-row .calendar-day:first-of-type { border-left: 1px solid var(--calendar-grid-color); }
.calendar-sheet--borderless .calendar-day, .calendar-sheet--borderless .calendar-week-number { border-color: transparent; }
.calendar-sheet--borderless .calendar-day__number, .calendar-sheet--borderless .week-day__date { border-color: transparent; }
.calendar-day__number {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  min-width: 27px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--calendar-grid-color);
  border-left: 1px solid var(--calendar-grid-color);
  border-radius: 0;
  color: var(--paper-ink);
  background: var(--paper-bg);
  cursor: text;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}
.calendar-day__number:hover, .calendar-day__number:focus-visible { background: color-mix(in srgb, var(--accent-soft) 55%, var(--paper-bg)); outline: none; }
.calendar-day.is-outside { color: #9eabb6; background-color: color-mix(in srgb, var(--accent-soft) 28%, var(--paper-bg)); }
.calendar-day.is-outside .calendar-day__number { color: #8f9da8; }
.calendar-day.is-weekend { background-color: color-mix(in srgb, var(--accent-soft) 18%, var(--paper-bg)); }
.calendar-events { position: relative; z-index: 1; display: grid; gap: 3px; margin: 24px 6px 0; }
.calendar-event { min-width: 0; display: flex; align-items: center; gap: 4px; padding: 3px 5px; border-left: 3px solid var(--event-color); border-radius: 3px; background: color-mix(in srgb, var(--event-color) 10%, white); color: #22384d; font-size: 0.65rem; line-height: 1.15; }
.calendar-event time { flex: 0 0 auto; color: var(--event-color); font-weight: 900; }
.calendar-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Google et Microsoft : texte discret, intégré aux mêmes lignes que les notes. */
.calendar-events:empty,
.week-day__events:empty { display: none; }
.calendar-event--synced {
  min-width: 0;
  width: 100%;
  height: var(--cell-line-gap, var(--calendar-line-gap));
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 7px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--paper-ink);
  font-size: 0.56rem;
  line-height: 1;
}
.calendar-event--synced time { flex: 0 0 auto; color: inherit; font-weight: 700; }
.calendar-event--synced span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.week-day .calendar-event--synced { padding-right: 10px; padding-left: 10px; font-size: 0.66rem; }
.calendar-sheet[data-spacing="compact"] .calendar-event--synced { font-size: 0.50rem; }
.calendar-sheet[data-spacing="spacious"] .calendar-event--synced { font-size: 0.60rem; }

.day-writing-area { flex: 1; min-height: 18px; }
.day-writing-area--blank { margin-top: 24px; }
.calendar-line-stack {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(var(--content-lines), var(--cell-line-gap, var(--calendar-line-gap)));
  align-content: start;
  max-height: 100%;
  overflow: hidden;
}
.calendar-day .calendar-line-stack { width: 100%; margin: 24px 0 0; }
.calendar-day > .calendar-events:not(:empty) + .calendar-line-stack { margin-top: 2px; }
.calendar-line-stack > .editable-line,
.calendar-line-stack > .calendar-event--synced {
  position: relative;
  min-height: 0 !important;
  height: var(--cell-line-gap, var(--calendar-line-gap)) !important;
  box-sizing: border-box;
}
.calendar-line-stack > .editable-line::after,
.calendar-line-stack > .calendar-event--synced::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: 1px var(--calendar-line-style) var(--calendar-line-color);
  pointer-events: none;
}
.editable-line {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 7px;
  overflow: hidden;
  outline: none;
  color: var(--paper-ink);
  font-size: 0.66rem;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.editable-line:focus { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.editable-line:empty::before { content: attr(data-placeholder); color: #a4afb8; font-size: 0.58rem; font-style: italic; pointer-events: none; }
.calendar-line-stack.is-dense > .editable-line,
.calendar-line-stack.is-dense > .calendar-event--synced { font-size: 0.50rem; }

.calendar-row { min-height: 0; }
.calendar-sheet[data-spacing="compact"] .calendar-row { min-height: 0; }
.calendar-sheet[data-spacing="compact"] .calendar-day .editable-line { font-size: 0.56rem; }
.calendar-sheet[data-spacing="normal"] .calendar-day .editable-line { font-size: 0.66rem; }
.calendar-sheet[data-spacing="spacious"] .calendar-row { min-height: 0; }
.calendar-sheet[data-spacing="spacious"] .calendar-day .editable-line { font-size: 0.7rem; }
.calendar-sheet .calendar-line-stack.is-dense > .editable-line,
.calendar-sheet .calendar-line-stack.is-dense > .calendar-event--synced { font-size: 0.50rem; }

.week-number-badge { display: inline-flex; margin-bottom: 10px; padding: 5px 9px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, white); font-size: 0.72rem; font-weight: 850; }
.week-calendar { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; overflow: hidden; grid-template-columns: repeat(var(--day-columns), minmax(0, 1fr)); border: 1px solid var(--calendar-grid-color); }
.week-day { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--calendar-grid-color); overflow: hidden; }
.week-day:last-child { border-right: 0; }
.calendar-sheet--borderless .week-calendar, .calendar-sheet--borderless .week-day { border-color: transparent; }
.week-day.is-weekend { background: color-mix(in srgb, var(--accent-soft) 20%, var(--paper-bg)); }
.week-day__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-bottom: 1px solid var(--calendar-grid-color); color: var(--accent); }
.week-day__header span { text-transform: uppercase; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.05em; }
.week-day__date { min-width: 27px; height: 23px; display: grid; place-items: center; padding: 0 5px; border: 1px solid var(--calendar-grid-color); border-radius: 0; color: var(--paper-ink); background: var(--paper-bg); font: inherit; font-size: 0.78rem; font-weight: 850; line-height: 1; cursor: text; }
.week-day__date:hover, .week-day__date:focus-visible { background: color-mix(in srgb, var(--accent-soft) 55%, var(--paper-bg)); outline: none; }
.week-day__events { display: grid; gap: 4px; padding: 8px; }
.week-day .day-writing-area { flex: 1 1 0; width: 100%; min-height: 0; margin: 0; overflow: hidden; }
.week-day .calendar-line-stack { margin: 0; }
.week-day .editable-line { padding: 0 10px; font-size: 0.76rem; line-height: 1; }
.calendar-sheet[data-spacing="compact"] .week-day .editable-line { font-size: 0.68rem; }
.calendar-sheet[data-spacing="normal"] .week-day .editable-line { font-size: 0.76rem; }
.calendar-sheet[data-spacing="spacious"] .week-day .editable-line { font-size: 0.82rem; }

.notes-area { flex: 0 0 auto; min-height: 0; margin-top: 18px; overflow: hidden; }
.notes-area h3 { margin: 0 0 6px; color: var(--accent); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.1em; }
.notes-lines { height: 72px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 22px, #d8e0e6 23px); }
.calendar-sheet__footer { flex: 0 0 auto; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #e1e6ea; color: #81909d; font-size: 0.62rem; }

.site-footer { padding: 46px 0; color: white; background: var(--ink); }
.site-footer__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.brand--footer .brand__mark { color: var(--ink); background: white; }
.site-footer p { max-width: 500px; margin: 14px 0 0; color: rgba(255, 255, 255, 0.66); line-height: 1.6; }
.site-footer__meta { display: flex; gap: 22px; color: rgba(255, 255, 255, 0.72); font-size: 0.86rem; }
.site-footer__meta a { text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(420px, calc(100% - 32px)); padding: 12px 16px; border-radius: 12px; color: white; background: #15283a; box-shadow: 0 10px 40px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: opacity 180ms ease, transform 180ms ease; font-size: 0.86rem; font-weight: 750; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1040px) {
  .builder-layout { grid-template-columns: 1fr; }
  .control-panel { position: static; max-height: none; }
  .calendar-sheet { min-height: 720px; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 20px, 1480px); }
  .site-header__inner { min-height: 62px; }
  .brand__name { font-size: 0.92rem; }
  .site-nav { display: none; }
  .hero { padding: 42px 0 34px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__badge { display: none; }
  .hero h1 { font-size: clamp(2.2rem, 12vw, 3.4rem); }
  .calendar-builder { padding-top: 18px; }
  .control-panel { padding: 18px; }
  .control-grid { grid-template-columns: 1fr; }
  .calendar-sheet { padding: 0.25in; }
  .preview-panel { overflow-x: auto; padding-bottom: 8px; }
  .preview-toolbar { position: sticky; left: 0; min-width: 760px; }
  .site-footer__inner, .site-footer__meta { align-items: flex-start; flex-direction: column; }
}

@media print {
  :root { background: white; }
  body { background: white; }
  .no-print, .site-header, .site-footer, .hero, .control-panel, .preview-toolbar, .toast { display: none !important; }
  .calendar-builder, .container, .builder-layout, .preview-panel { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; display: block !important; }
  .preview-panel { overflow: visible !important; }
  .calendar-sheet { inline-size: var(--page-width) !important; block-size: var(--page-height) !important; min-inline-size: var(--page-width) !important; max-inline-size: var(--page-width) !important; min-block-size: var(--page-height) !important; max-block-size: var(--page-height) !important; margin: 0 !important; padding: 0.25in !important; border-radius: 0 !important; outline: 0 !important; box-shadow: none !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .calendar-sheet__header { padding-bottom: 0.08in; }
  #calendar-output { margin-top: 0.08in; }
  .calendar-row { break-inside: avoid; }
  .calendar-day { min-height: 0 !important; padding: 0 !important; overflow: hidden; }
  .calendar-day__number { top: 0; right: 0; min-width: 22px; width: auto; height: 20px; padding: 0 4px; border-top: 0; border-right: 0; border-radius: 0; font-size: 7pt; box-shadow: none; }
  .calendar-events { margin: 20px 4px 0; }
  .calendar-day .calendar-line-stack { width: 100%; margin: 20px 0 0; }
  .calendar-day > .calendar-events:not(:empty) + .calendar-line-stack { margin-top: 2px; }
  .notes-area { margin-top: 0.08in; }
  .notes-lines { height: 0.48in; }
  .calendar-sheet__footer { margin-top: 0.05in; }
  .editable-line:empty::before { content: none !important; }
  .editable-line {
    box-sizing: border-box;
    padding: 0 4px !important;
    overflow: hidden !important;
    line-height: 1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .calendar-line-stack {
    grid-template-rows: repeat(var(--content-lines), var(--cell-line-gap, var(--calendar-line-gap))) !important;
    align-content: start !important;
    overflow: hidden !important;
    background: none !important;
  }
  .calendar-line-stack > .editable-line,
  .calendar-line-stack > .calendar-event--synced {
    min-height: 0 !important;
    height: var(--cell-line-gap, var(--calendar-line-gap)) !important;
    border: 0 !important;
  }
  .calendar-line-stack > .editable-line::after,
  .calendar-line-stack > .calendar-event--synced::after {
    border-bottom: 1px var(--calendar-line-style) var(--calendar-line-color) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .calendar-event--synced {
    margin: 0 !important;
    padding: 0 4px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--paper-ink) !important;
    font-size: 6.2pt !important;
    line-height: 1 !important;
  }
  .calendar-event--synced time { color: inherit !important; font-weight: 700 !important; }
  .week-day .calendar-event--synced {
    padding-right: 10px !important;
    padding-left: 10px !important;
    font-size: 7pt !important;
  }
  .calendar-line-stack.is-dense > .editable-line,
  .calendar-line-stack.is-dense > .calendar-event--synced { font-size: 5.4pt !important; }
  .calendar-sheet[data-spacing="compact"] .calendar-row,
  .calendar-sheet[data-spacing="normal"] .calendar-row,
  .calendar-sheet[data-spacing="spacious"] .calendar-row { min-height: 0 !important; }
  .calendar-sheet[data-spacing="compact"] .calendar-day .editable-line { padding-top: 0 !important; padding-bottom: 0 !important; font-size: 6.3pt !important; }
  .calendar-sheet[data-spacing="normal"] .calendar-day .editable-line { padding-top: 0 !important; padding-bottom: 0 !important; font-size: 7pt !important; }
  .calendar-sheet[data-spacing="spacious"] .calendar-day .editable-line { padding-top: 1px !important; padding-bottom: 0 !important; font-size: 7.5pt !important; }
  .week-day .day-writing-area { margin: 0 !important; }
  .calendar-sheet[data-spacing="compact"] .week-day .editable-line { font-size: 7.5pt !important; }
  .calendar-sheet[data-spacing="normal"] .week-day .editable-line { font-size: 8.5pt !important; }
  .calendar-sheet[data-spacing="spacious"] .week-day .editable-line { font-size: 9.5pt !important; }
  .calendar-sheet .calendar-line-stack.is-dense > .editable-line,
  .calendar-sheet .calendar-line-stack.is-dense > .calendar-event--synced { padding-top: 0 !important; font-size: 5.4pt !important; }
}

/* Privacy notice and public information pages */
.privacy-notice {
  margin-top: 15px;
  padding: 12px 13px;
  border: 1px solid #cfe0ec;
  border-radius: 12px;
  background: #f4f9fc;
}
.privacy-notice strong { display: block; font-size: 0.78rem; }
.privacy-notice p { margin: 5px 0 0; color: var(--muted); font-size: 0.69rem; line-height: 1.48; }
.privacy-notice a { color: var(--accent); font-weight: 800; text-underline-offset: 2px; }

.legal-page { min-height: calc(100vh - 72px); padding-bottom: 80px; background: #f4f7f9; }
.legal-hero { padding: 72px 0 58px; border-bottom: 1px solid rgba(23, 50, 77, 0.08); background: radial-gradient(circle at 88% 0%, rgba(217, 101, 59, 0.12), transparent 30%), linear-gradient(145deg, #f9fbfc, #edf3f7); }
.legal-hero__inner { max-width: 920px; }
.legal-hero h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 4.8rem); line-height: 0.98; letter-spacing: -0.055em; }
.legal-hero p:not(.eyebrow):not(.legal-updated) { max-width: 760px; margin: 22px 0 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }
.legal-updated { margin: 18px 0 0; color: #486178; font-size: 0.82rem; font-weight: 750; }
.legal-layout { display: grid; grid-template-columns: minmax(240px, 310px) minmax(0, 820px); justify-content: center; gap: 42px; align-items: start; padding-top: 48px; }
.legal-layout--single { grid-template-columns: minmax(0, 860px); }
.legal-summary { position: sticky; top: 100px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(28, 49, 69, 0.06); }
.legal-summary > strong { font-size: 1rem; }
.legal-summary ul { margin: 15px 0 0; padding-left: 19px; color: var(--muted); }
.legal-summary li { margin: 9px 0; line-height: 1.5; }
.legal-content { padding: 38px 42px; border: 1px solid rgba(23, 50, 77, 0.08); border-radius: 18px; background: white; box-shadow: 0 14px 40px rgba(28, 49, 69, 0.07); }
.legal-content section + section { margin-top: 38px; padding-top: 36px; border-top: 1px solid var(--line); }
.legal-content h2 { margin: 0 0 14px; color: var(--ink); font-size: 1.35rem; letter-spacing: -0.025em; }
.legal-content p, .legal-content li { color: #465d72; font-size: 0.96rem; line-height: 1.75; }
.legal-content p { margin: 12px 0 0; }
.legal-content ul { margin: 12px 0 0; padding-left: 22px; }
.legal-content li + li { margin-top: 7px; }
.legal-content a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.legal-content code { padding: 2px 5px; border-radius: 5px; color: #244a69; background: #edf3f7; font-family: "Roboto Mono", monospace; font-size: 0.88em; }
.privacy-actions { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f7f9fb; }
.privacy-action-status { min-height: 1.5em; margin-top: 10px !important; color: #27784b !important; font-size: 0.85rem !important; font-weight: 750; }

.contact-grid { max-width: 1080px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-top: 48px; }
.contact-card { padding: 28px; border: 1px solid rgba(23, 50, 77, 0.09); border-radius: 18px; background: white; box-shadow: 0 12px 34px rgba(28, 49, 69, 0.07); }
.contact-card--primary { grid-column: 1 / -1; padding: 38px; background: linear-gradient(135deg, white 0%, #f1f6f9 100%); }
.contact-card h2 { margin: 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.contact-card p, .contact-card li { color: var(--muted); line-height: 1.7; }
.contact-card ul { padding-left: 20px; }
.contact-card .button { margin-top: 10px; text-decoration: none; }
.contact-links { display: grid; gap: 9px; margin-top: 15px; }
.contact-links a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); background: #f8fafb; font-weight: 750; text-decoration: none; }
.contact-links a:hover { background: #eef4f7; }

@media (max-width: 880px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-summary { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card--primary { grid-column: auto; }
}

@media (max-width: 640px) {
  .legal-hero { padding: 50px 0 42px; }
  .legal-content { padding: 25px 20px; }
  .contact-card, .contact-card--primary { padding: 24px 20px; }
  .site-nav { gap: 14px; }
  .site-nav a:nth-child(2) { display: none; }
}
