/* Confluence Tutoring: shared tokens and the public booking page. */

:root {
  --ink: #010518;
  --navy: #1d355d;
  --blue: #7899d4;
  --platinum: #e4ecf1;
  --beige: #b0a084;

  --paper: #f4f7fc;
  --paper-2: #e8eef8;
  --line: #cdd8ea;
  --line-strong: #9fb1d2;
  --text: #0b1533;
  --text-2: #36456c;
  --blue-deep: #2a4f9f;
  --tint: #dbe6fa;
  --warn: #8a2f2f;
  --warn-bg: #f8e9e6;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-text: 'Lora', Georgia, 'Times New Roman', serif;
  --font-ui: 'Author', 'Segoe UI', system-ui, sans-serif;
  --font-script: 'Luxurious Script', 'Snell Roundhand', cursive;

  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.55 var(--font-text);
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--navy); color: var(--platinum); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
a { color: var(--blue-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; border-radius: var(--r-1); }
.icon { display: inline-flex; flex: none; }
.icon svg { display: block; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--platinum); padding: 10px 14px; border-radius: var(--r-2);
  font: 600 0.9375rem var(--font-ui); text-decoration: none;
}
.skip:hover, .skip:focus { color: var(--platinum); }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-2);
  font: 600 0.9375rem/1 var(--font-ui); letter-spacing: 0.01em; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: var(--platinum); }
