:root {
  color-scheme: light;
  --ink: #111217;
  --muted: #6b6f7b;
  --line: rgba(18, 20, 28, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --blue: #007aff;
  --green: #34c759;
  --orange: #ff9f0a;
  --red: #ff3b30;
  --violet: #af52de;
  --shadow: 0 18px 55px rgba(34, 44, 72, 0.12);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, Segoe UI, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 122, 255, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 10%, rgba(52, 199, 89, 0.15), transparent 24rem),
    linear-gradient(140deg, #f7f9fc 0%, #ffffff 45%, #eef5f2 100%);
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

#mesh {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.7;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 38px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #111217;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(17, 18, 23, 0.16);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  padding: 11px 12px;
  border-radius: var(--radius);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(0, 122, 255, 0.1);
  color: #063a72;
  transform: translateX(2px);
}

main {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: 38px;
}

.hero {
  min-height: 44vh;
  display: grid;
  align-items: end;
  padding-bottom: 42px;
}

.hero-copy {
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #255f90;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 900px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.tool-band {
  padding: 42px 0 70px;
  scroll-margin-top: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}

.share-grid,
.alpr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 0.68fr);
  align-items: start;
  gap: 20px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  padding: 18px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.drop-zone {
  min-height: 230px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  border: 1px dashed rgba(0, 122, 255, 0.38);
  border-radius: var(--radius);
  background: rgba(0, 122, 255, 0.05);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.drop-zone.dragging {
  transform: scale(1.01);
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.6);
}

.drop-zone input,
.file-label input {
  display: none;
}

.drop-zone strong,
.drop-zone small {
  display: block;
}

.drop-zone small {
  color: var(--muted);
}

.drop-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 30px;
  line-height: 1;
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.save-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  white-space: nowrap;
}

.save-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 18, 23, 0.08);
}

progress::-webkit-progress-bar {
  background: rgba(17, 18, 23, 0.08);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 999px;
}

.primary,
.ghost,
.delete-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  white-space: nowrap;
}

.primary {
  color: #fff;
  background: #111217;
  box-shadow: 0 12px 28px rgba(17, 18, 23, 0.16);
}

.ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.delete-btn {
  color: var(--red);
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.14);
}

.icon-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  transition: transform 140ms ease, background 140ms ease;
}

.primary:hover,
.ghost:hover,
.delete-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.pin-result {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(52, 199, 89, 0.28);
  border-radius: var(--radius);
  background: rgba(52, 199, 89, 0.08);
}

.pin-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pin-result strong {
  font-size: 34px;
  letter-spacing: 0;
}

.share-url-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(52, 199, 89, 0.22);
}

.share-url-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #075db3;
  text-decoration: none;
}

.share-url-row a:hover {
  text-decoration: underline;
}

.file-browser-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(247, 249, 252, 0.58);
  backdrop-filter: blur(18px);
}

.file-browser-panel {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(28, 42, 70, 0.18);
  overflow: hidden;
}

.file-browser-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.file-browser-head h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.file-browser-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.file-browser-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 13px;
}

.file-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 0 20px 20px;
}

.file-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.file-type-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #075db3;
  background: rgba(0, 122, 255, 0.1);
  font-size: 11px;
  font-weight: 900;
}

.file-row-meta {
  min-width: 0;
}

.file-row-meta strong,
.file-row-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row-meta span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.file-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.file-empty {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(17, 18, 23, 0.04);
}

.file-share-output {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid rgba(52, 199, 89, 0.22);
  background: rgba(52, 199, 89, 0.08);
}

.file-share-output span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.file-share-output strong {
  font-size: 22px;
}

.file-share-output a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #075db3;
  text-decoration: none;
}

.pin-entry,
.voice-row,
.composer,
.camera-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.fine {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-panel,
.reminders-panel {
  min-height: 420px;
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 330px;
  overflow: auto;
  padding: 6px;
}

.bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: var(--radius);
  line-height: 1.45;
}

.bubble.ai {
  justify-self: start;
  background: rgba(17, 18, 23, 0.08);
}

.bubble.user {
  justify-self: end;
  color: #fff;
  background: var(--blue);
}

.composer {
  margin-top: 12px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.today-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(0, 122, 255, 0.06);
}

.today-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.today-strip strong {
  text-align: right;
}

.category-tabs button {
  min-height: 34px;
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--muted);
  background: rgba(17, 18, 23, 0.06);
  cursor: pointer;
}

.category-tabs button.active {
  color: #fff;
  background: var(--blue);
}

.reminder-list {
  display: grid;
  gap: 10px;
}

.reminder-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.reminder-item:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 122, 255, 0.26);
  background: rgba(255, 255, 255, 0.78);
}

.reminder-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}

.reminder-preview {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.reminder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.reminder-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 18, 23, 0.06);
  color: var(--muted);
  font-size: 13px;
}

.reminder-actions,
.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reminder-detail {
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(246, 251, 255, 0.72)),
    rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 45px rgba(20, 40, 70, 0.1);
  overflow: hidden;
}

.back-btn {
  margin: 18px 0 0 18px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-head h3 {
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.08;
}

.detail-pill,
.detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.1);
  color: #075db3;
  font-size: 12px;
  font-weight: 800;
}

.detail-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.reminder-edit-form {
  display: grid;
  gap: 14px;
}

.reminder-edit-form label {
  display: grid;
  gap: 7px;
}

.reminder-edit-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.detail-summary {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-tile {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
}

.detail-tile span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 18, 23, 0.04);
}

.detail-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.detail-section p {
  margin-bottom: 0;
  line-height: 1.5;
}

.detail-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-checklist li {
  display: flex;
  gap: 10px;
  align-items: start;
}

.detail-checklist li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: rgba(52, 199, 89, 0.1);
}

.detail-transcript {
  color: var(--muted);
  white-space: pre-wrap;
}

.radar-panel {
  min-height: 320px;
  display: grid;
  place-items: center;
}

.alpr-launch {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 360px;
}

.alpr-launch h3 {
  font-size: 30px;
  line-height: 1.05;
}

.launch-link {
  display: inline-grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
}

.login-body {
  min-height: 100vh;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.login-panel h1 {
  margin: 6px 0 0;
  font-size: 42px;
}

.login-panel .brand-mark {
  width: 50px;
  height: 50px;
}

@media (max-width: 980px) {
  .brand small {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-list {
    min-width: max-content;
  }

  main {
    width: 100%;
    padding: 22px;
  }

  .hero,
  .share-grid,
  .alpr-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 32px;
  }

  .section-heading {
    display: block;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 42px;
  }

  .panel {
    padding: 14px;
  }

  .pin-entry,
  .voice-row,
  .composer,
  .camera-actions,
  .upload-actions,
  .file-browser-toolbar,
  .file-row,
  .file-share-output {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .reminder-item,
  .reminder-meta,
  .edit-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-head {
    display: grid;
  }

  .reminder-actions,
  .detail-actions,
  .edit-actions {
    flex-wrap: wrap;
  }

  .pin-result {
    grid-template-columns: 1fr;
  }

  .share-url-row {
    grid-template-columns: 1fr;
  }

  .file-browser-backdrop {
    padding: 10px;
  }

  .file-browser-panel {
    max-height: calc(100vh - 20px);
  }

  .file-row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .file-row-actions button {
    padding: 0 8px;
  }
}
