/* Copyright © 2026 Applied Software Group LLC. All rights reserved. */

/* ==========================================================================
   Design tokens — ported verbatim from agent-platform-portal/src/styles.css
   ========================================================================== */

:root {
  --color-navy: #042C53;
  --color-blue: #378ADD;
  --color-blue-mid: #185FA5;
  --color-blue-light: #E6F1FB;
  --color-blue-pale: #B5D4F4;
  --color-text-secondary: #555555;
  --color-border: rgba(4, 44, 83, 0.15);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 2px rgba(4, 44, 83, 0.04), 0 4px 12px rgba(4, 44, 83, 0.06);
  --status-success-bg: #EAF3DE;
  --status-success-text: #3B6D11;
  --status-warning-bg: #FAEEDA;
  --status-warning-text: #854F0B;
  --status-neutral-bg: #F1EFE8;
  --status-neutral-text: #5F5E5A;
  --status-danger-bg: #FCEBEB;
  --status-danger-text: #A32D2D;
  --status-info-bg: #E6F1FB;
  --status-info-text: #185FA5;
  --header-height: 56px;
}

/* ==========================================================================
   Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #f5f7fa;
  color: var(--color-navy);
  font-size: 14px;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

/* Keyboard users must be able to see where they are. */
:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* ==========================================================================
   Skip link — the first focusable element on every page
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--color-navy);
  color: #ffffff;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 14px;
  font-weight: 500;
}

.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Header and primary navigation
   ========================================================================== */

.pub-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--color-navy);
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: var(--color-navy);
  opacity: 0.7;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--color-navy);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--color-blue-light);
}

.nav-links a.active {
  color: var(--color-blue-mid);
}

.nav-register {
  border: 1px solid var(--color-navy) !important;
  border-radius: 20px !important;
  padding: 6px 16px !important;
}

.nav-register:hover {
  background: var(--color-blue-light) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-hamburger:hover {
  background: var(--color-blue-light);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-navy);
  border-radius: 1px;
}

/* ==========================================================================
   Mobile menu
   ========================================================================== */

.mobile-backdrop {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 90;
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 16px rgba(4, 44, 83, 0.12);
  display: flex;
  flex-direction: column;
  padding: 8px;
  z-index: 95;
}

.mobile-menu a {
  color: var(--color-navy);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 12px;
  border-radius: var(--radius-sm);
  width: 100%;
}

.mobile-menu a:hover {
  background: var(--color-blue-light);
}

.mobile-menu a.active {
  color: var(--color-blue-mid);
}

.mobile-menu a.nav-register {
  text-align: center;
  margin-top: 4px;
}

/* Closed until site.js sets data-menu-open on the body. */
body:not([data-menu-open="true"]) .mobile-backdrop,
body:not([data-menu-open="true"]) .mobile-menu {
  display: none;
}

/* ==========================================================================
   Main content and footer
   ========================================================================== */

.pub-content {
  flex: 1 0 auto;
  padding-top: var(--header-height);
}

/* The footer: a four-column grid (brand, Product, Company, Contact) that
   becomes two columns at 768px and one at 600px, and a copyright line under
   a thin rule. The social row keeps the width of five icons so nothing moves
   when a network is added. */
.pub-footer {
  background: var(--color-navy);
  color: #ffffff;
  padding: 40px 24px 24px;
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo .logo-name,
.footer-logo .logo-sub {
  color: #ffffff;
}

.footer-tagline {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  min-width: 148px;
  min-height: 20px;
}

.footer-social a {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-social a:hover {
  color: #ffffff;
}

.footer-heading {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin: 0 0 6px;
  font-size: 13px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 28px;
  padding-top: 16px;
  text-align: center;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}

.footer-copy a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Shared component primitives
   Only the four the public pages actually use are ported. The admin
   primitives — tables, tabs, pills, avatars — stay in the portal.
   ========================================================================== */

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin: 0;
  font-size: 15px;
  color: var(--color-navy);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background: var(--color-navy);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-blue-mid);
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-blue-light);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--color-navy);
}

.field > span {
  color: var(--color-text-secondary);
}

.field input,
.field select,
.field textarea {
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--color-navy);
  outline: none;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.15);
}