.btn--primary:hover { background: var(--navy); color: #fff; }
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--navy); background: var(--paper-2); color: var(--ink); }
.btn--quiet { background: transparent; color: var(--blue-deep); padding: 0 10px; min-height: 40px; }
.btn--quiet:hover { background: var(--paper-2); color: var(--ink); }
.btn--danger { background: transparent; color: var(--warn); border-color: #d9b3ae; }
.btn--danger:hover { background: var(--warn-bg); }
.btn[disabled], .btn[aria-busy='true'] { opacity: 0.55; cursor: default; transform: none; }
.btn--block { width: 100%; }
.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.iconbtn:hover:not([disabled]) { background: var(--tint); border-color: var(--line-strong); transform: translateY(-1px); }
.iconbtn:active:not([disabled]) { transform: translateY(1px); }
.iconbtn[disabled] { opacity: 0.35; cursor: default; }

/* ---------- fields ---------- */
.field { display: grid; gap: 6px; }
.field__label { font: 600 0.875rem/1.3 var(--font-ui); color: var(--text); }
.field__hint { font: 400 0.8125rem/1.4 var(--font-ui); color: var(--text-2); }
.field__input {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-2);
  font: 400 1rem/1.4 var(--font-ui); color: var(--text); caret-color: var(--blue-deep);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.field__input { min-height: 96px; resize: vertical; }
select.field__input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%231d355d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.500 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field__input:hover { border-color: var(--navy); }
.field__input:focus-visible { outline: none; border-color: var(--blue-deep); box-shadow: 0 0 0 3px rgba(42, 79, 159, 0.22); }
.field__input::placeholder { color: #5d6b8f; }
.field__error { font: 500 0.8125rem/1.4 var(--font-ui); color: var(--warn); }
.field[data-invalid] .field__input { border-color: var(--warn); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-2); overflow: hidden; background: #fff; }
.segmented label { position: relative; display: grid; place-items: center; min-height: 46px; padding: 6px 10px; text-align: center; font: 500 0.9375rem/1.25 var(--font-ui); color: var(--text-2); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.segmented label + label { border-left: 1px solid var(--line-strong); }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--ink); color: var(--platinum); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--blue-deep); outline-offset: -3px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; max-width: min(92vw, 560px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--platinum); padding: 13px 18px; border-radius: var(--r-2);
  font: 500 0.9375rem/1.4 var(--font-ui);
  box-shadow: 0 14px 34px -12px rgba(1, 5, 24, 0.6), 0 2px 6px rgba(1, 5, 24, 0.25);
  transition: transform 0.4s var(--ease), opacity 0.25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast[data-kind='error'] { background: #5d1f1f; color: #fdeeee; }

/* ---------- the illustration ---------- */
.scene { position: fixed; inset: 0; overflow: hidden; background: #0a1840; }
.scene__grain { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: 0.6; }

/* ---------- public page ---------- */
.stage {
  position: relative; z-index: 1; min-height: 100svh;
  display: flex; align-items: flex-start;
  padding: clamp(18px, 4.500svh, 56px) clamp(16px, 5vw, 72px) 96px;
  pointer-events: none;
}
.sheet {
  pointer-events: auto;
  width: min(100%, 468px);
  background: var(--paper); border-radius: var(--r-3); overflow: clip;
  box-shadow: 0 30px 70px -28px rgba(1, 5, 24, 0.7), 0 3px 10px rgba(1, 5, 24, 0.28);
  transition: width 0.55s var(--ease);
  animation: sheet-in 0.9s var(--ease) both;
}
@keyframes sheet-in { from { clip-path: inset(0 0 100% 0 round 10px); transform: translateY(-10px); } to { clip-path: inset(0 0 0 0 round 10px); transform: none; } }
.sheet[data-step='pick'] { width: min(100%, 760px); }
.sheet[data-step='times'] { width: min(100%, 960px); }
.sheet[data-step='details'] { width: min(100%, 860px); }
.sheet[data-step='request'] { width: min(100%, 520px); }

.sheet__band { background: var(--ink); padding: 22px 28px 20px; }
.sheet__logo { display: inline-block; border-radius: var(--r-1); }
.sheet__logo img { height: clamp(50px, 13vw, 64px); width: auto; }
.sheet__logo:focus-visible { outline-color: var(--blue); }
.sheet__motto { display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: var(--blue); padding: 3px 28px 4px; min-height: 30px; }
.sheet__motto img { width: 84px; transform: rotate(180deg); opacity: 0.9; }
.sheet__motto span { font: 400 1.5rem/1 var(--font-script); color: var(--ink); }
.sheet__body { padding: 28px 28px 26px; }
.sheet__foot {
  padding: 14px 28px 16px; border-top: 1px solid var(--line);
  font: 400 0.8125rem/1.45 var(--font-ui); color: var(--text-2);
}
.sheet__foot p { max-width: 58ch; }
.loading { font: 500 0.9375rem var(--font-ui); color: var(--text-2); padding: 30px 0; }
.noscript { position: relative; z-index: 2; margin: 16px; padding: 14px 18px; background: var(--paper); border-radius: var(--r-2); font-family: var(--font-ui); }

.who { display: flex; align-items: center; gap: 14px; }
.who__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--tint); }
.who__name { font: 600 1rem/1.2 var(--font-ui); color: var(--ink); }
.who__role { font: 400 0.875rem/1.3 var(--font-ui); color: var(--text-2); }

.intro h1 { margin-top: 22px; font-weight: 700; font-size: clamp(1.75rem, 1.300rem + 1.400vw, 2.250rem); line-height: 1.12; letter-spacing: -0.012em; }
.intro__text { margin-top: 12px; color: var(--text-2); max-width: 46ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 0; padding: 0; list-style: none; font: 500 0.9375rem/1.3 var(--font-ui); color: var(--navy); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }

.types { margin-top: 24px; }
.types h2 { font-size: 1.125rem; font-weight: 700; }
.types__list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.types__list li { border-bottom: 1px solid var(--line); }
/* The row keeps its exact size on hover: only the tint and the arrow change, so no text reflows. */
.type {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 14px;
  margin: 0 -12px; padding: 13px 12px; border-radius: var(--r-2);
  color: inherit; text-decoration: none;
  transition: background-color 0.25s;
}
.type:hover { background: var(--paper-2); color: inherit; }
.type__name { font: 600 1.1875rem/1.25 var(--font-display); color: var(--ink); }
.type__desc { grid-column: 1; font-size: 0.9375rem; line-height: 1.45; color: var(--text-2); max-width: 40ch; }
.type__time { grid-row: 1 / span 2; grid-column: 2; font: 600 0.875rem/1 var(--font-ui); color: var(--navy); background: var(--tint); padding: 7px 10px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.type__go { grid-row: 1 / span 2; grid-column: 3; color: var(--blue-deep); transition: transform 0.35s var(--ease); }
.type:hover .type__go { transform: translateX(4px); }

/* ---------- pick a day and time ---------- */
.pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.pick__info h1 { margin-top: 16px; font-size: clamp(1.500rem, 1.250rem + 0.800vw, 1.875rem); font-weight: 700; line-height: 1.15; }
.pick__back { margin: -6px 0 14px -8px; }
.meta { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 9px; font: 500 0.9375rem/1.35 var(--font-ui); color: var(--navy); }
.meta li { display: flex; gap: 10px; align-items: flex-start; }
.meta .icon { margin-top: 1px; color: var(--blue-deep); }
.meta__when { color: var(--ink); font-weight: 600; }
.pick__desc { margin-top: 14px; font-size: 0.9375rem; color: var(--text-2); max-width: 38ch; }

.cal h2, .times h2, .details h2 { font-size: 1.125rem; font-weight: 700; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.cal__month { font: 600 1rem/1 var(--font-ui); color: var(--ink); }
.cal__nav { display: flex; gap: 6px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.cal__dow { text-align: center; font: 600 0.75rem/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); padding: 8px 0 6px; }
.day {
  position: relative; aspect-ratio: 1; min-width: 0; max-height: 48px; justify-self: center; width: 100%; max-width: 48px;
  display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent;
  font: 500 0.9375rem/1 var(--font-ui); font-variant-numeric: tabular-nums; color: #6a779a;
}
.day--open { background: var(--tint); color: var(--navy); font-weight: 700; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.25s var(--ease); }
.day--open:hover { background: var(--blue); color: var(--ink); transform: scale(1.06); }
.day--open:active { transform: scale(0.96); }
.day[aria-pressed='true'] { background: var(--ink); color: var(--platinum); }
.day--today::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.cal__tz { margin-top: 18px; }
.cal__wait { margin-top: 12px; min-height: 1.4em; font: 500 0.875rem var(--font-ui); color: var(--text-2); }

.times__date { margin-top: 4px; font: 500 0.9375rem/1.3 var(--font-ui); color: var(--text-2); }
.times__list { list-style: none; margin: 14px 0 0; padding: 0 4px 0 0; display: grid; gap: 8px; max-height: 392px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.time {
  width: 100%; min-height: 48px; border: 1px solid var(--blue-deep); border-radius: var(--r-2); background: transparent;
  font: 600 1rem/1 var(--font-ui); font-variant-numeric: tabular-nums; color: var(--blue-deep); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.time:hover { background: var(--tint); border-color: var(--navy); color: var(--ink); transform: translateY(-1px); }
.time:active { transform: translateY(1px); }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; animation: pair-in 0.4s var(--ease); }
@keyframes pair-in { from { grid-template-columns: 1fr 0fr; } }
.time-pair__chosen { display: grid; place-items: center; min-height: 48px; border-radius: var(--r-2); background: var(--navy); color: #fff; font: 600 1rem/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.time-pair .btn { min-height: 48px; padding: 0 10px; overflow: hidden; }
.times__none { margin-top: 14px; font: 400 0.9375rem/1.45 var(--font-ui); color: var(--text-2); }

/* ---------- details form ---------- */
.form { display: grid; gap: 16px; margin-top: 14px; }
.form__row { display: grid; gap: 16px; align-items: start; }
.form__note { font: 400 0.875rem/1.45 var(--font-ui); color: var(--text-2); }
.form__alert { padding: 11px 14px; border-radius: var(--r-2); background: var(--warn-bg); color: var(--warn); font: 500 0.9375rem/1.4 var(--font-ui); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- request status ---------- */
.status h1 { font-size: clamp(1.625rem, 1.300rem + 1vw, 2rem); font-weight: 700; line-height: 1.15; }
.status__mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-bottom: 16px; }
.status__mark[data-kind='pending'] { background-image: repeating-linear-gradient(135deg, var(--blue-deep) 0 1.500px, transparent 1.500px 6px); border: 1.500px solid var(--blue-deep); color: var(--blue-deep); background-color: var(--paper); }
.status__mark[data-kind='confirmed'] { background: var(--ink); color: var(--platinum); }
.status__mark[data-kind='closed'] { background: var(--paper-2); color: var(--text-2); border: 1px solid var(--line-strong); }
.status__text { margin-top: 10px; color: var(--text-2); max-width: 44ch; }
.status__card { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-2); background: #fff; }
.status__card .meta { margin-top: 0; }
.status__note { margin-top: 16px; padding: 12px 14px; background: var(--paper-2); border-radius: var(--r-2); font-size: 0.9375rem; color: var(--text); }
.status__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- layout by width ---------- */
@media (min-width: 900px) {
  .sheet[data-step='pick'] .pick { grid-template-columns: minmax(0, 0.850fr) minmax(0, 1fr); gap: 0; }
  .sheet[data-step='times'] .pick { grid-template-columns: minmax(0, 0.900fr) minmax(0, 1.100fr) minmax(0, 0.640fr); gap: 0; }
  .sheet[data-step='details'] .pick { grid-template-columns: minmax(0, 0.800fr) minmax(0, 1.200fr); gap: 0; }
  .pick__info { padding-right: 28px; }
  .cal, .times, .details { padding-left: 28px; border-left: 1px solid var(--line); }
  .cal { padding-right: 28px; }
  .sheet[data-step='pick'] .cal { padding-right: 0; }
  .form__row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 899px) {
  .scene { height: 42svh; }
  .stage { padding: calc(42svh - 18px) 12px 40px; background: linear-gradient(to bottom, transparent 42svh, var(--ink) 42svh); }
  .sheet, .sheet[data-step] { width: 100%; max-width: 620px; margin-inline: auto; }
  .sheet__band, .sheet__body, .sheet__foot, .sheet__motto { padding-left: 20px; padding-right: 20px; }
  .sheet__body { padding-top: 22px; }
  .cal, .times, .details { padding-top: 22px; border-top: 1px solid var(--line); }
  .times__list { max-height: none; overflow: visible; padding-right: 0; grid-template-columns: 1fr 1fr; }
  .times__list li:has(.time-pair) { grid-column: 1 / -1; }
  .day { max-width: 46px; max-height: 46px; }
  .status__actions .btn, .form .btn { width: 100%; }
}
@media (max-width: 380px) {
  .type { grid-template-columns: 1fr auto; }
  .type__go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
