@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* The same values as apps/app/src/styles/globals.css in jobbit-web. */
:root {
  color-scheme: light;

  --background: 60 17% 97.65%;
  --foreground: 0 0% 0%;
  --card: 0 0% 100%;
  --muted: 60 9.1% 93.5%;
  --muted-foreground: 230 2.4% 50.6%;
  --border: 60 8.5% 88.4%;
  --border-strong: 60 8.7% 82%;
  --chrome: 60 12% 95.1%;
  --hover: 60 8.7% 91%;
  --subtle-foreground: 0 0% 60%;
  --strong-foreground: 0 0% 40%;
  --body: 0 0% 14%;

  --primary: #553c9a;
  --primary-tint: #f2e3ff;
  --success: #16a34a;
  --success-tint: #dcfce7;

  --notice-bg: #fff8e6;
  --notice-border: #f1d58e;
  --notice-text: #5b4300;

  --toggle-bg: #f0efea;
  --toggle-border: rgba(0, 0, 0, 0.07);
  --toggle-inset: inset 0 1px 2px rgba(0, 0, 0, 0.025);
  --toggle-icon: #77797e;
  --toggle-icon-hover: #000;
  --toggle-active-bg: #fff;
  --toggle-active-shadow: 0 1px 4px rgba(20, 18, 14, 0.09);
  --logo-filter: none;

  --radius: 12px;
  --topbar: 56px;
}

/* The dark tokens are listed twice: once for an explicit choice in the
   toggle, once for the system setting when nothing was chosen. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --background: 210 8% 5.1%;
  --foreground: 0 0% 100%;
  --card: 0 0% 9%;
  --muted: 0 0% 14.1%;
  --muted-foreground: 0 0% 62.7%;
  --border: 0 0% 16.5%;
  --border-strong: 0 0% 22.7%;
  --chrome: 0 0% 7.5%;
  --hover: 0 0% 14.1%;
  --subtle-foreground: 0 0% 33.3%;
  --strong-foreground: 0 0% 53.3%;
  --body: 0 0% 84%;

  --primary: #b9a3f2;
  --primary-tint: rgba(85, 60, 154, 0.32);
  --success: #4ade80;
  --success-tint: rgba(22, 163, 74, 0.2);

  --notice-bg: rgba(234, 179, 8, 0.08);
  --notice-border: rgba(234, 179, 8, 0.3);
  --notice-text: #f3d68a;

  --toggle-bg: rgba(255, 255, 255, 0.055);
  --toggle-border: rgba(255, 255, 255, 0.08);
  --toggle-inset: none;
  --toggle-icon: #999b9f;
  --toggle-icon-hover: #fff;
  --toggle-active-bg: rgba(255, 255, 255, 0.12);
  --toggle-active-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  --logo-filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --background: 210 8% 5.1%;
    --foreground: 0 0% 100%;
    --card: 0 0% 9%;
    --muted: 0 0% 14.1%;
    --muted-foreground: 0 0% 62.7%;
    --border: 0 0% 16.5%;
    --border-strong: 0 0% 22.7%;
    --chrome: 0 0% 7.5%;
    --hover: 0 0% 14.1%;
    --subtle-foreground: 0 0% 33.3%;
    --strong-foreground: 0 0% 53.3%;
    --body: 0 0% 84%;

    --primary: #b9a3f2;
    --primary-tint: rgba(85, 60, 154, 0.32);
    --success: #4ade80;
    --success-tint: rgba(22, 163, 74, 0.2);

    --notice-bg: rgba(234, 179, 8, 0.08);
    --notice-border: rgba(234, 179, 8, 0.3);
    --notice-text: #f3d68a;

    --toggle-bg: rgba(255, 255, 255, 0.055);
    --toggle-border: rgba(255, 255, 255, 0.08);
    --toggle-inset: none;
    --toggle-icon: #999b9f;
    --toggle-icon-hover: #fff;
    --toggle-active-bg: rgba(255, 255, 255, 0.12);
    --toggle-active-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
    --logo-filter: brightness(0) invert(1);
  }
}

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

html {
  background: hsl(var(--background));
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar) + 24px);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  font-feature-settings:
    "rlig" 1,
    "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #000;
  color: #fff;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar);
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.topbar-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.brand img {
  display: block;
  width: 72px;
  height: auto;
  filter: var(--logo-filter);
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: hsl(var(--border-strong));
}

.brand-title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.topbar-spacer {
  flex: 1;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.topbar-link:hover {
  background: hsl(var(--hover));
  color: hsl(var(--foreground));
}

.topbar-link svg {
  width: 14px;
  height: 14px;
}

.theme-toggle {
  display: none;
  align-items: center;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--toggle-border);
  border-radius: 16px;
  background: var(--toggle-bg);
  box-shadow: var(--toggle-inset);
}

.js .theme-toggle {
  display: inline-flex;
}

.theme-toggle button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--toggle-icon);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.theme-toggle button:hover {
  color: var(--toggle-icon-hover);
}

.theme-toggle .icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

:root:not([data-theme]) .theme-toggle [data-theme-value="system"],
:root[data-theme="light"] .theme-toggle [data-theme-value="light"],
:root[data-theme="dark"] .theme-toggle [data-theme-value="dark"] {
  background: var(--toggle-active-bg);
  color: var(--toggle-icon-hover);
  box-shadow: var(--toggle-active-shadow);
}

/* Icons */

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Index pages */

