:root {
  color-scheme: light;
  --ink: #05302b;
  --ink-2: #0f172a;
  --paper: #f6f7f4;
  --surface: #ffffff;
  --line: #d8dfd8;
  --muted: #58645e;
  --accent: #0f766e;
  --blue: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 15px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-nav {
  align-items: center;
  background: rgba(246, 247, 244, 0.9);
  border-bottom: 1px solid rgba(216, 223, 216, 0.9);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 14px clamp(20px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  height: 34px;
  width: 34px;
}

nav {
  align-items: center;
  display: flex;
  gap: clamp(14px, 3vw, 28px);
}

nav a,
.footer a,
.nav-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font: inherit;
  text-decoration: none;
}

.hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(5, 48, 43, 0.9), rgba(5, 48, 43, 0.54)),
    url("./assets/splash.png") right center / auto 115% no-repeat;
  color: #ffffff;
  display: flex;
  min-height: 82vh;
  padding: clamp(56px, 8vw, 108px) clamp(22px, 6vw, 88px);
}

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

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bdf2d8;
}

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

h1 {
  font-size: clamp(42px, 9vw, 92px);
  line-height: 0.96;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.06;
  margin-bottom: 14px;
}

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

.lede {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.45;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 14px 18px;
  text-decoration: none;
}

.primary-action {
  background: #ffffff;
  color: var(--ink);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(22px, 6vw, 88px);
}

.section-heading {
  max-width: 760px;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.feature-card p,
.split-band p,
.legal p,
.support-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.split-band {
  align-items: start;
  background: #e8f0ea;
  display: grid;
  gap: 28px;
  grid-template-columns: 1.1fr 0.9fr;
}

.legal {
  margin: 0 auto;
  max-width: 860px;
  padding: clamp(54px, 8vw, 92px) 22px;
}

.legal h1,
.support-panel h1 {
  color: var(--ink);
  font-size: clamp(42px, 7vw, 78px);
}

.legal h2 {
  border-top: 1px solid var(--line);
  font-size: 24px;
  margin-top: 32px;
  padding-top: 24px;
}

.legal a {
  color: var(--blue);
  font-weight: 800;
}

.support-page {
  min-height: 72vh;
}

.support-panel {
  background:
    linear-gradient(90deg, rgba(5, 48, 43, 0.88), rgba(5, 48, 43, 0.7)),
    url("./assets/icon.png") right 8% center / 420px 420px no-repeat;
  color: #ffffff;
  padding: clamp(72px, 12vw, 140px) clamp(22px, 6vw, 88px);
}

.support-panel p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 650px;
}

.support-panel .primary-action {
  margin-top: 24px;
}

.compact {
  padding-top: 44px;
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 28px 20px;
}

.auth-shell,
.app-shell {
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 72px);
}

.auth-clean {
  background: #f8faf8;
}

.auth-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
}

.auth-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

.auth-brand {
  margin-bottom: 0;
}

.auth-topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-panel h1 {
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 10px;
}

.auth-lede {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.auth-panel .eyebrow {
  font-size: 11px;
  margin-bottom: 8px;
}

.app-header h1 {
  color: var(--ink);
  font-size: clamp(34px, 6vw, 54px);
  margin-bottom: 14px;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.record-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-form input {
  min-height: 44px;
  padding: 11px 12px;
}

.auth-form button[type="submit"] {
  margin-top: 2px;
  min-height: 44px;
}

.auth-panel .small-copy {
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}

label {
  color: var(--ink-2);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
}

input,
textarea,
select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-2);
  font: inherit;
  min-height: 46px;
  padding: 12px 13px;
  width: 100%;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 46px;
  padding: 12px 16px;
}

button[type="button"] {
  background: #e8f0ea;
  color: var(--ink);
}

.small-copy {
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
}

.status-line {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  margin: 16px 0 0;
  min-height: 22px;
}

.status-line[data-kind="warning"] {
  color: #b45309;
}

.status-line[data-kind="error"] {
  color: #dc2626;
}

.status-line[data-kind="success"] {
  color: #047857;
}

.app-header {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 42px);
}

.app-header h1 {
  color: #ffffff;
}

.app-header p {
  color: rgba(255, 255, 255, 0.76);
}

.app-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  margin-top: 20px;
}

.record-form,
.ai-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.record-form h2,
.ai-panel h2 {
  font-size: 26px;
  margin-bottom: 4px;
}

