@font-face { font-family: "Futura"; src: url("fonts/Futura_Std_Book.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Futura"; src: url("fonts/Futura_Std_Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Futura"; src: url("fonts/Futura_Std_Heavy.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0B3D59;
  --navy-deep: #052030;
  --blue: #1B75BB;
  --sky: #27A9E1;
  --cyan: #49C0E1;
  --teal: #49C0B5;
  --green: #48C84F;
  --lime: #D3EA27;
  --text: #3f5162;
  --muted: #64748b;
  --line: #e3ebf2;
  --page: #f5f7fa;
  --brand-gradient: linear-gradient(135deg, #D3EA27 0%, #48C84F 18%, #49C0E1 52%, #3b9edd 78%, #2b7cb8 100%);
  --stripe: repeating-linear-gradient(90deg, #1B75BB 0 24px, #27A9E1 24px 48px, #49C0B5 48px 72px, #D6DF23 72px 96px, #38B449 96px 120px);
  --font: 'Futura', 'Futura PT', 'Century Gothic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

html, body, button, input, textarea, select, kbd, code, pre {
  font-family: var(--font);
}

body {
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.brand-line {
  height: 4px;
  background: var(--stripe);
}

.label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--navy);
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.3) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11, 61, 89, 0.3); }
.btn-primary:hover::after { transform: translateX(120%); }

kbd {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
}

/* Chat modal */
dialog.chat-modal {
  width: min(920px, calc(100vw - 32px));
  height: min(780px, calc(100vh - 64px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
}
dialog.chat-modal[open] {
  display: flex;
  flex-direction: column;
  animation: modalIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
dialog.chat-modal::backdrop {
  background: rgba(5, 32, 48, 0.62);
  backdrop-filter: blur(8px);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 18px 22px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  flex-shrink: 0;
}
.modal-head .brand-line { position: absolute; left: 0; right: 0; bottom: 0; }
.modal-brand { display: flex; align-items: center; gap: 14px; }
.modal-brand img { height: 30px; width: auto; }
.modal-brand .divider { width: 1px; height: 28px; background: rgba(255, 255, 255, 0.25); }
.modal-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; line-height: 1.2; letter-spacing: 0.01em; }
.ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px 4px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: linear-gradient(120deg, #27A9E1, #49C0B5 55%, #D6DF23);
}
.modal-title .ai-badge { font-size: 12px; padding: 4px 7px 3px; border-radius: 6px; }
.modal-sub { font-size: 12px; color: rgba(255, 255, 255, 0.7); margin-top: 3px; letter-spacing: 0.02em; }
.modal-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.12); }

chat-page-snippet {
  display: block;
  flex: 1;
  min-height: 0;
  height: auto;
  --search-snippet-font-family: var(--font);
  --search-snippet-font-family-mono: var(--font);
  --search-snippet-primary-color: #0B3D59;
  --search-snippet-primary-hover: #1B75BB;
  --search-snippet-text-color: #0B3D59;
  --search-snippet-text-secondary: #64748b;
  --search-snippet-text-description: #3f5162;
  --search-snippet-surface: #f5f7fa;
  --search-snippet-border-color: #e3ebf2;
  --search-snippet-hover-background: #eaf3fa;
  --search-snippet-focus-ring: rgba(39, 169, 225, 0.35);
  --search-snippet-user-message-bg: #0B3D59;
  --search-snippet-user-message-text: #ffffff;
  --search-snippet-assistant-message-bg: #f3f8fb;
  --search-snippet-assistant-message-text: #3f5162;
  --search-snippet-border-radius: 14px;
  --search-snippet-font-size-base: 15px;
  --search-snippet-line-height: 1.6;
  --search-snippet-font-weight-normal: 400;
  --search-snippet-font-weight-medium: 500;
  --search-snippet-font-weight-bold: 700;
}

.modal-note {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  color: var(--text);
  background: #f3f8fb;
  border-top: 1px solid var(--line);
}
.modal-note svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--blue); }
.modal-help { flex-basis: 100%; color: var(--muted); }
.modal-help a { color: var(--blue); font-weight: 500; text-decoration: none; }
.modal-help a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .modal-note { font-size: 12px; text-align: left; justify-content: flex-start; }
  .modal-note > span:not(.modal-help) { flex: 1; }
  dialog.chat-modal {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .modal-brand img, .modal-brand .divider { display: none; }
}