.page {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 16px 72px;
}

.hero {
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: hsl(var(--strong-foreground));
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.hero h1,
.doc-title {
  font-size: 40px;
  line-height: 44px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
}

.hero p {
  max-width: 560px;
  margin-top: 12px;
  font-size: 17px;
  line-height: 26px;
  color: hsl(var(--muted-foreground));
}

.group + .group {
  margin-top: 40px;
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.group-head h2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}

.group-head span {
  font-size: 13px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
}

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

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card));
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.doc-card:hover {
  border-color: hsl(var(--border-strong));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.doc-card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.doc-card-icon.terms {
  background: var(--primary-tint);
  color: var(--primary);
}

.doc-card-icon.privacy {
  background: var(--success-tint);
  color: var(--success);
}

.doc-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.doc-card-title {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.doc-card-desc {
  font-size: 14px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
}

.doc-card-arrow {
  color: hsl(var(--subtle-foreground));
  transition:
    transform 0.15s ease,
    color 0.15s ease;
}

.doc-card:hover .doc-card-arrow {
  color: hsl(var(--foreground));
  transform: translateX(2px);
}

/* Document pages */

.shell {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.toc {
  display: none;
}

.doc {
  width: 100%;
  max-width: 760px;
  min-width: 0;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

.back:hover {
  color: hsl(var(--foreground));
}

.back .icon {
  width: 16px;
  height: 16px;
}

.doc-head {
  margin-bottom: 32px;
}

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

.doc-meta span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: hsl(var(--muted));
  font-size: 13px;
  line-height: 20px;
  color: hsl(var(--strong-foreground));
}

.operator {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card));
}

.operator-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: hsl(var(--muted));
  color: hsl(var(--strong-foreground));
  flex-shrink: 0;
}

.operator-label {
  font-size: 10px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.operator-body {
  margin-top: 2px;
  font-size: 14px;
  line-height: 22px;
  color: hsl(var(--strong-foreground));
}

.operator-body strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

.toc-mobile {
  margin-bottom: 32px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card));
}

.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-mobile summary .icon {
  width: 16px;
  height: 16px;
  color: hsl(var(--muted-foreground));
  transition: transform 0.2s ease;
}

.toc-mobile[open] summary .icon {
  transform: rotate(180deg);
}

.toc-mobile .toc-list {
  max-height: 55vh;
  overflow-y: auto;
  padding: 0 8px 8px;
  border-top: 1px solid hsl(var(--border));
  padding-top: 8px;
}

.toc-list {
  list-style: none;
}

.toc-list a {
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.toc-list a:hover {
  background: hsl(var(--hover));
  color: hsl(var(--foreground));
}

.toc-list a.active {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-weight: 500;
}

.toc-num {
  min-width: 20px;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--subtle-foreground));
}

.toc-list a.active .toc-num {
  color: hsl(var(--muted-foreground));
}

/* Legal text */

.doc-body {
  font-size: 16px;
  line-height: 28px;
  color: hsl(var(--body));
}

.doc-body > p:first-child,
.intro-text p {
  font-size: 17px;
  line-height: 28px;
  color: hsl(var(--strong-foreground));
}

.intro-text {
  margin-bottom: 8px;
}

.section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid hsl(var(--border));
}

