/* Mahjong IQ developer website */
:root {
  --ink: #0c1714;
  --ink-soft: #12241f;
  --jade: #174c3c;
  --jade-2: #0f392d;
  --jade-bright: #2c7a5c;
  --brass: #d7b66f;
  --brass-soft: #f0dfb3;
  --bone: #f7f2e8;
  --paper: #fffdf8;
  --muted: #6b746f;
  --line: rgba(23, 76, 60, .14);
  --shadow: 0 24px 70px rgba(6, 22, 17, .12);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -5%, rgba(215, 182, 111, .17), transparent 28rem),
    linear-gradient(180deg, #fbf7ee 0, var(--bone) 22rem, #f7f5ef 100%);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: var(--jade); text-underline-offset: 3px; }
a:hover { color: var(--jade-bright); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); z-index: 999; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 242, 232, .88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(23, 76, 60, .09); }
.header-inner { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 42px; aspect-ratio: 1; border-radius: 13px; display: grid; place-items: center; color: var(--brass-soft); background: linear-gradient(145deg, #1d5c48, #0b2d24); border: 1px solid rgba(215,182,111,.45); box-shadow: inset 0 1px rgba(255,255,255,.13); font-family: Georgia, serif; font-size: 23px; }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 5px; }
.nav a { color: #32413c; text-decoration: none; font-size: 14px; font-weight: 720; padding: 9px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: rgba(23,76,60,.07); color: var(--jade); }
.nav a[aria-current="page"] { background: var(--jade); color: #fff; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 86px 0 74px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); gap: 68px; align-items: center; }
.eyebrow { color: var(--jade-bright); font-size: 12px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 16px; }
h1, h2, h3 { font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif; letter-spacing: -.035em; line-height: 1.08; color: #10251f; }
h1 { margin: 0; font-size: clamp(46px, 7.3vw, 82px); max-width: 900px; }
h2 { font-size: clamp(32px, 4.5vw, 50px); margin: 0 0 18px; }
h3 { font-size: 24px; margin: 0 0 10px; }
.lede { font-size: clamp(18px, 2.1vw, 22px); color: #4c5b56; max-width: 720px; margin: 24px 0 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 14px; text-decoration: none; font-weight: 800; border: 1px solid transparent; cursor: pointer; }
.button.primary { background: var(--jade); color: #fff; box-shadow: 0 12px 30px rgba(23,76,60,.2); }
.button.primary:hover { background: #1b5d48; color: #fff; }
.button.secondary { border-color: rgba(23,76,60,.22); background: rgba(255,255,255,.5); color: var(--jade); }
.hero-art { position: relative; min-height: 470px; display: grid; place-items: center; }
.art-orbit { width: min(100%, 430px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 45% 35%, #28634e 0 18%, #124233 58%, #09261f 100%); box-shadow: 0 40px 80px rgba(8,35,27,.22), inset 0 0 0 1px rgba(240,223,179,.24); position: relative; overflow: hidden; }
.art-orbit::before, .art-orbit::after { content: ""; position: absolute; inset: 12%; border: 1px solid rgba(215,182,111,.24); border-radius: 50%; }
.art-orbit::after { inset: 27%; border-style: dashed; opacity: .55; }
.tile-fan { position: absolute; inset: 0; display: grid; place-items: center; }
.tile { position: absolute; width: 125px; filter: drop-shadow(0 20px 18px rgba(0,0,0,.24)); border-radius: 18px; }
.tile.one { transform: translate(-92px, 18px) rotate(-14deg); }
.tile.two { transform: translate(4px, -36px) rotate(4deg); z-index: 2; }
.tile.three { transform: translate(98px, 27px) rotate(16deg); }
.art-badge { position: absolute; right: 3%; bottom: 5%; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--brass-soft); color: #4a3918; border: 1px solid rgba(96,72,24,.15); box-shadow: var(--shadow); font-family: Georgia, serif; font-weight: 800; line-height: 1.15; transform: rotate(-6deg); }
.section { padding: 76px 0; }
.section.compact { padding: 48px 0; }
.section-dark { background: linear-gradient(145deg, #0b2d24, #143f32); color: #e9efe9; }
.section-dark h2, .section-dark h3 { color: #fff8e8; }
.section-dark p, .section-dark .muted { color: #cad8d1; }
.section-heading { max-width: 760px; margin-bottom: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: 0 14px 45px rgba(24,49,41,.06); }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #e5eee8; color: var(--jade); margin-bottom: 18px; font-weight: 900; }
.metric { padding: 28px 24px; border-left: 1px solid rgba(240,223,179,.22); }
.metric:first-child { border-left: 0; }
.metric strong { display: block; color: var(--brass-soft); font-family: Georgia, serif; font-size: 35px; line-height: 1; margin-bottom: 8px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); }
.page-hero { padding: 70px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(42px, 6vw, 68px); max-width: 900px; }
.page-hero .lede { max-width: 820px; }
.content-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 52px; padding: 54px 0 84px; align-items: start; }
.toc { position: sticky; top: 102px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.55); }
.toc strong { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.toc a { display: block; padding: 8px 8px; margin-top: 2px; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 680; }
.toc a:hover { background: rgba(23,76,60,.07); }
.prose { max-width: 800px; }
.prose h2 { font-size: 34px; margin-top: 50px; scroll-margin-top: 110px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: inherit; letter-spacing: -.01em; font-size: 19px; margin-top: 28px; }
.prose p, .prose li { color: #3f4c48; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose .callout { background: #eef4ef; border: 1px solid rgba(23,76,60,.13); border-radius: 18px; padding: 20px 22px; margin: 28px 0; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; margin-top: 18px; }
.support-layout { display: grid; grid-template-columns: 1.02fr .98fr; gap: 24px; }
.faq { border: 1px solid var(--line); background: rgba(255,255,255,.65); border-radius: 18px; overflow: hidden; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 790; color: #173a30; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--jade); font-size: 21px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 20px; margin: 0; color: #53605c; }
.form-card { background: #102f27; color: #eef5f0; border-radius: 24px; padding: 28px; }
.form-card h2, .form-card h3 { color: #fff8e8; }
.form-card p { color: #cbd9d2; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 7px; color: #e8efe9; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid rgba(255,255,255,.17); border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; padding: 12px 13px; outline: none; }
.field select option { color: #111; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(215,182,111,.12); }
.output { margin-top: 18px; padding: 16px; background: rgba(0,0,0,.18); border-radius: 14px; border: 1px solid rgba(255,255,255,.1); white-space: pre-wrap; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 92px; color: #eef5f0; }
.note { font-size: 13px; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; background: #e8f2eb; color: #18503c; font-size: 13px; font-weight: 800; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8f65; box-shadow: 0 0 0 4px rgba(47,143,101,.12); }
.site-footer { background: #091f1a; color: #bfcfc8; padding: 54px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, .7fr); gap: 36px; }
.site-footer h3 { color: #fff5df; font-size: 21px; }
.site-footer h4 { color: #e8d8b5; margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.site-footer a { color: #d4dfda; text-decoration: none; display: block; margin: 7px 0; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; margin-top: 36px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #8fa39a; }
@media (max-width: 900px) {
  .header-inner { align-items: flex-start; padding: 14px 0; flex-direction: column; gap: 10px; }
  .site-header { position: relative; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { background: rgba(255,255,255,.45); border: 1px solid rgba(23,76,60,.09); }
  .hero { padding-top: 58px; }
  .hero-grid, .support-layout { grid-template-columns: 1fr; }
  .hero-art { min-height: 390px; order: -1; }
  .art-orbit { width: min(82vw, 390px); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid rgba(240,223,179,.22); }
  .metric:nth-child(4) { border-top: 1px solid rgba(240,223,179,.22); }
  .content-shell { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; display: flex; gap: 5px; overflow-x: auto; }
  .toc strong { display: none; }
  .toc a { white-space: nowrap; background: rgba(23,76,60,.05); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .container, .header-inner { width: min(100% - 28px, var(--max)); }
  .hero { padding: 40px 0 52px; }
  .hero-grid { gap: 36px; }
  .hero-art { min-height: 320px; }
  .tile { width: 94px; border-radius: 13px; }
  .tile.one { transform: translate(-68px, 14px) rotate(-14deg); }
  .tile.two { transform: translate(2px, -28px) rotate(4deg); }
  .tile.three { transform: translate(72px, 19px) rotate(16deg); }
  .art-badge { width: 112px; height: 112px; font-size: 14px; }
  .section { padding: 54px 0; }
  .page-hero { padding: 46px 0 36px; }
  .metrics { grid-template-columns: 1fr; }
  .metric, .metric:nth-child(3), .metric:nth-child(4) { border-left: 0; border-top: 1px solid rgba(240,223,179,.22); }
  .metric:first-child { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
