/* Mimin Docs — shared styles for every documentation set.
   Visual language follows mimin.io: DM Sans, deep teal, soft teal tints, 4px buttons, 16px cards. */

:root {
  --teal: #125452;
  --teal-600: #1d716b;
  --teal-tint: #e7eeee;
  --teal-wash: #f4f8f8;
  --ink: #181818;
  --body: #292929;
  --muted: #5a6868;
  --line: #d9e2e2;
  --white: #fff;
  --aqua: #1b98a4;
  --amber: #f9a21e;
  --coral: #f2616d;
  --code-bg: #111b21;
  --code-head: #1a272f;
  --code-text: #e4ecef;
  --font: "DM Sans", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --header-h: 72px;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 5vw, 42px); }
h2 { font-size: clamp(24px, 3.4vw, 28px); margin-top: 56px; }
h3 { font-size: 22px; }
h4 { font-size: 16px; margin-top: 32px; }
p, ul, ol, dl { margin: 16px 0 0; }
ul, ol { padding-left: 22px; }
li + li { margin-top: 8px; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-600); }
img { max-width: 100%; height: auto; }
strong { font-weight: 600; color: var(--ink); }
q { font-style: italic; }

:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 4px; }

code { font-family: var(--mono); font-size: 0.875em; }
:not(pre) > code { background: var(--teal-tint); color: var(--teal); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }

.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 14px; }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal-600); }
.lead { font-size: 19px; line-height: 1.55; color: var(--body); max-width: 60ch; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--teal); color: var(--white); padding: 8px 16px; border-radius: 4px; }
.skip:focus { left: 8px; color: var(--white); }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border: 1px solid var(--teal); border-radius: 4px;
  background: var(--teal); color: var(--white); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--teal-600); border-color: var(--teal-600); color: var(--white); }
.btn.outline { background: transparent; color: var(--teal); }
.btn.outline:hover { background: var(--teal); color: var(--white); }
.btn.small { padding: 6px 20px; }

/* ------------------------------------------------------------ header */

.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { display: block; width: 119px; height: 40px; }
.brand-tag { padding: 2px 10px; border-radius: 999px; background: var(--teal-tint); color: var(--teal); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.top-nav { display: flex; gap: 24px; flex: 1; min-width: 0; }
.top-nav a { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; padding: 4px 0; border-bottom: 2px solid transparent; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--teal); border-bottom-color: var(--teal); }
.header-actions { display: flex; gap: 12px; flex: none; }
.menu-btn { display: none; width: 40px; height: 40px; padding: 10px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); cursor: pointer; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--teal); border-radius: 2px; }

/* ------------------------------------------------------------ layout */