.doc-body > .section:first-child,
.doc-body > p:first-child + .section,
.intro-text + .section {
  margin-top: 32px;
}

.doc-body h2 {
  font-size: 22px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: hsl(var(--foreground));
  margin-bottom: 16px;
}

.doc-body h2.caps {
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.04em;
}

.doc-body h3 {
  margin: 28px 0 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.doc-body h2 + h3 {
  margin-top: 8px;
}

.doc-body p {
  margin-bottom: 14px;
}

.doc-body p:last-child {
  margin-bottom: 0;
}

.doc-body strong {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc-body li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.doc-body li::marker {
  color: hsl(var(--subtle-foreground));
}

.table-wrap {
  margin: 20px 0 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--card));
  overflow: hidden;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 22px;
}

.table-wrap th {
  padding: 10px 16px;
  background: hsl(var(--chrome));
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.table-wrap td {
  padding: 12px 16px;
  vertical-align: top;
  border-top: 1px solid hsl(var(--border));
}

.table-wrap tbody tr:first-child td {
  border-top: 0;
}

.table-wrap td:first-child {
  width: 32%;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.policy-header {
  margin-bottom: 24px;
  padding: 20px 24px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background: hsl(var(--chrome));
}

.doc-body .policy-header h2 {
  margin-bottom: 4px;
}

.doc-body .policy-header p {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
}

.important-notice {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--notice-border);
  border-radius: 12px;
  background: var(--notice-bg);
}

.doc-body .important-notice p,
.doc-body .important-notice strong {
  color: var(--notice-text);
}

.doc-body .important-notice p {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 24px;
}

.doc-body .important-notice p:last-child {
  margin-bottom: 0;
}

/* Footer */

.footer {
  border-top: 1px solid hsl(var(--border));
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
}

.footer-inner strong {
  font-weight: 500;
  color: hsl(var(--strong-foreground));
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: hsl(var(--foreground));
}

@media (min-width: 640px) {
  .page {
    padding: 72px 24px 96px;
  }

  .topbar-inner,
  .footer-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .shell {
    padding: 48px 24px 96px;
  }
}

@media (min-width: 1024px) {
  .shell {
    grid-template-columns: 248px minmax(0, 760px);
    justify-content: center;
    gap: 64px;
  }

  .toc {
    display: block;
    position: sticky;
    top: calc(var(--topbar) + 32px);
    align-self: start;
    max-height: calc(100vh - var(--topbar) - 64px);
    overflow-y: auto;
    padding-top: 44px;
    scrollbar-width: none;
  }

  .toc::-webkit-scrollbar {
    display: none;
  }

  .toc-title {
    padding: 0 12px 8px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
  }

  .toc-mobile {
    display: none;
  }
}

@media (max-width: 419px) {
  .topbar-link {
    display: none;
  }
}

@media (max-width: 639px) {
  .hero h1,
  .doc-title {
    font-size: 30px;
    line-height: 36px;
  }

  .hero p {
    font-size: 16px;
    line-height: 24px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-body {
    font-size: 15px;
    line-height: 26px;
  }

  .doc-body > p:first-child,
  .intro-text p {
    font-size: 16px;
    line-height: 26px;
  }

  .doc-body h2 {
    font-size: 20px;
    line-height: 28px;
  }

  .section {
    margin-top: 32px;
    padding-top: 32px;
  }

  .policy-header {
    padding: 16px;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tr {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid hsl(var(--border));
  }

  .table-wrap tbody tr:first-child {
    border-top: 0;
  }

  .table-wrap td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  .table-wrap td:first-child {
    width: auto;
  }

  .table-wrap td + td {
    margin-top: 4px;
    color: hsl(var(--strong-foreground));
  }

  .table-wrap td + td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: hsl(var(--subtle-foreground));
  }

  .table-wrap table.two-col td + td::before {
    display: none;
  }
}

@media print {
  .topbar,
  .toc,
  .toc-mobile,
  .back,
  .footer {
    display: none;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  .shell {
    display: block;
    padding: 0;
  }

  .doc {
    max-width: none;
  }

  .doc-body {
    color: #000;
    font-size: 11pt;
    line-height: 1.55;
  }

  .section {
    break-inside: auto;
  }

  .doc-body h2,
  .doc-body h3 {
    break-after: avoid;
  }

  .table-wrap {
    border-radius: 0;
    break-inside: avoid;
  }
}
