:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172b44;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --brand-primary: #1557a0;
  --ink: #17324f;
  --muted: #64748b;
  --line: #e5eaf2;
  --soft: #f6f8fc;
  --code: #111b2e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

.top {
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #fffffff2;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 760; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark-image { display: block; width: 32px; height: 32px; background: linear-gradient(145deg, #103d70, #1557a0 55%, #68a9ef); -webkit-mask: url("/assets/edpay-mark.webp") center / contain no-repeat; mask: url("/assets/edpay-mark.webp") center / contain no-repeat; mask-mode: alpha; }
.brand-name { color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.055em; }
.brand-docs { color: #8492a4; font-weight: 500; }
.toplinks { display: flex; align-items: center; gap: 22px; font-size: 13px; font-weight: 620; color: #53657a; }
.toplinks a:hover, .side a:hover { color: var(--brand-primary); }
.search { margin-left: auto; position: relative; }
.search input { width: min(285px, 28vw); height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdff; padding: 0 12px 0 34px; font-size: 12px; outline: none; }
.search input:focus { border-color: #78a8e2; box-shadow: 0 0 0 3px #e5effc; }
.search-icon { position: absolute; left: 12px; top: 8px; color: #718096; font-size: 14px; pointer-events: none; }
.search-results { position: absolute; top: 44px; right: 0; z-index: 50; display: none; width: min(440px, 88vw); max-height: min(70vh, 500px); overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 18px 55px #142f2920; }
.search-results.open { display: block; }
.search-result { display: block; padding: 11px 12px; border-radius: 8px; }
.search-result:hover, .search-result:focus-visible { background: var(--soft); outline: none; }
.search-result strong { display: block; color: var(--ink); font-size: 13px; }
.search-result small { display: block; margin-top: 3px; color: #718096; font-size: 11px; line-height: 1.45; }
.search-empty { padding: 13px; color: #718096; font-size: 12px; }
.version { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 11px; font-weight: 700; color: #586981; background: #fff; }
.mobile-menu { display: none; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 7px 10px; color: #53657a; }

.layout { display: grid; grid-template-columns: 252px minmax(0, 790px) 190px; gap: 48px; max-width: 1420px; margin: 0 auto; padding: 0 28px; }
.side { position: sticky; top: 68px; height: calc(100vh - 68px); overflow: auto; padding: 32px 8px 40px 0; border-right: 1px solid var(--line); }
.sidegroup { margin-bottom: 25px; }
.sidehead { padding: 0 12px 9px; color: #819088; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 760; }
.side a { display: block; padding: 8px 12px; border-radius: 7px; color: #586981; font-size: 13px; }
.side a.active { background: #eaf5ef; color: var(--brand-primary); font-weight: 680; }
main { min-width: 0; padding: 48px 0 90px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #7b8982; }
.crumb a:hover { color: var(--brand-primary); }
.crumb b { color: var(--brand-primary); font-weight: 650; }
.eyebrow { margin: 25px 0 10px; color: var(--brand-primary); font-size: 11px; font-weight: 760; text-transform: uppercase; letter-spacing: .13em; }
h1 { margin: 0; color: #183d31; font-size: 46px; line-height: 1.08; letter-spacing: -.055em; font-weight: 690; }
h2 { margin: 48px 0 13px; padding-top: 7px; color: #1b3a30; font-size: 26px; letter-spacing: -.035em; }
h3 { margin: 27px 0 10px; font-size: 17px; letter-spacing: -.02em; }
.lead { max-width: 740px; margin: 18px 0 0; color: #586981; font-size: 17px; line-height: 1.75; }
.body { color: #586981; font-size: 14px; line-height: 1.8; }
.steps { display: grid; gap: 10px; padding-left: 22px; color: #586981; font-size: 14px; line-height: 1.75; }
.muted { color: #77857e; }
.notice { margin: 25px 0; padding: 16px 18px; border: 1px solid #f0d9a5; border-radius: 10px; background: #fffbf1; color: #614c20; font-size: 13px; line-height: 1.65; }
.notice strong { color: #493911; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.card { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 11px; transition: .15s; }
.card:hover { border-color: #9bbce8; box-shadow: 0 8px 22px #17324f10; transform: translateY(-1px); }
.card small { color: var(--brand-primary); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.card strong { display: block; margin: 8px 0 5px; font-size: 15px; }
.card span { color: #6d7d75; font-size: 12px; line-height: 1.6; }
.base { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 25px 0; padding: 15px 17px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdff; }
.base label { display: block; margin-bottom: 5px; color: #84928b; font-size: 10px; font-weight: 740; text-transform: uppercase; letter-spacing: .1em; }
.base code { font-size: 12px; color: #274365; overflow-wrap: anywhere; }
.copy { border: 1px solid #dbe5f0; border-radius: 7px; padding: 7px 10px; background: white; color: #315274; font-size: 11px; cursor: pointer; }
.copy:hover { border-color: #87ade0; }
.endpoint { margin: 32px 0 12px; display: flex; align-items: center; gap: 10px; }
.method { display: inline-block; border-radius: 5px; padding: 5px 8px; font: 760 10px ui-monospace, monospace; letter-spacing: .05em; }
.get { background: #e5f3ec; color: #08744f; }
.post { background: #e9effc; color: #355da7; }
.patch { background: #fff1d9; color: #946111; }
.path { font: 600 13px ui-monospace, SFMono-Regular, monospace; color: #263c33; }
.code { position: relative; margin: 15px 0 20px; border-radius: 11px; background: var(--code); color: #e1ebe6; overflow: auto; }
.code pre { margin: 0; padding: 20px 22px; font: 12px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; tab-size: 2; }
.code .copy { position: absolute; top: 10px; right: 10px; border-color: #3a4b45; background: #172722; color: #cde3d7; }
.inline { padding: 2px 5px; border: 1px solid #e6ebf3; border-radius: 4px; background: #f7f9fc; color: #274365; font: 12px ui-monospace, monospace; }
.tablewrap { overflow: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f7f9fc; color: #53685d; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.right { position: sticky; top: 100px; align-self: start; padding-top: 54px; }
.right b { display: block; margin-bottom: 12px; font-size: 11px; color: #718096; }
.right a { display: block; padding: 6px 0; color: #718096; font-size: 11px; }
.right a:hover { color: var(--brand-primary); }
.footer { margin-top: 75px; padding-top: 22px; border-top: 1px solid var(--line); color: #8a95a6; font-size: 11px; line-height: 1.7; }
.doc-link { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 2px; }
.skip-link { position: fixed; top: -80px; left: 10px; z-index: 100; padding: 10px 14px; border-radius: 7px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 10px; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: 220px minmax(0, 790px); gap: 36px; }
  .right { display: none; }
}
@media (max-width: 760px) {
  .top { height: 58px; padding: 0 15px; gap: 12px; }
  .toplinks, .version { display: none; }
  .search input { width: 34vw; }
  .mobile-menu { display: block; }
  .layout { display: block; padding: 0 19px; }
  .side { display: none; position: fixed; z-index: 30; inset: 58px auto 0 0; width: min(300px, 85vw); height: auto; padding: 20px; border-right: 1px solid var(--line); background: white; box-shadow: 20px 0 50px #142f2920; }
  .side.open { display: block; }
  main { padding: 34px 0 65px; }
  h1 { font-size: 38px; }
  .lead { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .base { align-items: flex-start; flex-direction: column; }
  .base .copy { align-self: flex-end; }
}