.form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-panel pre {
  background: #f1f5f2;
  border-radius: 8px;
  color: var(--ink-2);
  font-family: inherit;
  line-height: 1.6;
  min-height: 220px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.app-records {
  padding-left: 0;
  padding-right: 0;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.record-card-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.record-actions {
  flex: 0 0 auto;
  position: relative;
}

.record-menu-button {
  align-items: center;
  background: #f7faf7 !important;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink) !important;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.record-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  min-width: 132px;
  overflow: hidden;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 40px;
  z-index: 5;
}

.record-menu[hidden] {
  display: none;
}

.record-menu button {
  background: transparent !important;
  border: 0;
  border-radius: 6px;
  color: var(--ink) !important;
  font-size: 13px;
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 10px;
  text-align: left;
}

.record-menu button:hover {
  background: #f3f7f3 !important;
}

.record-menu .danger-menu-item {
  color: #be123c !important;
}

.record-card h3 {
  margin-bottom: 6px;
}

.record-card p {
  color: var(--muted);
  line-height: 1.6;
}

.record-content {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  white-space: pre-wrap;
}

.record-content[data-expanded="true"] {
  display: block;
  overflow: visible;
}

.record-expand-button {
  background: transparent !important;
  color: var(--accent) !important;
  font-size: 13px;
  min-height: 0;
  padding: 8px 0 0;
}

.record-type {
  color: var(--accent) !important;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
}

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

.record-meta span {
  background: #e8f0ea;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.danger-button {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3;
  color: #be123c !important;
  flex: 0 0 auto;
  font-size: 12px;
  min-height: 34px;
  padding: 7px 10px;
}

.submit-row {
  display: flex;
  gap: 10px;
}

.submit-row .save-button {
  flex: 1;
}

.cancel-edit-button {
  background: #f7faf7 !important;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  flex: 0 0 auto;
}

.empty-state {
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 24px;
}

.workspace-page {
  background: #f8faf8;
}

.workspace-nav {
  align-items: center;
  background: rgba(248, 250, 248, 0.94);
  border-bottom: 1px solid rgba(216, 223, 216, 0.86);
  display: flex;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-tools,
.language-switch {
  align-items: center;
  display: flex;
  gap: 8px;
}

.language-switch {
  background: #eef3ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}

.language-switch button,
.ghost-button {
  background: transparent;
  color: var(--ink);
  min-height: 34px;
  padding: 7px 10px;
}

.language-switch button[data-active="true"] {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.memory-workspace {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(18px, 4vw, 44px) clamp(14px, 3vw, 28px);
}

.capture-hero {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 0 28px;
}

.capture-hero h1 {
  color: var(--ink);
  font-size: clamp(32px, 4.8vw, 58px);
  line-height: 1.02;
  margin-bottom: 12px;
  max-width: 860px;
}

.lede.dark,
.signed-in {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 0;
}

.signed-in {
  margin-top: 10px;
}

.primary-dark,
.save-button {
  background: var(--ink);
  color: #ffffff;
}

.workspace-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  margin-top: 18px;
}

.capture-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 24px);
}

.panel-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.panel-head h2 {
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 0;
}

.panel-head select {
  max-width: 150px;
}

.capture-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.capture-actions button {
  background: #eef3ef;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 8px;
}

.selected-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.selected-files span {
  align-items: center;
  background: #eef3ef;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  padding: 6px 8px 6px 10px;
}

.selected-files button {
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  height: 20px;
  justify-content: center;
  min-height: 20px;
  padding: 0;
  width: 20px;
}

.timeline-section {
  padding: 32px 0 0;
}

.compact-heading h2 {
  color: var(--ink);
  font-size: 26px;
}

.quiet-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 14px;
  justify-content: center;
  padding: 22px 16px 30px;
}

.quiet-footer a {
  color: var(--muted);
  text-decoration: none;
}

.camera-overlay {
  align-items: center;
  background: rgba(5, 48, 43, 0.7);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 18px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 50;
}

.camera-panel {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
  display: grid;
  gap: 12px;
  max-width: 760px;
  overflow: hidden;
  padding: 12px;
  width: min(100%, 760px);
}

.camera-panel video {
  aspect-ratio: 4 / 3;
  background: #0f172a;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.camera-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

@media (max-width: 780px) {
  .site-nav {
    padding-inline: 18px;
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(5, 48, 43, 0.96), rgba(5, 48, 43, 0.7)),
      url("./assets/splash.png") center bottom / auto 82% no-repeat;
    min-height: 78vh;
  }

  .feature-grid,
  .split-band,
  .app-grid,
  .form-row,
  .workspace-grid,
  .capture-hero {
    grid-template-columns: 1fr;
  }

  .capture-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-head select {
    max-width: none;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .support-panel {
    background:
      linear-gradient(180deg, rgba(5, 48, 43, 0.94), rgba(5, 48, 43, 0.76)),
      url("./assets/icon.png") right -92px bottom -70px / 260px 260px no-repeat;
  }
}
