/* meet.biz — global styles */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1c2333;
  --muted: #5b6478;
  --line: #e3e7f0;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-text: #ffffff;
  --work: #dcf3e3;
  --work-text: #14532d;
  --edge: #fdf3d3;
  --edge-text: #713f12;
  --off: #fbdce6;
  --off-text: #831843;
  --shadow: 0 10px 30px rgba(28, 35, 51, 0.08);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141f;
    --card: #1a2030;
    --text: #e8ebf4;
    --muted: #9aa3b8;
    --line: #2a3145;
    --work: #14532d;
    --work-text: #bbf7d0;
    --edge: #574a13;
    --edge-text: #fde68a;
    --off: #58152e;
    --off-text: #fbcfe8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.wrap {
  width: min(1000px, 100% - 2rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span { opacity: 0.85; font-weight: 500; }

.site-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin-left: 1.1rem;
  font-size: 0.95rem;
}

.site-nav a:hover { text-decoration: underline; }

/* Hero */
.hero { text-align: center; padding: 2.2rem 0 0.5rem; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Cards / sections */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin: 1.4rem 0;
}

main { padding-bottom: 2rem; }

h2 { font-size: 1.25rem; margin-top: 0; }
h3 { font-size: 1.05rem; }

/* Planner form */
.city-rows { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 0.9rem; }

.city-row { display: flex; align-items: center; gap: 0.55rem; }

.city-row select {
  flex: 1;
  min-width: 0;
}

select, input[type="date"], input[type="time"] {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.55rem 0.7rem;
  width: 100%;
}

select:focus, input:focus, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.row-label {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 4.2rem;
  text-align: right;
}

.btn {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  transition: filter 0.15s ease, transform 0.05s ease;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.98); }

.btn-secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }

.btn-remove {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 7px;
}

.btn-remove:hover { color: #e11d48; background: var(--bg); }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: end;
  margin: 1rem 0;
}

.controls .field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 150px; }
.controls .field label { font-size: 0.8rem; color: var(--muted); }

.seg {
  display: inline-flex;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.seg button {
  font: inherit;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.seg button.active { background: var(--accent); color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }

/* Results grid (cities as rows, hours as columns, draggable pill) */
.grid-scroller {
  overflow-x: auto;
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.tz-grid {
  --cell-w: 58px;
  --label-w: 136px;
  position: relative;
  display: grid;
  grid-template-columns: var(--label-w) repeat(24, var(--cell-w));
  min-width: max-content;
  padding: 8px 8px 8px 0;
}

.tz-row { display: contents; }

.tz-label {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--card);
  padding: 0.5rem 0.7rem;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}

.tz-label .tz-offset { font-size: 0.7rem; color: var(--muted); font-weight: 400; }

.cell {
  min-height: 54px;
  padding: 0.4rem 0.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: center;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 var(--line);
  user-select: none;
  -webkit-user-select: none;
}

.cell:hover { filter: brightness(0.95); }
.cell .cell-time { white-space: nowrap; }
.cell .cell-date { font-size: 0.62rem; opacity: 0.75; white-space: nowrap; }
.cell.sel .cell-time { font-weight: 700; }
.cell.day-start { border-left: 2px dashed var(--muted); }

.t-work { background: var(--work); color: var(--work-text); }
.t-edge { background: var(--edge); color: var(--edge-text); }
.t-off  { background: var(--off);  color: var(--off-text); }

.pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: var(--cell-w);
  left: calc(var(--label-w) + var(--sel, 0) * var(--cell-w));
  border-radius: 999px;
  border: 2.5px solid var(--accent);
  background: rgba(79, 70, 229, 0.14);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  cursor: grab;
  z-index: 2;
  touch-action: none;
  transition: left 0.12s ease;
}

.pill.dragging { transition: none; cursor: grabbing; }

.pill::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.85;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.legend .swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: -2px;
  border: 1px solid var(--line);
}

.hint { color: var(--muted); font-size: 0.9rem; }

/* Content sections */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.steps .step h3 { margin: 0.2rem 0; }
.steps .step p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0;
}

details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); }

/* Legal / prose pages */
.prose { max-width: 760px; }
.prose h1 { font-size: 1.7rem; }
.prose h2 { margin-top: 1.8rem; }
.prose .updated { color: var(--muted); font-size: 0.85rem; }
.prose a { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 0.6rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* Cookie consent banner */
.consent-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
  padding: 1rem;
}

.consent-inner {
  width: min(1000px, 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.consent-inner p { margin: 0; flex: 1 1 320px; font-size: 0.88rem; color: var(--muted); }
.consent-inner a { color: var(--accent); }
.consent-buttons { display: flex; gap: 0.6rem; }

/* Ad slot */
.ad-slot { margin: 1.4rem 0; text-align: center; min-height: 0; }

/* Mobile tweaks */
@media (max-width: 600px) {
  .row-label { display: none; }
  .site-nav a { margin-left: 0.8rem; font-size: 0.9rem; }
  .card { padding: 1rem; }
  .actions .btn { flex: 1 1 auto; }
  .tz-grid { --cell-w: 52px; --label-w: 98px; }
  .tz-label { font-size: 0.78rem; }
}
