:root { --mg-gold: 184, 146, 63; --mg-wine: 107, 20, 39; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body { font-size: 17px; line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:focus-visible { outline: 2px solid #d4b56a; outline-offset: 3px; }

/* progress bar (article) */
#mg-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 90; background: linear-gradient(90deg, #8c6a22, #ead7a0); transform: scaleX(0); transform-origin: 0 50%; }

/* navbar: centered logo, nav row beneath */
.mg-bar { border-bottom: 3px double rgba(var(--mg-gold), .85); transition: box-shadow .25s ease; }
.mg-bar.is-scrolled { box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .65); }
.mg-link { position: relative; display: block; padding: .55rem 1.1rem; color: #f8f0e4; }
.mg-link::after { content: ""; position: absolute; left: 50%; bottom: .2rem; width: 0; height: 2px; background: #d4b56a; transition: width .25s ease, left .25s ease; }
.mg-link:hover::after, .mg-link[aria-current="page"]::after { width: 55%; left: 22.5%; }
.mg-link:hover, .mg-link[aria-current="page"] { color: #ead7a0; }

/* buttons */
.mg-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.7rem; font-weight: 700; color: #240510;
  background: linear-gradient(180deg, #ead7a0, #b8923f); border: 1px solid #8c6a22; box-shadow: inset 0 0 0 2px rgba(36, 5, 16, .18), 0 6px 18px -8px rgba(0, 0, 0, .6);
  transition: transform .2s ease, filter .2s ease; text-align: center; }
.mg-btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.mg-btn-line { background: transparent; color: #ead7a0; border: 1px solid rgba(var(--mg-gold), .8); box-shadow: inset 0 0 0 3px rgba(53, 8, 20, 1), inset 0 0 0 4px rgba(var(--mg-gold), .45); }
.mg-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; transition: opacity .25s ease, transform .25s ease; }
.mg-float.is-hidden { opacity: 0; transform: translateY(14px); pointer-events: none; }

/* ornaments */
.mg-orn { color: rgb(var(--mg-gold)); max-width: 100%; height: auto; }
.mg-gold-text { color: #d4b56a; }
.mg-kicker { font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; color: #d4b56a; font-weight: 600; }
.mg-kicker-dark { color: #8c6a22; }
.mg-foot-line { height: 6px; border-top: 1px solid rgba(var(--mg-gold), .8); border-bottom: 1px solid rgba(var(--mg-gold), .8); }

/* hero: centered, ornamental border */
.mg-hero { background: radial-gradient(ellipse at 50% 0%, #7a1a30 0%, #47091b 45%, #240510 100%); position: relative; }
.mg-hero::before { content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: repeating-linear-gradient(45deg, #ead7a0 0 1px, transparent 1px 22px), repeating-linear-gradient(-45deg, #ead7a0 0 1px, transparent 1px 22px); }
.mg-frame { position: relative; padding: 2.5rem 1.25rem; border: 1px solid rgba(var(--mg-gold), .9); box-shadow: inset 0 0 0 6px #3a0a18, inset 0 0 0 7px rgba(var(--mg-gold), .55), 0 30px 60px -30px rgba(0, 0, 0, .8); background: rgba(36, 5, 16, .35); }
@media (min-width: 640px) { .mg-frame { padding: 3.25rem 3rem; } }
.mg-frame::before, .mg-frame::after { content: ""; position: absolute; width: 38px; height: 38px; border: 2px solid #d4b56a; pointer-events: none; }
.mg-frame::before { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.mg-frame::after { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }
.mg-frame > i { position: absolute; width: 38px; height: 38px; border: 2px solid #d4b56a; pointer-events: none; }
.mg-frame > i.tr { top: -9px; right: -9px; border-left: 0; border-bottom: 0; }
.mg-frame > i.bl { bottom: -9px; left: -9px; border-right: 0; border-top: 0; }

/* double gold border card */
.mg-card { position: relative; background: #fdf9f2; border: 1px solid rgba(var(--mg-gold), .95); box-shadow: inset 0 0 0 5px #fdf9f2, inset 0 0 0 6px rgba(var(--mg-gold), .6), 0 18px 34px -24px rgba(53, 8, 20, .55); transition: transform .25s ease, box-shadow .25s ease; }
a.mg-card:hover, .mg-card.is-lift:hover { transform: translateY(-4px); }
.mg-card-dark { background: #47091b; color: #f8f0e4; box-shadow: inset 0 0 0 5px #47091b, inset 0 0 0 6px rgba(var(--mg-gold), .7), 0 18px 34px -24px rgba(0, 0, 0, .7); }

/* image frame */
.mg-pic { padding: 8px; background: #fdf9f2; border: 1px solid rgba(var(--mg-gold), .95); box-shadow: 0 0 0 4px #f8f0e4, 0 0 0 5px rgba(var(--mg-gold), .6), 0 24px 40px -26px rgba(53, 8, 20, .7); }
.mg-pic img { display: block; width: 100%; height: auto; background: #47091b; }

/* provider marquee */
.mg-marquee { overflow: hidden; display: grid; gap: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.mg-track { display: flex; gap: 14px; width: max-content; margin: 0; padding: 6px 0; list-style: none; animation: mg-scroll 60s linear infinite; animation-play-state: paused; }
.mg-track.is-rev { animation-direction: reverse; animation-duration: 68s; }
.mg-marquee.is-active .mg-track { animation-play-state: running; }
.mg-marquee.is-active:hover .mg-track { animation-play-state: paused; }
.mg-track li { flex: none; padding: 4px; border: 1px solid rgba(var(--mg-gold), .9); box-shadow: 0 0 0 3px #240510, 0 0 0 4px rgba(var(--mg-gold), .5); transition: transform .2s ease; }
.mg-track li:hover { transform: translateY(-3px); }
.mg-track img { width: 188px; height: 120px; display: block; background: #47091b; }
@keyframes mg-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 7px)); } }
@media (prefers-reduced-motion: reduce) { .mg-track { animation: none; } .mg-marquee { overflow-x: auto; } }

/* section headings (home): roman numeral left rail */
.mg-num { font-family: "Noto Serif Thai", Georgia, serif; font-size: 3.4rem; line-height: 1; color: rgba(var(--mg-gold), .85); }
.mg-prose p { margin-top: 1.1rem; line-height: 1.95; }
.mg-prose p:first-child { margin-top: 0; }
.mg-prose strong { color: #6b1427; font-weight: 700; }
.mg-prose a strong { text-decoration: underline; text-decoration-color: rgba(var(--mg-gold), .9); text-underline-offset: 4px; }
.mg-dark .mg-prose strong { color: #ead7a0; }

/* article typography */
.mg-article h2 { font-family: "Noto Serif Thai", Georgia, serif; font-size: 1.6rem; font-weight: 700; line-height: 1.4; color: #5a0f22; margin-top: 2.6rem; padding-top: .4rem; border-top: 3px double rgba(var(--mg-gold), .8); }
.mg-article h3 { font-family: "Noto Serif Thai", Georgia, serif; font-size: 1.25rem; font-weight: 600; color: #6b1427; margin-top: 1.8rem; }
.mg-article p { margin-top: 1rem; line-height: 1.95; }
.mg-article ul, .mg-article ol { margin-top: 1rem; padding-left: 1.4rem; line-height: 1.9; }
.mg-article ul { list-style: none; padding-left: 0; }
.mg-article ul li { position: relative; padding-left: 1.6rem; margin-top: .4rem; }
.mg-article ul li::before { content: ""; position: absolute; left: .3rem; top: .72em; width: 7px; height: 7px; background: #b8923f; transform: rotate(45deg); }
.mg-article ol { list-style: decimal; }
.mg-article blockquote { margin: 1.8rem 0; padding: 1.2rem 1.4rem; background: #fdf9f2; border: 1px solid rgba(var(--mg-gold), .9); box-shadow: inset 0 0 0 4px #fdf9f2, inset 0 0 0 5px rgba(var(--mg-gold), .55); font-family: "Noto Serif Thai", Georgia, serif; color: #5a0f22; line-height: 1.9; }
.mg-article a:not(.mg-btn) { color: #6b1427; text-decoration: underline; text-decoration-color: rgba(var(--mg-gold), .9); text-underline-offset: 3px; word-break: break-word; }

/* reveal */
.no-js .mg-reveal, .mg-reveal.is-in { opacity: 1; transform: none; }
.mg-reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) { .mg-reveal { opacity: 1; transform: none; transition: none; } }

/* filter chips */
.mg-chip { padding: .45rem 1.1rem; border: 1px solid rgba(var(--mg-gold), .9); background: #fdf9f2; color: #5a0f22; font-weight: 600; transition: background .2s, color .2s; }
.mg-chip[aria-pressed="true"] { background: #5a0f22; color: #ead7a0; }

/* faq */
.mg-faq details { border-bottom: 1px solid rgba(var(--mg-gold), .55); }
.mg-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-family: "Noto Serif Thai", Georgia, serif; font-weight: 600; font-size: 1.08rem; color: #f8f0e4; }
.mg-faq summary::-webkit-details-marker { display: none; }
.mg-faq summary::after { content: "\25C6"; color: #d4b56a; font-size: .8rem; transition: transform .25s ease; flex: none; margin-top: .45rem; }
.mg-faq details[open] summary::after { transform: rotate(90deg); }
.mg-faq details p { padding-bottom: 1.2rem; line-height: 1.9; color: rgba(248, 240, 228, .82); }

input, textarea, select { font: inherit; }
.mg-field { width: 100%; padding: .7rem .9rem; background: #fff; border: 1px solid rgba(var(--mg-gold), .9); color: #2a1217; }
.mg-field:focus { outline: 2px solid #6b1427; outline-offset: 1px; }

/* pbn: provider slider always auto-scrolls */
.mg-marquee { overflow: hidden !important; }
.mg-marquee .mg-track { animation-name: mg-scroll !important; animation-duration: 60s !important; animation-timing-function: linear !important; animation-iteration-count: infinite !important; animation-play-state: running !important; }
@media (hover: hover) { .mg-marquee:hover .mg-marquee .mg-track { animation-play-state: paused !important; } }

/* conversion pass */
.mg-pulse { animation: mg-pulse 2.8s ease-in-out infinite; }
@keyframes mg-pulse { 0%, 100% { box-shadow: inset 0 0 0 2px rgba(36, 5, 16, .18), 0 6px 18px -8px rgba(0, 0, 0, .6), 0 0 0 0 rgba(212, 181, 106, .5); } 50% { box-shadow: inset 0 0 0 2px rgba(36, 5, 16, .18), 0 6px 18px -8px rgba(0, 0, 0, .6), 0 0 0 9px rgba(212, 181, 106, 0); } }
@media (prefers-reduced-motion: reduce) { .mg-pulse { animation: none; } }
.mg-band { background: radial-gradient(ellipse at 50% 0%, #7a1a30 0%, #47091b 50%, #240510 100%); border-top: 3px double rgba(var(--mg-gold), .85); color: #f8f0e4; }
.mg-care { background: #350814; border-top: 1px solid rgba(var(--mg-gold), .5); }
.mg-steps > li { position: relative; }
.mg-step-n { position: absolute; top: -1.3rem; left: 1.25rem; display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; font-family: "Noto Serif Thai", Georgia, serif; font-weight: 700; font-size: 1.3rem; color: #240510; background: linear-gradient(180deg, #ead7a0, #b8923f); border: 1px solid #8c6a22; border-radius: 50%; }

/* pbn: search-topic section */
.pbn-kw { max-width: 48rem; margin: 2.5rem auto 0; padding: 1.5rem 1.25rem; border: 1px solid rgba(128,128,128,.35); border-radius: 14px; line-height: 1.9; }
.pbn-kw h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.4; margin: 0 0 .75rem; }
.pbn-kw h3 { font-size: 1.05rem; font-weight: 700; margin: 1.1rem 0 .25rem; }
.pbn-kw p { margin: .35rem 0; }
.pbn-kw a { text-decoration: underline; font-weight: 600; }

/* pbn: liquid-metal buttons */
body .mg-btn:not(.mg-btn-line) {
  position: relative !important; isolation: isolate; overflow: hidden !important;
  border: 2px solid transparent !important; border-radius: 999px !important; clip-path: none !important;
  color: #f6e2c3 !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .65) !important;
  background: linear-gradient(180deg, #3a0a17 0%, #12030a 100%) padding-box, linear-gradient(118deg, #5b1424 0%, #f3c7bd 6%, #c9806f 12%, #fff1e4 18%, #c9806f 24%, #d4b56a 30%, #5b1424 38%, #d4b56a 44%, #5b1424 50%, #f3c7bd 56%, #c9806f 62%, #fff1e4 68%, #c9806f 74%, #d4b56a 80%, #5b1424 88%, #d4b56a 94%, #5b1424 100%) border-box !important;
  background-size: 100% 100%, 200% 100% !important; background-position: 0 0, 0% 50% !important;
  animation: mg-liq 11s linear infinite !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 20px 12px -12px rgba(0, 0, 0, .25), 0 9px 9px -6px rgba(0, 0, 0, .2), 0 2px 5px rgba(0, 0, 0, .2) !important;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease !important;
}
body .mg-btn:not(.mg-btn-line)::before, body .mg-btn:not(.mg-btn-line)::after { display: none !important; }
body .mg-btn:not(.mg-btn-line):hover { transform: translateY(-1px) !important; animation-duration: 5s !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 12px 6px -6px rgba(0, 0, 0, .08), 0 8px 5px -4px rgba(0, 0, 0, .14), 0 4px 4px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .22) !important; }
body .mg-btn:not(.mg-btn-line):active { transform: translateY(1px) scale(.98) !important; animation-duration: 1.6s !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 1px 2px rgba(0, 0, 0, .3), inset 0 2px 4px rgba(0, 0, 0, .4) !important; }
@keyframes mg-liq { to { background-position: 0 0, 100% 50%; } }
.mg-rip { position: absolute; width: 20px; height: 20px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 70%); animation: mg-rip .6s ease-out forwards; }
@keyframes mg-rip { from { transform: translate(-50%, -50%) scale(0); opacity: .6; } to { transform: translate(-50%, -50%) scale(4); opacity: 0; } }

/* pbn:mobile-nav */
.mg-mnav{display:none}
@media (max-width:767px){
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  .mg-mnav{display:grid;grid-template-columns:repeat(4,1fr) 1.25fr;align-items:center;gap:2px;position:fixed;left:0;right:0;bottom:0;z-index:60;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:rgba(12,12,16,.94);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
    border-top:1px solid rgba(255,255,255,.14)}
  .mg-mnav a.mg-mi{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;padding:4px 2px;border-radius:10px;
    color:rgba(255,255,255,.72);font-size:11px;line-height:1.2;text-decoration:none;-webkit-tap-highlight-color:transparent}
  .mg-mnav a.mg-mi[aria-current="page"]{color:#fff;background:rgba(255,255,255,.12)}
  .mg-mnav a.mg-btn{display:flex;align-items:center;justify-content:center;min-height:44px;margin-left:4px;padding:0 6px!important;font-size:14px!important;white-space:nowrap}
}