.layout { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 56px; }
.sidebar { position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 32px 8px 32px 0; overscroll-behavior: contain; }
.nav-group + .nav-group { margin-top: 24px; }
.nav-title { margin: 0 0 6px; padding: 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li + li { margin-top: 2px; }
.sidebar a { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; color: var(--body); text-decoration: none; font-size: 15px; line-height: 1.35; }
.sidebar a:hover { background: var(--teal-wash); color: var(--teal); }
.sidebar a[aria-current] { background: var(--teal-tint); color: var(--teal); font-weight: 600; }
.sidebar-meta { margin: 28px 12px 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mini { flex: none; min-width: 42px; padding: 1px 0; border-radius: 4px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-align: center; letter-spacing: 0.02em; }

.content { min-width: 0; max-width: 860px; padding: 48px 0 96px; }
.doc-section + .doc-section, .endpoint { margin-top: 72px; }
.doc-section > h2:first-child { margin-top: 0; }
.band + .endpoint { margin-top: 40px; }
.endpoint + .endpoint { padding-top: 56px; border-top: 1px solid var(--line); margin-top: 56px; }
.anchor { color: inherit; text-decoration: none; }
.anchor:hover::after { content: " #"; color: var(--aqua); }

/* ------------------------------------------------------------ method colours */

.method, .mini { text-transform: uppercase; }
.method { display: inline-block; padding: 3px 10px; border-radius: 4px; font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.5; white-space: nowrap; }
.get { background: #dff2f4; color: #0c5f69; }
.post { background: #fdefd6; color: #7a4a00; }
.webhook { background: #fde4e7; color: #9d2633; }

/* ------------------------------------------------------------ overview blocks */

.cards { display: grid; gap: 16px; margin-top: 32px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 20px; border-radius: var(--radius); background: var(--teal-wash); border: 1px solid var(--teal-tint); }
.card h3 { font-size: 18px; color: var(--teal); }
.card p { margin-top: 6px; font-size: 15px; }

.checklist { counter-reset: check; list-style: none; padding: 0; }
.checklist li { position: relative; padding: 14px 16px 14px 56px; border: 1px solid var(--line); border-radius: 12px; }
.checklist li + li { margin-top: 10px; }
.checklist li::before { counter-increment: check; content: counter(check); position: absolute; left: 16px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-tint); color: var(--teal); font-weight: 600; font-size: 14px; display: grid; place-items: center; }

.flow { list-style: none; padding: 0; margin-top: 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: flow; }
.flow li { position: relative; margin: 0; padding: 18px 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.flow li::before { counter-increment: flow; content: counter(flow); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 10px; border-radius: 50%; background: var(--teal); color: var(--white); font-size: 14px; font-weight: 600; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -23px; top: 50%; transform: translateY(-50%); color: var(--teal-600); font-size: 18px; }
.flow li:nth-child(odd) { background: var(--teal-wash); }
.flow-who { display: block; font-weight: 600; color: var(--ink); }
.flow p { margin-top: 4px; font-size: 14.5px; line-height: 1.5; }

.steps { list-style: none; padding: 0; margin-top: 32px; counter-reset: step; }
.steps > li { position: relative; margin: 0; padding: 0 0 40px 60px; }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -4px; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: var(--white); font-size: 18px; font-weight: 600; display: grid; place-items: center; }
.steps > li::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--teal-tint); }
.steps > li:last-child { padding-bottom: 8px; }
.steps > li:last-child::after { display: none; }
.steps h3 { font-size: 20px; padding-top: 3px; }

.plain-steps li::marker { color: var(--teal); font-weight: 600; }

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li + li { margin-top: 12px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

.band { margin-top: 88px; padding: 32px; border-radius: var(--radius); background: var(--teal); color: #d5e5e4; }
.band h2 { margin: 0; color: var(--white); }
.band p { margin-top: 8px; }

.glossary { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0; border-top: 1px solid var(--line); }
.glossary dt, .glossary dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font-weight: 600; color: var(--ink); padding-right: 16px; }

/* ------------------------------------------------------------ endpoint */

.route { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--teal-wash); }
.route-url { flex: 1; min-width: 0; background: none; color: var(--ink); padding: 0; font-size: 14px; overflow-wrap: anywhere; }
.auth-line { padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.auth-line.needs { background: #fff6e6; }
.auth-line.open { background: #e6f5ee; }
.req, .opt { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.req { background: #fde4e7; color: #9d2633; }
.opt { background: var(--teal-tint); color: var(--muted); }

/* ------------------------------------------------------------ tables */

.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; }
th { background: var(--teal-wash); color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
tbody tr { border-top: 1px solid var(--line); }
td:first-child { white-space: nowrap; }
table.fields td:last-child, table.summary td:last-child { min-width: 260px; }
td:not(:last-child) code { white-space: nowrap; overflow-wrap: normal; }
.code-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.code-pill.ok { background: #dcf3e7; color: #17603c; }
.code-pill.err { background: #fde4e7; color: #9d2633; }

/* ------------------------------------------------------------ code */

.code { margin-top: 16px; border-radius: 12px; background: var(--code-bg); color: var(--code-text); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 8px 0 16px; background: var(--code-head); }
.code-title { font-size: 13px; font-weight: 500; color: #a9bac2; }
.tabs { display: flex; gap: 2px; margin-left: -8px; overflow-x: auto; }
.tab { padding: 12px 12px 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: #a9bac2; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--white); }
.tab[aria-selected="true"] { color: var(--white); border-bottom-color: var(--amber); }
.copy { flex: none; padding: 5px 12px; border: 1px solid #3a4a53; border-radius: 4px; background: transparent; color: #cdd9de; font: inherit; font-size: 13px; cursor: pointer; }
.copy:hover { background: #26343c; color: var(--white); }
.copy.light { border-color: var(--line); background: var(--white); color: var(--teal); }
.copy.light:hover { background: var(--teal-tint); color: var(--teal); }
.copy.done { border-color: #4fbf8b; color: #7fe0b0; }
.copy.light.done { border-color: var(--teal); color: var(--teal); }
pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; tab-size: 2; }
pre code { font-size: inherit; }
.t-str { color: #a5e3c8; }
.t-key { color: #8fd6e4; }
.t-num, .t-lit { color: #fbc777; }
.t-kw { color: #f7a3ab; }
.t-com { color: #8496a0; font-style: italic; }

/* ------------------------------------------------------------ callouts */

.callout { display: flex; gap: 14px; margin-top: 20px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--teal-tint); background: var(--teal-wash); font-size: 15px; }
.callout svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.callout p, .callout ul { margin-top: 4px; }
.callout .callout-title { margin: 0; font-weight: 600; color: var(--ink); }
.callout.tip { background: #fff8ea; border-color: #fbe3b5; }
.callout.tip svg { stroke: #a86a00; }
.callout.warning { background: #fef0f1; border-color: #f9cdd2; }
.callout.warning svg { stroke: #9d2633; }
.callout.security { background: var(--white); border-color: var(--teal); border-left-width: 4px; }

/* ------------------------------------------------------------ screenshots */

.shot { margin: 20px 0 0; }
.shot a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(18, 84, 82, 0.08); background: var(--white); cursor: zoom-in; }
.shot img { display: block; width: 100%; }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ home */

.hero { padding: 88px 24px 56px; text-align: center; background: radial-gradient(60% 100% at 50% 0%, #d7eaeb 0%, rgba(255, 255, 255, 0) 72%); }
.hero .lead { margin-left: auto; margin-right: auto; }
.hero .btn { margin-top: 8px; }
.home-products { background: var(--teal-tint); padding: 56px 24px 88px; }
.product-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.product-card { display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border-radius: var(--radius); background: var(--white); color: var(--body); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
a.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(18, 84, 82, 0.14); color: var(--body); }
.product-card h2 { margin-top: 16px; font-size: 22px; }
.product-card p { flex: 1; margin-top: 8px; }
.product-card.soon { background: transparent; border: 1px dashed #a9bfbe; }
.pill { padding: 2px 12px; border-radius: 999px; background: var(--teal-tint); color: var(--muted); font-size: 13px; font-weight: 600; }
.pill.live { background: #dcf3e7; color: #17603c; }
.card-link { margin-top: 20px; color: var(--teal); font-weight: 600; }

/* ------------------------------------------------------------ footer */

.site-footer { background: var(--teal); color: #d5e5e4; padding: 56px 24px 24px; font-size: 15px; }
.footer-inner { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; }
.footer-company { flex: 1 1 320px; max-width: 440px; }
.footer-company img { display: block; width: 119px; height: 40px; }
.footer-heading { margin: 0 0 12px; color: var(--white); font-size: 16px; font-weight: 600; }
.site-footer .footer-companies { display: flex; flex-wrap: wrap; margin-top: 20px; color: var(--white); font-weight: 500; }
.site-footer .footer-companies li { margin: 0; white-space: nowrap; }
.site-footer .footer-companies li + li::before { content: "|"; margin: 0 12px; color: rgba(255, 255, 255, 0.45); font-weight: 400; }
.footer-company .footer-heading { margin-top: 28px; }
.site-footer .footer-social { display: flex; gap: 8px; }
.site-footer .footer-social li { margin: 0; }
.footer-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 4px; background: var(--teal-tint); transition: background-color 0.15s; }
.footer-social a:hover { background: var(--white); }
.footer-social svg { width: 22px; height: 22px; fill: none; stroke: var(--teal); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer-links { display: flex; flex-wrap: wrap; gap: 32px 72px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 10px; }
.site-footer li.soon span { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 12px; white-space: nowrap; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.copyright { max-width: 1320px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.18); color: var(--white); font-size: 14px; font-weight: 600; }

.scrim { position: fixed; inset: var(--header-h) 0 0; z-index: 19; background: rgba(17, 27, 33, 0.45); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: flex; }
  .top-nav { display: none; }
  .header-inner { gap: 16px; }
  .header-actions { margin-left: auto; }
  .sidebar { position: fixed; z-index: 20; top: var(--header-h); left: 0; bottom: 0; width: min(300px, 86vw); height: auto; padding: 24px 16px; background: var(--white); border-right: 1px solid var(--line); transform: translateX(-100%); visibility: hidden; transition: transform 0.2s, visibility 0.2s; }
  .sidebar.open { transform: none; visibility: visible; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(2)::after { display: none; }
}

@media (max-width: 640px) {
  .header-inner, .layout { padding-left: 16px; padding-right: 16px; }
  .header-actions .outline { display: none; }
  .content { padding-top: 32px; }
  .cards.three, .flow { grid-template-columns: minmax(0, 1fr); }
  .flow { gap: 30px; }
  .flow li:not(:last-child)::after { content: "↓"; display: block; right: auto; left: 50%; top: auto; bottom: -29px; transform: translateX(-50%); }
  .steps > li { padding-left: 48px; }
  .steps > li::before { width: 32px; height: 32px; font-size: 15px; top: -2px; }
  .steps > li::after { left: 15px; top: 36px; }
  .route { flex-wrap: wrap; }
  .route-url { order: 3; flex-basis: 100%; }
  .route .copy { margin-left: auto; }
  table { min-width: 580px; }
  .glossary { grid-template-columns: minmax(0, 1fr); }
  .glossary dt { border-bottom: 0; padding-bottom: 0; }
  .glossary dd { padding-top: 4px; }
  .band { padding: 24px 20px; }
  .hero { padding-top: 56px; }
  .site-footer .footer-companies { flex-direction: column; gap: 4px; }
  .site-footer .footer-companies li + li::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .sidebar, .site-footer, .copy, .scrim { display: none !important; }
  .layout { display: block; }
  .code { border: 1px solid #999; background: #fff; color: #000; }
  .code [hidden] { display: none; }
}
