.time-field,.temporal-field { min-width:0; width:100%; }
.temporal-entry { display:flex; align-items:stretch; position:relative; }
.temporal-entry input.temporal-input {
  min-width:0; width:100%; min-height:42px; padding:10px 44px 10px 12px;
  border:1px solid var(--edge); border-radius:8px; background:var(--canvas); color:var(--ink);
  font:inherit; font-size:13px; font-variant-numeric:tabular-nums;
}
.temporal-entry input.temporal-input:focus-visible { outline:2px solid var(--accent-line); outline-offset:2px; }
.temporal-entry input.temporal-input[readonly] { cursor:pointer; }
.temporal-trigger {
  position:absolute; inset:1px 1px 1px auto; display:grid; place-items:center; width:40px;
  padding:0; border:0; border-radius:0 7px 7px 0; color:var(--muted); background:transparent;
}
.temporal-trigger:hover { background:var(--wash); color:var(--ink); }
.temporal-trigger[aria-expanded=true] { color:var(--accent-ink); background:var(--accent-wash); }
.temporal-field>.temporal-help { display:block; margin:6px 0 0; font-size:11px; line-height:1.5; }
.temporal-error { display:block; margin:6px 0 0; color:var(--red); font-size:12px; line-height:1.5; }
.temporal-error[hidden] { display:none; }
.time-range { display:flex; align-items:flex-start; gap:10px; }
.time-range>.temporal-field { flex:1; min-width:0; }
.time-range>span { margin-top:12px; color:var(--muted); font-size:12px; }
.time-range .temporal-help { display:none; }
.inline-array-row:has(>.temporal-field) { align-items:flex-start; }
.inline-array-row>.temporal-field { flex:1; }
.temporal-popover {
  position:fixed; inset:auto; margin:0; width:328px; max-width:calc(100vw - 16px);
  max-height:calc(100dvh - 16px); overflow:auto; padding:0;
  border:1px solid var(--edge); border-radius:12px; background:var(--paper); color:var(--ink);
  box-shadow:0 12px 40px color-mix(in srgb,var(--shadow) 18%,transparent);
  font-family:inherit; font-size:13px; text-align:left;
}
.temporal-popover .icon-button { width:32px; min-width:32px; height:32px; padding:6px; }
.temporal-calendar { padding:12px 14px 0; }
.temporal-month { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.temporal-period-heading { display:flex; align-items:center; justify-content:center; gap:7px; flex:1; min-height:36px; padding:6px 8px; border:0; border-radius:7px; background:transparent; color:var(--ink); font-size:14px; font-weight:650; }
.temporal-period-heading:hover:not([aria-disabled=true]) { background:var(--wash); }
.temporal-period-heading[aria-disabled=true] { cursor:default; }
.temporal-period-heading>.icon { width:14px; height:14px; color:var(--muted); }
.temporal-periods { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:8px 0; }
.temporal-period { min-height:51px; padding:8px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; }
.temporal-period:hover:not(:disabled) { background:var(--wash); }
.temporal-period[aria-pressed=true] { border-color:var(--accent-line); background:var(--accent); color:var(--accent-on); font-weight:650; }
.temporal-period.outside-period { color:var(--muted); }
.temporal-period:disabled { opacity:.3; }
.temporal-previous>.icon { transform:rotate(180deg); }
.temporal-grid { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:2px; }
.temporal-grid th { padding:4px 0 6px; text-align:center; color:var(--muted); font-size:11px; font-weight:600; }
.temporal-grid td { padding:0; text-align:center; }
.temporal-day {
  display:grid; place-items:center; width:100%; height:34px; border:1px solid transparent; border-radius:7px;
  background:transparent; color:var(--ink); padding:0; font-size:13px; font-variant-numeric:tabular-nums;
}
.temporal-day.outside-month { color:var(--muted); }
.temporal-day[aria-current=date] { border-color:var(--accent-line); font-weight:650; }
.temporal-day:hover:not(:disabled) { background:var(--wash); }
.temporal-grid [aria-selected=true]>.temporal-day { background:var(--accent); border-color:var(--accent-line); color:var(--accent-on); font-weight:650; }
.temporal-day:disabled { opacity:.3; }
.temporal-popover button:focus-visible { outline:2px solid var(--accent-line); outline-offset:1px; }
.temporal-key-help { display:block; margin:8px 0 12px; color:var(--muted); font-size:10px; line-height:1.5; }
.temporal-clock { padding:12px 14px; }
.temporal-datetime .temporal-clock { border-top:1px solid var(--line); }
.temporal-time-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.temporal-time-column { min-width:0; }
.temporal-time-label { display:block; padding:0 0 8px; color:var(--muted); font-size:12px; font-weight:600; text-align:center; }
.temporal-time-list { max-height:174px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; border:1px solid var(--line); border-radius:7px; padding:3px; }
.temporal-time-list>button { display:block; width:100%; min-height:32px; padding:5px 8px; background:transparent; border:1px solid transparent; border-radius:5px; color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; }
.temporal-time-list>button:hover { background:var(--wash); }
.temporal-time-list>button[aria-selected=true] { background:var(--accent-wash); border-color:var(--accent-line); color:var(--accent-ink); font-weight:650; }
.temporal-datetime .temporal-time-list { max-height:132px; }
.temporal-popover>.temporal-error { margin:0; padding:0 14px 12px; }
.temporal-actions { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; padding:12px 14px; border-top:1px solid var(--line); }
.temporal-actions>.ghost:first-child { margin-right:auto; }
.insights-dates>div>div>label { margin-bottom:8px; }
@media(max-width:480px) {
  .time-range { flex-wrap:wrap; gap:8px; }
  .time-range>.temporal-field { flex-basis:calc(50% - 20px); }
  .temporal-day { height:38px; }
}