/* Finnibook legal/support pages — shared visual system */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --background: #f7f8fb;
  --surface: #ffffff;
  --text: #08164f;
  --text-soft: #5f6885;
  --line: #dfe5ef;
  --accent: #1479e9;
  --accent-hover: #0c64c5;
  --accent-deep: #07184f;
  --accent-soft: #edf5ff;
  --display: 'Manrope', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --shadow-nav: 0 16px 50px rgba(7, 24, 79, 0.11);
  --shadow-card: 0 28px 80px rgba(7, 24, 79, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(20, 121, 233, 0.08), transparent 28rem),
    var(--background);
  color: var(--text);
  font-family: var(--display);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font: 700 15px/1 var(--display);
  white-space: nowrap;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease,
    border-color 180ms ease, box-shadow 180ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 121, 233, 0.23);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(20, 121, 233, 0.3);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(20, 121, 233, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(20, 121, 233, 0.38);
  outline-offset: 3px;
}

nav {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  width: min(calc(100% - 32px), 1200px);
  border: 1px solid rgba(223, 229, 239, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(18px) saturate(140%);
  transform: translateX(-50%);
  transition: top 240ms ease, width 240ms ease, box-shadow 240ms ease;
}

nav.scrolled {
  top: 8px;
  width: min(calc(100% - 24px), 1120px);
  box-shadow: 0 18px 58px rgba(7, 24, 79, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 18px 0 24px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordmark {
  color: var(--accent-deep);
  font: 800 25px/1 var(--display);
  letter-spacing: -0.055em;
}

.dot,
.wordmark .dot,
.fm .dot {
  color: var(--accent);
}

.doc-page {
  min-height: 100vh;
  padding: 118px 16px 80px;
}

.doc-wrap {
  position: relative;
  max-width: 940px;
  margin: 0 auto;
  overflow: hidden;
  padding: 70px 76px 82px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.doc-wrap::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--accent), #69aff8);
  content: '';
}

.concept-notice {
  margin-bottom: 40px;
  padding: 16px 18px;
  border: 1px solid rgba(20, 121, 233, 0.25);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font: 500 13px/1.6 var(--mono);
}

.doc-wrap h1 {
  max-width: 760px;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font: 800 clamp(36px, 5vw, 58px)/1.03 var(--display);
  letter-spacing: -0.055em;
}

.doc-wrap h2 {
  margin-top: 56px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-deep);
  font: 800 clamp(22px, 2.5vw, 27px)/1.2 var(--display);
  letter-spacing: -0.035em;
}

.doc-wrap h3 {
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font: 750 18px/1.35 var(--display);
  letter-spacing: -0.02em;
}

.doc-wrap p,
.doc-wrap li {
  color: #303b63;
  font-size: 16px;
  line-height: 1.78;
}

.doc-wrap p {
  margin-bottom: 17px;
}

.doc-wrap ul,
.doc-wrap ol {
  margin-bottom: 18px;
  padding-left: 24px;
}

.doc-wrap li {
  margin-bottom: 7px;
  padding-left: 3px;
}

.doc-wrap li::marker {
  color: var(--accent);
}

.doc-wrap strong {
  color: var(--accent-deep);
  font-weight: 750;
}

.doc-wrap em {
  font-style: italic;
}

.doc-wrap hr {
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc-meta {
  display: block;
  margin-bottom: 42px;
  color: var(--text-soft);
  font: 500 12px/1.5 var(--mono);
  letter-spacing: 0.025em;
}

.table-wrap {
  margin: 26px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

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

.table-wrap th {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font: 750 13px/1.4 var(--display);
  text-align: left;
}

.table-wrap td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  color: #303b63;
  line-height: 1.55;
  vertical-align: top;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.faq-group {
  margin-bottom: 46px;
}

.faq-group h2 {
  margin-top: 0;
}

details {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

details:hover,
details[open] {
  border-color: rgba(20, 121, 233, 0.4);
  box-shadow: 0 10px 28px rgba(7, 24, 79, 0.06);
}

summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px;
  color: var(--accent-deep);
  cursor: pointer;
  font: 750 15px/1.45 var(--display);
  list-style: none;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  content: '+';
  font: 600 19px/1 var(--display);
}

details[open] summary::after {
  content: '−';
}

.faq-answer {
  padding: 0 20px 19px;
  color: #303b63;
  font-size: 15px;
  line-height: 1.75;
}

.faq-answer p {
  margin-bottom: 0;
  font-size: 15px;
}

.site-footer {
  display: grid;
  padding: 80px max(48px, calc((100% - 1200px) / 2));
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  color: rgba(255, 255, 255, 0.72);
  background: #040e34;
}

.site-footer > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.site-footer .brand {
  color: #ffffff;
  font: 800 25px/1 var(--display);
  letter-spacing: -0.055em;
}

.site-footer .brand span {
  color: var(--accent);
}

.site-footer strong {
  margin-bottom: 8px;
  color: #ffffff;
}

.site-footer a:not(.brand) {
  font-size: 0.86rem;
  transition: color 160ms ease;
}

.site-footer a:not(.brand):hover {
  color: #ffffff;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.86rem;
}

.site-footer small {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.42);
}

.site-footer .foot-biz-inline {
  grid-column: 1 / -1;
  margin: 32px 0 0;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.5);
  font: 400 11.5px/1.75 var(--mono);
  letter-spacing: 0.01em;
}

.site-footer .foot-biz-inline a {
  border-bottom: 1px dotted rgba(255, 255, 255, 0.32);
  color: inherit;
  font-size: inherit;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 88px;
  }

  nav,
  nav.scrolled {
    top: 8px;
    width: calc(100% - 16px);
    border-radius: 20px;
  }

  .nav-inner {
    height: 64px;
    padding: 0 10px 0 18px;
  }

  .wordmark {
    font-size: 21px;
  }

  .nav-inner .btn-ghost {
    display: none;
  }

  .nav-inner .btn-primary {
    min-height: 42px;
    padding: 10px 15px !important;
    border-radius: 13px;
    font-size: 13px !important;
  }

  .doc-page {
    padding: 88px 8px 42px;
  }

  .doc-wrap {
    padding: 46px 22px 58px;
    border-radius: 26px;
  }

  .doc-wrap::before {
    height: 8px;
  }

  .doc-wrap h1 {
    font-size: clamp(32px, 10vw, 43px);
    line-height: 1.08;
  }

  .doc-wrap h2 {
    margin-top: 44px;
    font-size: 22px;
  }

  .doc-wrap p,
  .doc-wrap li {
    font-size: 15px;
  }

  .doc-meta {
    margin-bottom: 34px;
  }

  .table-wrap {
    margin-right: -8px;
    margin-left: -8px;
    border-radius: 14px;
  }

  summary {
    padding: 17px 16px;
  }

  .faq-answer {
    padding: 0 16px 17px;
  }

  .site-footer {
    padding: 64px 24px;
    grid-template-columns: 1fr 1fr;
  }

  .site-footer > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