/* A field's error, on the contact and registration forms: unmistakably an
   error, never a grey note. The validation tag helper leaves the span empty
   while the field is fine, and marks the faulty control itself. The second
   selector outranks ".field > span", which would otherwise grey the text. */
.field-error,
.field > .field-error {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #A32D2D;
  background: #fdecea;
  border-left: 3px solid #A32D2D;
  border-radius: 4px;
}

.field-error:empty { display: none; }

/* Input widths follow what is typed in them, not the card: about 20, 40 or
   60 characters. The class goes on the input, or on the .pw-wrap around a
   password input. */
.field .input-20,
.field .input-40,
.field .input-60 {
  align-self: flex-start;
  max-width: 100%;
}

.field .input-20 { width: calc(20ch + 22px); }
.field .input-40 { width: calc(40ch + 22px); }
.field .input-60 { width: calc(60ch + 22px); }

.field input.input-validation-error,
.field select.input-validation-error,
.field textarea.input-validation-error {
  border-color: #A32D2D;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ==========================================================================
   Prose pages — the legal pages render HTML fetched from the settings API,
   so these rules style elements this project does not author.
   ========================================================================== */

.prose-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.prose-page h1 {
  margin: 0 0 32px;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-navy);
}

.prose-state {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.prose-state a { color: var(--color-blue); }

.prose-content section { margin-bottom: 36px; }

.prose-content h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
}

.prose-content h3 {
  margin: 18px 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy);
}

.prose-content p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.prose-content ul,
.prose-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.prose-content li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.prose-content a { color: var(--color-blue); }
.prose-content a:hover { text-decoration: underline; }

.prose-content strong {
  color: var(--color-navy);
  font-weight: 600;
}

/* ==========================================================================
   Blog
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.blog-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: start;
}

.blog-head { margin-bottom: 24px; }

.blog-page h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-navy);
}

.blog-intro {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.blog-search {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.blog-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-navy);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
}

.blog-search input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.15);
}

.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.blog-item {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
}

.blog-item:last-child { border-bottom: none; padding-bottom: 0; }

.blog-item h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.blog-item h2 a {
  color: var(--color-navy);
  text-decoration: none;
}

.blog-item h2 a:hover { color: var(--color-blue-mid); text-decoration: underline; }

.blog-meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.blog-excerpt {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.blog-empty {
  margin: 0;
  font-size: 15px;
  color: var(--color-text-secondary);
}

.blog-paging {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.blog-paging-position {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.blog-breadcrumb {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.blog-breadcrumb a { color: var(--color-blue-mid); }
.blog-breadcrumb a:hover { text-decoration: underline; }

.blog-body { margin-top: 8px; }

.blog-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.blog-author {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.blog-author p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.blog-author strong { color: var(--color-navy); }

.blog-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.blog-side-block h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
}

/* A real bulleted list, by the owner's decision of 2026-09-14. Not a flex column: flex
   items are blockified and lose their list markers. */
.blog-side-block ul {
  list-style: disc;
  margin: 0;
  padding: 0 0 0 18px;
}

.blog-side-block li + li {
  margin-top: 8px;
}

.blog-side-block li::marker {
  color: var(--color-text-secondary);
}

.blog-side-block a {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-navy);
}

.blog-side-block a:hover { color: var(--color-blue-mid); text-decoration: underline; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .pub-nav { padding: 0 16px; gap: 8px; }
  .nav-links { gap: 2px; }
  .nav-links a { font-size: 13px; padding: 6px 8px; }
  .card { padding: 16px; }
  .blog-page { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (min-width: 601px) {
  .mobile-backdrop,
  .mobile-menu { display: none !important; }
}

/* The one-line trial note under the "Get Started Free" button in the home page hero. */
.cta-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

/* The free-trial callout: the "14 days free" badge and the trial terms, the same block the
   customer portal shows on its dashboard. Every other page states the trial with it. */
.trial-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #e6f4ea;
  border: 1px solid #c0dd97;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
}

.trial-badge {
  background: #1d6b3a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.trial-text {
  font-size: 14px;
  line-height: 1.5;
  color: #173404;
}

@media (max-width: 480px) {
  .trial-callout {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
