:root {
  --mx-ink: #f3f6ee;
  --mx-muted: #a6b2ab;
  --mx-bg: #10191d;
  --mx-panel: #172327;
  --mx-panel-2: #1d2c30;
  --mx-line: rgba(226, 239, 225, .14);
  --mx-accent: #d9f36b;
  --mx-cyan: #7be1d2;
  --mx-danger: #ffbd78;
  --mx-radius: 22px;
  --mx-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--mx-bg); color: var(--mx-ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; }
body.stage-open { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 75%); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.rg-skip { position: fixed; left: 16px; top: -80px; z-index: 10000; padding: 9px 13px; background: var(--mx-accent); color: #102018; border-radius: 10px; font-weight: 800; }
.rg-skip:focus { top: 16px; }
.rg-container, .rg-app-container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.rg-header { display: block; position: relative; z-index: 90; border-bottom: 1px solid var(--mx-line); background: rgba(16, 25, 29, .88); backdrop-filter: blur(16px); }
.rg-header__inner { width: min(1120px, calc(100% - 40px)); min-height: 78px; margin: auto; display: flex; align-items: center; gap: 28px; }
.rg-brand, .rg-footer__brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.rg-brand strong { display: block; font-size: 18px; letter-spacing: -.04em; }
.rg-brand small { display: block; color: var(--mx-muted); font-size: 11px; letter-spacing: .03em; }
.rg-brand__mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(217,243,107,.6); border-radius: 50%; background: var(--mx-accent); }
.rg-brand__mark::before { content: ""; display: block; width: 16px; height: 2px; background: #17201c; transform: translateY(4px); box-shadow: 0 -5px #17201c, 0 5px #17201c; }
.rg-nav { display: flex; align-items: center; gap: 21px; margin-left: auto; }
.rg-nav a { color: var(--mx-muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.rg-nav a:hover { color: var(--mx-accent); }
.rg-header__button { padding: 10px 15px; border-radius: 999px; background: var(--mx-accent); color: #152017; text-decoration: none; font-size: 13px; font-weight: 900; }
.rg-nav-toggle { display: none; }
.rg-tool-shell { position: sticky; top: 0; z-index: 80; background: #f4f3e9; color: #17221e; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.rg-phys-ruler { overflow: hidden; background: #f4f3e9; }
.rg-ruler-horizontal { display: none; height: 76px; border-bottom: 1px solid #b8bcae; }
.rg-ruler-horizontal.visible { display: block; }
.rg-ruler-vertical { position: fixed; left: 0; top: 0; z-index: 79; display: none; width: 48px; height: 100vh; border-right: 1px solid #b8bcae; background: #f4f3e9; }
.rg-ruler-vertical.visible { display: block; }
.rg-phys-ruler canvas { display: block; width: 100%; height: 100%; }
.rg-toolbar { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 82px; padding: 14px; overflow-x: auto; }
.rg-segment { display: inline-flex; overflow: hidden; border: 1px solid #c7c8bc; border-radius: 12px; background: #fffef7; }
.rg-segment input { position: absolute; opacity: 0; pointer-events: none; }
.rg-segment label { padding: 11px 17px; color: #65706a; font-weight: 850; white-space: nowrap; }
.rg-segment input:checked + label { background: #17221e; color: var(--mx-accent); }
.rg-tool-btn, .rg-actions-row button, .rg-inline-form button, .rg-modal-close { border: 1px solid #c7c8bc; border-radius: 12px; padding: 11px 15px; background: #fffef7; color: #17221e; font-weight: 850; white-space: nowrap; }
.rg-tool-btn:hover, .rg-actions-row button:hover, .rg-inline-form button:hover { border-color: #17221e; }
.rg-app-body { position: relative; padding: 72px 0 100px; background: radial-gradient(circle at 75% 0%, rgba(123,225,210,.12), transparent 34%), var(--mx-bg); }
.rg-app-container { max-width: 1000px; }
.rg-title-row { display: flex; align-items: flex-start; gap: 22px; margin-bottom: 25px; }
.rg-title-icon { flex: 0 0 62px; width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(217,243,107,.55); border-radius: 20px; background: var(--mx-accent); color: #18241d; font-size: 29px; font-weight: 950; transform: rotate(-7deg); }
.rg-title-row h1 { max-width: 760px; margin: 0 0 8px; color: var(--mx-ink); font-size: clamp(32px, 5vw, 60px); line-height: 1.03; letter-spacing: -.055em; }
.rg-title-row p { max-width: 700px; margin: 0; color: var(--mx-muted); font-size: 17px; }
.rg-status { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; padding: 15px 18px; border: 1px solid; border-radius: 15px; font-weight: 800; }
.rg-status strong { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.rg-status.warning { border-color: rgba(255,189,120,.36); background: rgba(255,189,120,.1); color: #ffd19c; }
.rg-status.warning strong { background: var(--mx-danger); color: #3d2715; }
.rg-status.success { border-color: rgba(123,225,210,.35); background: rgba(123,225,210,.1); color: #b6fff3; }
.rg-status.success strong { background: var(--mx-cyan); color: #10231f; }
.rg-panel { margin-bottom: 24px; padding: 28px; border: 1px solid var(--mx-line); border-radius: var(--mx-radius); background: linear-gradient(145deg, rgba(29,44,48,.98), rgba(23,35,39,.98)); box-shadow: var(--mx-shadow); }
.rg-panel h2 { margin: 0 0 8px; color: var(--mx-ink); font-size: 23px; letter-spacing: -.025em; }
.rg-panel p { margin-top: 0; color: var(--mx-muted); }
.rg-inline-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.rg-inline-form label, .rg-contact label { display: grid; gap: 7px; }
.rg-inline-form span, .rg-contact label span, .rg-field > span { color: var(--mx-muted); font-size: 13px; font-weight: 850; }
.rg-inline-form input, .rg-contact input, .rg-contact textarea, .rg-field select { width: 100%; border: 1px solid var(--mx-line); border-radius: 12px; padding: 12px 14px; outline: none; background: #101a1e; color: var(--mx-ink); }
.rg-inline-form input { width: 140px; text-align: center; }
.rg-inline-form input:focus, .rg-contact input:focus, .rg-contact textarea:focus, .rg-field select:focus { border-color: var(--mx-accent); box-shadow: 0 0 0 3px rgba(217,243,107,.12); }
.rg-actions-row { display: flex; gap: 11px; flex-wrap: wrap; }
.rg-primary { border-color: var(--mx-accent) !important; background: var(--mx-accent) !important; color: #17221e !important; }
.rg-prose h2 { margin: 30px 0 9px; color: var(--mx-accent); font-size: 25px; letter-spacing: -.03em; }
.rg-prose h2:first-child { margin-top: 0; }
.rg-prose p, .rg-prose li { color: var(--mx-muted); }
.rg-prose strong { color: var(--mx-ink); }
.rg-faq__grid { display: grid; gap: 10px; }
.rg-faq details, .rg-page__side details { padding: 16px 17px; border: 1px solid var(--mx-line); border-radius: 14px; background: rgba(16,25,29,.55); }
.rg-faq summary, .rg-page__side summary { display: flex; justify-content: space-between; gap: 14px; cursor: pointer; list-style: none; font-weight: 850; }
.rg-faq summary::-webkit-details-marker, .rg-page__side summary::-webkit-details-marker { display: none; }
.rg-faq summary span { color: var(--mx-accent); font-size: 20px; line-height: 1; }
.rg-faq details p, .rg-page__side details p { margin: 10px 0 0; color: var(--mx-muted); }
.rg-stage { position: fixed; inset: 0; z-index: 9999; display: none; background: #f4f3e9; }
.rg-stage.active { display: block; }
.rg-stage canvas { display: block; width: 100%; height: 100%; }
.rg-stage-corner { position: absolute; left: 0; top: 0; width: 54px; height: 54px; display: grid; place-items: center; color: #17221e; font-size: 13px; font-weight: 950; pointer-events: none; }
.rg-measure-box-stage { position: absolute; left: 50%; top: 46%; width: 190px; height: 114px; border: 3px solid #17221e; background: rgba(217,243,107,.23); cursor: move; touch-action: none; }
.rg-measure-box-stage span { position: absolute; left: 50%; top: -38px; transform: translateX(-50%); padding: 7px 12px; border-radius: 999px; background: #17221e; color: var(--mx-accent); font-weight: 900; white-space: nowrap; }
.rg-measure-box-stage.label-inside span { top: 9px; }
.measure-handle { position: absolute; width: 14px; height: 14px; border: 3px solid #17221e; border-radius: 50%; background: var(--mx-accent); }
.measure-handle.nw { left: -10px; top: -10px; cursor: nwse-resize; }
.measure-handle.ne { right: -10px; top: -10px; cursor: nesw-resize; }
.measure-handle.se { right: -10px; bottom: -10px; cursor: nwse-resize; }
.measure-handle.sw { left: -10px; bottom: -10px; cursor: nesw-resize; }
.rg-stage-toolbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid #c7c8bc; border-radius: 999px; background: rgba(255,254,247,.95); box-shadow: 0 14px 42px rgba(0,0,0,.18); color: #17221e; }
.rg-stage-toolbar button { border: 1px solid #c7c8bc; border-radius: 999px; padding: 9px 14px; background: #fffef7; color: #17221e; font-weight: 850; }
.rg-modal { width: min(980px, calc(100% - 24px)); max-height: min(92vh, 860px); padding: 0; overflow: auto; border: 0; border-radius: 25px; background: var(--mx-panel); color: var(--mx-ink); box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.rg-modal::backdrop { background: rgba(4,10,12,.75); backdrop-filter: blur(5px); }
.rg-modal-card { position: relative; display: grid; gap: 16px; padding: 32px; }
.rg-modal-close { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--mx-accent); color: #17221e; font-size: 24px; line-height: 1; }
.rg-cal-head { padding-right: 48px; }
.rg-cal-head h2 { margin: 10px 0 5px; font-size: 32px; letter-spacing: -.045em; }
.rg-cal-head p { margin: 0; color: var(--mx-muted); }
.rg-cal-badge { display: inline-flex; padding: 5px 10px; border: 1px solid rgba(217,243,107,.4); border-radius: 999px; color: var(--mx-accent); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.rg-cal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rg-cal-row { display: grid; grid-template-columns: 44px 1fr; gap: 13px; padding: 18px; border: 1px solid var(--mx-line); border-radius: 18px; background: rgba(16,25,29,.72); }
.rg-cal-row--wide, .rg-cal-card-row { grid-column: 1 / -1; }
.rg-cal-number { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--mx-accent); color: #17221e; font-size: 12px; font-weight: 950; }
.rg-cal-row h3 { margin: 0 0 5px; font-size: 17px; }
.rg-cal-row p { margin: 0 0 13px; color: var(--mx-muted); font-size: 14px; }
.rg-cal-action, .rg-cal-secondary { border: 0; border-radius: 11px; padding: 11px 14px; font-weight: 900; }
.rg-cal-action { background: var(--mx-accent); color: #17221e; }
.rg-cal-secondary { background: var(--mx-panel-2); color: var(--mx-ink); }
.rg-field { display: grid; gap: 7px; margin: 0; }
.rg-card-orientation { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.rg-card-orientation button { border: 1px solid var(--mx-line); border-radius: 999px; padding: 9px 13px; background: transparent; color: var(--mx-muted); font-weight: 850; }
.rg-card-orientation button.is-active { border-color: var(--mx-accent); background: var(--mx-accent); color: #17221e; }
.rg-card-stage { min-height: 160px; display: flex; align-items: center; justify-content: center; margin: 12px 0; padding: 18px; overflow: auto; border: 1px solid var(--mx-line); border-radius: 18px; background: repeating-linear-gradient(135deg, #24383a 0, #24383a 12px, #1c2c2f 12px, #1c2c2f 24px); }
.rg-card-sizer { height: 86px; display: grid; place-items: center; max-width: 100%; overflow: hidden; border-radius: 16px; background: linear-gradient(135deg, #324d42, var(--mx-accent) 110%); color: #17221e; box-shadow: 0 15px 30px rgba(0,0,0,.2); }
.rg-card-sizer.is-portrait { min-width: 70px; }
.rg-card-sizer span { color: #17221e; font-weight: 950; }
#ppi-slider { width: 100%; accent-color: var(--mx-accent); }
.rg-cal-footer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rg-mini-note { margin-top: 10px; color: var(--mx-muted); font-weight: 700; }
.rg-page-hero { padding: 86px 0 30px; background: radial-gradient(circle at 75% 10%, rgba(217,243,107,.13), transparent 30%); }
.rg-kicker { display: inline-block; color: var(--mx-accent); font-size: 11px; font-weight: 950; letter-spacing: .16em; }
.rg-page-hero h1 { max-width: 850px; margin: 13px 0; font-size: clamp(40px, 7vw, 76px); line-height: .98; letter-spacing: -.06em; }
.rg-page-intro { max-width: 760px; color: var(--mx-muted); font-size: 18px; }
.rg-page { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; padding-bottom: 90px; }
.rg-page__main, .rg-page__side { border: 1px solid var(--mx-line); border-radius: var(--mx-radius); background: linear-gradient(145deg, rgba(29,44,48,.98), rgba(23,35,39,.98)); box-shadow: var(--mx-shadow); }
.rg-page__main { padding: 32px; }
.rg-page__side { align-self: start; padding: 22px; }
.rg-page__side h2 { margin: 0 0 14px; font-size: 19px; }
.rg-contact { display: grid; gap: 16px; margin-top: 26px; }
.rg-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rg-button { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 900; }
.rg-button--primary { background: var(--mx-accent); color: #17221e; }
.rg-honeypot { position: absolute; left: -9999px; }
.rg-notice { margin-top: 18px; padding: 13px; border-radius: 12px; }
.rg-notice.is-ok { background: rgba(123,225,210,.12); color: var(--mx-cyan); }
.rg-notice.is-error { background: rgba(255,189,120,.12); color: var(--mx-danger); }
.rg-footer { margin-top: 30px; background: #0b1215; color: var(--mx-ink); }
.rg-footer__inner { width: min(1120px, calc(100% - 40px)); margin: auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; padding: 42px 0 28px; }
.rg-footer__brand { color: var(--mx-ink); }
.rg-footer p { max-width: 430px; color: var(--mx-muted); }
.rg-footer nav { display: flex; justify-content: flex-end; align-content: flex-start; gap: 14px 20px; flex-wrap: wrap; }
.rg-footer nav a { color: var(--mx-muted); text-decoration: none; font-size: 13px; }
.rg-footer nav a:hover { color: var(--mx-accent); }
.rg-footer__copy { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--mx-line); color: #75817b; }
.rg-toast { position: fixed; left: 50%; bottom: 22px; z-index: 10001; transform: translate(-50%, 24px); opacity: 0; padding: 11px 17px; border: 1px solid rgba(217,243,107,.4); border-radius: 999px; background: #17221e; color: var(--mx-accent); box-shadow: var(--mx-shadow); transition: .2s ease; pointer-events: none; }
.rg-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 820px) {
  .rg-header__inner { gap: 12px; }
  .rg-nav { gap: 12px; }
  .rg-header__button { display: none; }
  .rg-app-body { padding-top: 48px; margin-left: 0; }
  .rg-page { grid-template-columns: 1fr; }
  .rg-page__side { order: 2; }
}
@media (max-width: 620px) {
  .rg-container, .rg-app-container, .rg-header__inner, .rg-footer__inner { width: min(100% - 24px, 1120px); }
  .rg-nav { display: none; }
  .rg-header__inner { min-height: 68px; }
  .rg-title-row { gap: 15px; }
  .rg-title-icon { flex-basis: 48px; width: 48px; height: 48px; border-radius: 15px; font-size: 22px; }
  .rg-title-row h1 { font-size: 35px; }
  .rg-title-row p { font-size: 15px; }
  .rg-toolbar { justify-content: flex-start; min-height: 66px; padding: 9px 12px; }
  .rg-toolbar .rg-tool-btn, .rg-toolbar .rg-segment label { padding: 9px 11px; font-size: 12px; }
  .rg-panel { padding: 21px 17px; border-radius: 18px; }
  .rg-inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .rg-inline-form input { width: 100%; }
  .rg-inline-form > span { align-self: end; padding-bottom: 11px; }
  .rg-inline-form button { width: 100%; }
  .rg-actions-row > * { width: 100%; }
  .rg-modal { max-width: calc(100% - 12px); border-radius: 20px; }
  .rg-modal-card { padding: 24px 15px; }
  .rg-cal-grid { grid-template-columns: 1fr; }
  .rg-cal-row, .rg-cal-row--wide, .rg-cal-card-row { grid-column: auto; grid-template-columns: 1fr; }
  .rg-cal-number { width: max-content; padding: 0 12px; }
  .rg-stage-toolbar { left: 10px; right: 10px; bottom: 12px; transform: none; justify-content: center; flex-wrap: wrap; border-radius: 17px; }
  .rg-form-grid { grid-template-columns: 1fr; }
  .rg-page-hero { padding-top: 56px; }
  .rg-page__main { padding: 22px 17px; }
  .rg-footer__inner { grid-template-columns: 1fr; }
  .rg-footer nav { justify-content: flex-start; }
}
