/* ==========================================================================
   COMPONENTS — showcase chrome (demo bar, picker, toasts, CMS overlay)
   and site chrome (header, nav, buttons, cards, forms, footer).
   ========================================================================== */

/* ===================== DEMO CONTROL BAR ===================== */
/* Height is pinned to --bar-h and the row never wraps, so the bar cannot
   grow underneath the header that's positioned off it. */
.demo-bar{
  position:sticky; top:0; z-index:200;
  height:var(--bar-h);
  background:var(--tide); color:#fff;
}
.demo-bar .wrap{
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; flex-wrap:nowrap; height:100%;
}
.demo-label{ color:#9db3bd; font-size:.68rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.demo-label strong{ color:#fff; }
.demo-right{ display:flex; align-items:center; gap:14px; }

.ticket-switch{ position:relative; display:flex; background:rgba(255,255,255,.08); border-radius:999px; padding:4px; gap:2px; }
.ticket-switch button{
  position:relative; z-index:1;
  padding:9px 20px; border-radius:999px; color:#cfe0e6;
  font-family:'IBM Plex Mono', monospace; font-size:.72rem; letter-spacing:.06em;
  text-transform:uppercase; font-weight:600;
  transition:color .25s ease;
  display:flex; align-items:center; gap:6px;
}
.ticket-switch button .fare-dot{ width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.5; }
.ticket-switch button.active{ color:var(--tide); }
.ticket-switch button.active .fare-dot{ background:var(--amber); opacity:1; }
.ticket-glider{
  position:absolute; top:4px; bottom:4px; left:4px; width:100px; z-index:0;
  background:var(--amber); border-radius:999px;
  transition:transform .4s cubic-bezier(.22,1,.36,1), width .4s cubic-bezier(.22,1,.36,1);
}

/* Owner-mode (CMS) toggle — disabled on Basic, live on Plus & Premium */
.owner-toggle{
  display:flex; align-items:center; gap:9px;
  padding:8px 15px; border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  font-family:'IBM Plex Mono',monospace; font-size:.68rem; letter-spacing:.06em;
  text-transform:uppercase; font-weight:600; color:#cfe0e6;
  transition:background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.owner-toggle:hover:not(:disabled){ background:rgba(255,255,255,.1); color:#fff; }
.owner-toggle:disabled{ opacity:.4; cursor:not-allowed; }
.owner-toggle .owner-dot{ width:7px; height:7px; border-radius:50%; background:currentColor; opacity:.5; }
.owner-toggle.on{ background:var(--amber); border-color:var(--amber); color:var(--tide); }
.owner-toggle.on .owner-dot{ background:var(--tide); opacity:1; animation:ownerPulse 1.6s ease-in-out infinite; }
@keyframes ownerPulse{ 0%,100%{ opacity:1; } 50%{ opacity:.25; } }

/* ===== ELITE ENTRY ===== */
/* Deliberately not styled like the tier pill — dark and gold against the
   demo bar's flat tide, so it reads as a different product before anyone
   even hovers it. */
.elite-btn{
  position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:9px 20px 9px 16px; border-radius:999px;
  background:linear-gradient(135deg, #0B1620, #16283a);
  border:1px solid rgba(217,178,111,.35);
  color:#D9B26F; text-decoration:none;
  font-family:'IBM Plex Mono',monospace; font-size:.72rem; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  transition:border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.elite-btn:hover{
  border-color:rgba(217,178,111,.75);
  transform:translateY(-1px);
  box-shadow:0 10px 28px rgba(217,178,111,.2);
}
.elite-btn-compass{
  width:14px; height:14px; flex-shrink:0;
  fill:#D9B26F; opacity:.55;
  transition:transform .9s cubic-bezier(.22,1,.36,1), opacity .5s ease;
}
.elite-btn:hover .elite-btn-compass{ transform:rotate(200deg) scale(1.15); opacity:1; }

/* the shimmer sweep — a single pass on hover, not a looping idle animation */
.elite-btn::after{
  content:''; position:absolute; top:0; left:-60%; width:40%; height:100%;
  background:linear-gradient(120deg, transparent, rgba(217,178,111,.35), transparent);
  transform:skewX(-20deg);
  transition:left .85s cubic-bezier(.22,1,.36,1);
  pointer-events:none;
}
.elite-btn:hover::after{ left:130%; }

/* ===================== BASIC PAGE-PICKER STRIP ===================== */
/* Makes the "pick ONE" scope rule literal: Basic ships 3 pages, and the
   third one is the client's choice. Only rendered on Basic. */
.pick-bar{
  display:none;
  position:fixed; left:0; right:0; z-index:185;
  top:calc(var(--bar-h) + var(--header-h));
  height:var(--pick-h);
  background:var(--mist);
  border-bottom:1px solid var(--line);
}
html[data-tier="basic"] .pick-bar{ display:block; }
.pick-bar .wrap{ display:flex; align-items:center; gap:16px; height:100%; }
.pick-bar-label{
  font-family:'IBM Plex Mono',monospace; font-size:.66rem; letter-spacing:.06em;
  text-transform:uppercase; font-weight:600; color:var(--marine);
}
.pick-bar-label span{ color:var(--bay); text-transform:none; letter-spacing:0; font-weight:500; font-size:.72rem; }
.pick-opts{ display:flex; gap:6px; }
.pick-opt{
  padding:6px 14px; border-radius:999px; font-size:.78rem; font-weight:600;
  color:var(--marine); background:#fff; border:1px solid var(--line);
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.pick-opt:hover{ border-color:var(--bay); }
.pick-opt.active{ background:var(--marine); color:#fff; border-color:var(--marine); }
.pick-bar-note{ margin-left:auto; font-size:.74rem; color:var(--ink-mute); }

/* ===================== SITE HEADER ===================== */
.site-header{
  position:fixed; left:0; right:0; z-index:190;
  top:var(--bar-h);
  background:rgba(253,248,240,.93);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  transition:box-shadow var(--dur) var(--ease), background .35s ease, border-color .35s ease;
}
html[data-tier="plus"] .site-header,
html[data-tier="premium"] .site-header{ box-shadow:0 2px 20px rgba(11,61,92,.05); }

/* minus the 1px bottom border, so the header's total box is exactly --header-h */
.site-header .wrap{
  display:flex; align-items:center; justify-content:space-between;
  height:calc(var(--header-h) - 1px);
}

.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  width:38px; height:38px; border-radius:50%;
  background:linear-gradient(135deg, var(--marine), var(--bay));
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.1rem;
}
.brand-name{ font-family:'Fraunces', serif; font-weight:600; font-size:1.15rem; color:var(--marine); }
.brand-name span{
  display:block; font-family:'IBM Plex Mono',monospace; font-size:.6rem;
  letter-spacing:.15em; color:var(--bay); font-weight:500; text-transform:uppercase;
}

nav.main-nav{ display:flex; align-items:center; gap:2px; }
.nav-item{
  position:relative; padding:10px 12px; font-size:.86rem; font-weight:500;
  color:var(--tide); border-radius:8px;
  transition:background var(--dur) ease, color var(--dur) ease;
}
.nav-item:hover{ background:rgba(11,61,92,.06); }
.nav-item.active{ color:var(--bay); }
/* Locked reads as "not yours yet", not as a padlock sticker — muted weight
   and a tooltip do the job without cheapening the header. */
.nav-item.locked{ color:#9aa7ab; cursor:not-allowed; }
.nav-item.locked:hover{ background:rgba(154,167,171,.10); }
.nav-item[hidden]{ display:none; }

.nav-tooltip{
  position:absolute; top:calc(100% + 8px); left:50%;
  transform:translateX(-50%) translateY(4px);
  background:var(--tide); color:#fff; font-size:.7rem; padding:8px 12px; border-radius:8px;
  white-space:nowrap; opacity:0; pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  font-family:'IBM Plex Mono',monospace; letter-spacing:.02em;
}
.nav-tooltip::after{
  content:''; position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  border:5px solid transparent; border-bottom-color:var(--tide);
}
.nav-item.locked:hover .nav-tooltip{ opacity:1; transform:translateX(-50%) translateY(0); }

.header-cta{
  background:var(--marine); color:#fff; padding:11px 22px; border-radius:999px;
  font-size:.85rem; font-weight:600;
  transition:transform var(--dur) var(--ease), background .2s ease;
  white-space:nowrap;
}
.header-cta:hover{ background:var(--bay); transform:translateY(var(--lift)); }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; align-items:center; gap:5px;
  width:40px; height:40px; border-radius:8px; flex-shrink:0;
}
.nav-toggle span{
  display:block; width:22px; height:2px; background:var(--tide); border-radius:2px;
  transition:transform .25s ease, opacity .25s ease, background .35s ease;
}
.nav-toggle.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity:0; }
.nav-toggle.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ===================== MOBILE NAV ===================== */
.mobile-nav{
  display:none; flex-direction:column; max-height:0; overflow:hidden;
  background:var(--sand); border-top:1px solid var(--line);
  transition:max-height .35s ease;
}
.mobile-nav.open{ max-height:80vh; overflow-y:auto; }
.mobile-nav-item{
  padding:15px 28px; font-size:.95rem; font-weight:600; color:var(--tide);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
}
.mobile-nav-item.locked{ color:#9aa7ab; }
/* prints the unlocking tier ("Plus", "Premium", "Pick one") — no padlock */
.mobile-nav-item.locked::after{
  content:attr(data-lock);
  font-family:'IBM Plex Mono',monospace; font-size:.6rem; font-weight:600;
  letter-spacing:.06em; text-transform:uppercase;
  color:var(--bay); background:var(--mist);
  padding:4px 9px; border-radius:999px;
}
.mobile-nav-item[hidden]{ display:none; }
.mobile-nav-cta{
  margin:18px 28px 24px; background:var(--marine); color:#fff; text-align:center;
  padding:14px; border-radius:999px; font-weight:600; font-size:.9rem;
}

/* ===================== BUTTONS ===================== */
.btn-primary{
  background:var(--amber); color:var(--tide); padding:15px 30px; border-radius:999px;
  font-weight:600; font-size:.92rem; display:inline-block;
  transition:transform var(--dur) var(--ease), box-shadow var(--dur) ease;
}
.btn-primary:hover{ transform:translateY(var(--lift)); box-shadow:var(--shadow-lg); }
.btn-ghost{
  border:1.5px solid rgba(255,255,255,.5); color:#fff; padding:14px 28px; border-radius:999px;
  font-weight:600; font-size:.92rem;
  transition:background var(--dur) ease, transform var(--dur) var(--ease);
}
.btn-ghost:hover{ background:rgba(255,255,255,.12); transform:translateY(var(--lift)); }
.btn-dark{
  background:var(--marine); color:#fff; padding:14px 28px; border-radius:999px;
  font-weight:600; font-size:.9rem; display:inline-block;
  transition:background .2s ease, transform var(--dur) var(--ease);
}
.btn-dark:hover{ background:var(--bay); transform:translateY(var(--lift)); }
/* for light backgrounds — .btn-ghost assumes a dark hero underneath it */
.btn-outline{
  background:transparent; color:var(--marine); border:1.5px solid var(--marine);
  padding:12.5px 28px; border-radius:999px; font-weight:600; font-size:.9rem;
  display:inline-block;
  transition:background .2s ease, color .2s ease, transform var(--dur) var(--ease);
}
.btn-outline:hover{ background:var(--marine); color:#fff; transform:translateY(var(--lift)); }

/* ===================== CARDS ===================== */
.card-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.card-grid.cols-3{ grid-template-columns:repeat(3,1fr); }
.card-grid.cols-2{ grid-template-columns:repeat(2,1fr); }

.media-card{
  background:#fff; border-radius:var(--radius); overflow:hidden;
  box-shadow:var(--shadow); border:1px solid var(--line);
  transition:transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display:flex; flex-direction:column;
}
.media-card:hover{ transform:translateY(var(--lift)); box-shadow:var(--shadow-lg); }
.media-card .photo{ height:170px; overflow:hidden; position:relative; }
.media-card .photo img{ width:100%; height:100%; object-fit:cover; transition:transform .6s var(--ease); }
.media-card:hover .photo img{ transform:scale(var(--img-zoom)); }
.media-card .body{ padding:22px; display:flex; flex-direction:column; gap:8px; flex:1; }
.media-card h4{ font-size:1.05rem; }
.media-card p{ font-size:.86rem; color:var(--ink-soft); }
.media-card .price{
  margin-top:auto; padding-top:6px;
  font-family:'IBM Plex Mono',monospace; font-size:.72rem; color:var(--bay);
  font-weight:600; text-transform:uppercase; letter-spacing:.03em;
}

/* ===================== CAROUSEL (services rail) ===================== */
.carousel{ position:relative; }
.car-viewport{
  overflow-x:auto; overflow-y:hidden;
  /* Smoothness lives here; carousel.js just assigns scrollLeft.
     Deliberately NO scroll-snap: a mandatory snap container re-snaps a
     programmatic scroll back to the nearest point mid-flight, which killed the
     arrows entirely. Free-scroll drag still feels fine without it. */
  scroll-behavior:smooth;
  scrollbar-width:none;                 /* Firefox */
  -ms-overflow-style:none;              /* old Edge */
  /* the fade is a mask on the viewport itself, not a painted-on gradient box,
     so it works over any background and never leaves a visible seam */
  -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image:linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  padding:10px 0 20px;                  /* room for the cards' hover lift + shadow */
}
.car-viewport::-webkit-scrollbar{ display:none; }
.car-track{ display:flex; column-gap:24px; }
.car-track > *{ flex:0 0 clamp(250px, 26%, 290px); }

.car-btn{
  position:absolute; top:-64px; z-index:2;
  width:42px; height:42px; border-radius:50%;
  background:#fff; color:var(--marine);
  border:1px solid var(--line); box-shadow:var(--shadow);
  display:flex; align-items:center; justify-content:center;
  font-size:1.2rem; line-height:1;
  transition:background .2s ease, color .2s ease, transform var(--dur) var(--ease);
}
.car-btn:hover{ background:var(--marine); color:#fff; transform:translateY(-2px); }
.car-btn.prev{ right:60px; }
.car-btn.next{ right:0; }

/* ===================== SLIDER (reviews) ===================== */
.slider{ position:relative; }
/* padding, not none — the cards lift and cast a shadow on hover, and
   overflow:hidden would shave both off */
.slider-viewport{ overflow:hidden; padding:12px 0 24px; }
.slider-track{
  display:flex;
  transition:transform var(--dur) var(--ease);
}
.slider-slide{ flex:0 0 100%; min-width:0; }

.slider-arrow{
  position:absolute; top:50%; z-index:2;
  transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  background:#fff; color:var(--marine);
  border:1px solid var(--line); box-shadow:var(--shadow);
  display:flex; align-items:center; justify-content:center;
  font-size:1.3rem; line-height:1;
  transition:background .2s ease, color .2s ease;
}
.slider-arrow:hover{ background:var(--marine); color:#fff; }
.slider-arrow.prev{ left:-58px; }
.slider-arrow.next{ right:-58px; }

.slider-dots{ display:flex; justify-content:center; gap:9px; margin-top:34px; }
.slider-dot{
  width:8px; height:8px; border-radius:50%;
  background:rgba(11,61,92,.2);
  transition:background .25s ease, width .25s var(--ease);
}
.slider-dot:hover{ background:rgba(11,61,92,.4); }
.slider-dot.active{ background:var(--amber); width:24px; border-radius:999px; }

/* ===================== FORMS ===================== */
.contact-form{
  background:#fff; border-radius:var(--radius); padding:34px;
  box-shadow:var(--shadow); border:1px solid var(--line);
}
.form-row{ margin-bottom:18px; }
.form-row label{ display:block; font-size:.78rem; font-weight:600; color:var(--marine); margin-bottom:7px; }
.form-row input, .form-row select, .form-row textarea{
  width:100%; padding:13px 15px; border:1px solid #dbe4e7; border-radius:var(--radius-sm);
  font-family:inherit; font-size:.9rem; background:#fbfdfd;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus{
  outline:none; border-color:var(--bay); box-shadow:0 0 0 3px rgba(28,110,140,.12);
}
.form-submit{
  width:100%; background:var(--marine); color:#fff; padding:15px;
  border-radius:var(--radius-sm); font-weight:600; font-size:.92rem;
  transition:background .2s ease, transform var(--dur) var(--ease);
}
.form-submit:hover{ background:var(--bay); transform:translateY(var(--lift)); }
.form-note{
  text-align:center; font-size:.8rem; color:var(--bay);
  opacity:0; height:0; overflow:hidden; transition:opacity .3s ease;
}
.form-note.show{ opacity:1; height:auto; margin-top:12px; }

/* ===================== FOOTER ===================== */
footer{ background:var(--tide); color:#c6d3d8; padding:70px 0 30px; }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:40px; margin-bottom:46px; }
.footer-brand .brand-name{ color:#fff; }
.footer-brand .brand-name span{ color:#7fa1ad; }
.footer-brand p{ margin-top:14px; font-size:.86rem; color:#93a7ad; max-width:280px; }
.footer-col h5{
  color:#fff; font-family:'IBM Plex Mono',monospace; font-size:.72rem;
  text-transform:uppercase; letter-spacing:.06em; margin-bottom:16px;
}
.footer-col a{ display:block; font-size:.86rem; color:#a9bac0; margin-bottom:11px; transition:color .2s ease; }
.footer-col a:hover{ color:#fff; }
.footer-col a.locked{ color:#5f7178; cursor:not-allowed; }
.footer-col a[hidden]{ display:none; }
.footer-col p{ font-size:.86rem; color:#93a7ad; margin-bottom:10px; }
.footer-bottom{
  border-top:1px solid #223840; padding-top:24px;
  display:flex; justify-content:space-between; font-size:.78rem; color:#7c9098;
  flex-wrap:wrap; gap:10px;
}

/* ===================== FICTIONAL-COMPANY DISCLAIMER ===================== */
/* Sits above every other overlay (cms-panel is the next-highest at 600) since
   it needs to be the very first thing a visitor sees. */
.disclaimer-modal{
  position:fixed; inset:0; z-index:900;
  display:flex; align-items:center; justify-content:center; padding:24px;
  background:rgba(15,31,38,.72); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity .35s ease;
}
.disclaimer-modal.show{ opacity:1; pointer-events:auto; }
.disclaimer-card{
  background:#fff; border-radius:16px; padding:40px 42px;
  width:min(440px, 100%); text-align:left;
  box-shadow:0 40px 90px rgba(0,0,0,.35);
  transform:translateY(12px) scale(.98);
  transition:transform .4s cubic-bezier(.22,1,.36,1);
}
.disclaimer-modal.show .disclaimer-card{ transform:none; }
.disclaimer-card h3{ font-size:1.3rem; margin-bottom:14px; }
.disclaimer-card p{ font-size:.9rem; color:var(--ink-soft); line-height:1.6; margin-bottom:26px; }
.disclaimer-card p strong{ color:var(--marine); }
.disclaimer-card .btn-primary{ width:100%; text-align:center; }

/* ===================== OVERLAYS ===================== */
.upgrade-flash{
  position:fixed; inset:0; z-index:500;
  display:flex; align-items:center; justify-content:center;
  background:rgba(11,61,92,.92);
  opacity:0; pointer-events:none; transition:opacity .35s ease;
}
.upgrade-flash.show{ opacity:1; }
.flash-card{
  background:#fff; border-radius:16px; padding:38px 54px; text-align:center;
  transform:scale(.85) translateY(10px);
  transition:transform .4s cubic-bezier(.22,1,.36,1);
  box-shadow:0 30px 80px rgba(0,0,0,.35);
}
.upgrade-flash.show .flash-card{ transform:scale(1) translateY(0); }
.flash-card .flash-icon{ font-size:2.4rem; margin-bottom:10px; }
.flash-card h3{ font-size:1.6rem; margin-bottom:6px; }
.flash-card p{
  color:var(--bay); font-family:'IBM Plex Mono',monospace; font-size:.75rem;
  letter-spacing:.05em; text-transform:uppercase;
}

.toast{
  position:fixed; left:50%; bottom:32px; z-index:400;
  transform:translateX(-50%) translateY(16px);
  background:var(--tide); color:#fff; padding:14px 24px; border-radius:12px;
  box-shadow:0 16px 40px rgba(0,0,0,.28);
  display:flex; align-items:center; gap:12px; max-width:min(92vw, 500px);
  opacity:0; pointer-events:none; transition:opacity .3s ease, transform .3s ease;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast .toast-icon{
  font-size:.9rem; flex-shrink:0; font-weight:700;
  width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.12);
}
.toast .toast-text{ font-size:.84rem; line-height:1.4; }
.toast .toast-text strong{ color:var(--amber); }
.toast.toast-ok .toast-text strong{ color:#7fd8a0; }

/* ===================== CMS ===================== */
/* A region only lights up when BOTH are true: the CMS view is on, and the
   client actually bought that module (.cms-live, set from their picks). An
   unbought module stays inert — that's the whole point of the slot limit. */
.cms-region{ position:relative; }
html.cms-on .cms-region.cms-live{
  outline:2px dashed var(--amber);
  outline-offset:5px;
  border-radius:var(--radius-sm);
}
.cms-badge{
  position:absolute; top:8px; left:8px; z-index:6;
  display:none; align-items:center; gap:6px;
  background:var(--amber); color:var(--tide);
  padding:5px 11px; border-radius:999px;
  font-family:'IBM Plex Mono',monospace; font-size:.6rem; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase;
  box-shadow:0 4px 12px rgba(0,0,0,.2);
}
html.cms-on .cms-live > .cms-badge{ display:inline-flex; }

/* The hero is full-bleed with overflow:hidden, so an offset outline would be
   invisible — it gets an inset ring instead, and its chrome sits at the
   bottom-left (clear of the fixed header, and of Premium's switcher row). */
html.cms-on .hero.cms-live{
  outline:none;
  box-shadow:inset 0 0 0 3px var(--amber);
}
.hero > .cms-badge{ top:auto; bottom:76px; left:28px; }
.hero > .cms-controls{ inset:auto auto 28px 28px; justify-content:flex-start; }

.cms-controls{
  position:absolute; inset:auto 8px 8px 8px; z-index:6;
  display:none; gap:6px; justify-content:center; flex-wrap:wrap;
  /* faded until the region is actually being worked on, so the buttons don't
     sit on top of the title/caption text underneath them the rest of the time */
  opacity:.5; transition:opacity .18s ease;
}
html.cms-on .cms-live > .cms-controls{ display:flex; }
html.cms-on .cms-live:hover > .cms-controls,
html.cms-on .cms-live:focus-within > .cms-controls{ opacity:1; }

.cms-btn{
  background:rgba(15,31,38,.78); color:#fff;
  backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px);
  padding:7px 13px; border-radius:999px;
  font-family:'IBM Plex Mono',monospace; font-size:.62rem; font-weight:600;
  letter-spacing:.05em; text-transform:uppercase;
  box-shadow:0 6px 16px rgba(0,0,0,.28);
  transition:background .2s ease, transform .18s ease;
}
.cms-btn:hover{ background:var(--marine); transform:translateY(-2px); }
.cms-btn.amber{ background:var(--amber); color:var(--tide); }
.cms-btn.amber:hover{ background:#f0b96f; }
.cms-btn.danger:hover{ background:#a5342c; }
.cms-btn.on{ background:#2e8b57; color:#fff; }

/* live text editing */
.cms-editing [contenteditable]{
  outline:2px solid var(--amber); outline-offset:3px;
  border-radius:4px; cursor:text;
}
.cms-fresh{ animation:freshIn .5s cubic-bezier(.22,1,.36,1); }

/* section-level "add another" button */
.cms-add{ display:none; margin-top:26px; }
html.cms-on .cms-add.cms-live{ display:inline-flex; align-items:center; gap:8px; }

/* Premium-only: publish a post. Premium's blog is editable on top of its
   5 module slots, so this needs no pick. */
.cms-publish{ display:none; margin-bottom:26px; }
html.cms-on[data-tier="premium"] .cms-publish{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.cms-publish p{ font-size:.82rem; color:var(--ink-soft); }

/* ===================== CMS PANEL ("See what I can edit") ===================== */
.cms-panel{
  position:fixed; inset:0; z-index:600;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
  background:rgba(11,61,92,.55); backdrop-filter:blur(4px);
  opacity:0; pointer-events:none; transition:opacity .28s ease;
}
.cms-panel.show{ opacity:1; pointer-events:auto; }

.cms-panel-card{
  background:var(--sand); border-radius:18px;
  width:min(720px, 100%); max-height:86vh;
  display:flex; flex-direction:column; overflow:hidden;
  box-shadow:0 40px 90px rgba(0,0,0,.4);
  transform:translateY(14px) scale(.98);
  transition:transform .32s cubic-bezier(.22,1,.36,1);
}
.cms-panel.show .cms-panel-card{ transform:none; }

.cms-panel-head{
  padding:26px 28px 20px; border-bottom:1px solid var(--line);
  background:#fff; position:relative;
}
.cms-panel-head h3{ font-size:1.45rem; margin-bottom:6px; padding-right:36px; }
.cms-panel-head p{ font-size:.88rem; color:var(--ink-soft); }
.cms-panel-close{
  position:absolute; top:20px; right:20px;
  width:32px; height:32px; border-radius:50%;
  background:var(--mist); color:var(--marine); font-size:1rem;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s ease;
}
.cms-panel-close:hover{ background:var(--marine); color:#fff; }

.cms-count{
  display:inline-block; margin-top:14px;
  font-family:'IBM Plex Mono',monospace; font-size:.68rem; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase;
  background:var(--mist); color:var(--marine);
  padding:6px 13px; border-radius:999px;
}
.cms-count.full{ background:var(--amber); color:var(--tide); }

.cms-panel-body{ overflow-y:auto; padding:22px 28px 8px; }

.cms-group-head{
  font-family:'IBM Plex Mono',monospace; font-size:.65rem; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; color:var(--bay);
  margin:10px 0 12px;
}
.cms-group-head:not(:first-child){ margin-top:26px; }

.cms-row{
  display:flex; gap:14px; align-items:flex-start;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px; margin-bottom:10px; cursor:pointer;
  transition:border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.cms-row:hover{ border-color:var(--bay); box-shadow:var(--shadow); }
.cms-row.picked{ border-color:var(--amber); background:#fffdf8; }
.cms-row.disabled{ opacity:.45; cursor:not-allowed; }
.cms-row.disabled:hover{ border-color:var(--line); box-shadow:none; }
.cms-row.standard{ cursor:default; background:var(--mist); border-color:transparent; }
.cms-row.standard:hover{ border-color:transparent; box-shadow:none; }

.cms-check{
  flex-shrink:0; width:22px; height:22px; border-radius:6px; margin-top:2px;
  border:1.5px solid #c3d0d6; background:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:.75rem; font-weight:700; color:#fff;
  transition:background .2s ease, border-color .2s ease;
}
.cms-row.picked .cms-check{ background:var(--amber); border-color:var(--amber); color:var(--tide); }
.cms-row.standard .cms-check{ background:var(--bay); border-color:var(--bay); color:#fff; }

.cms-row-body h4{
  font-size:1rem; margin-bottom:4px;
  display:flex; align-items:baseline; gap:9px; flex-wrap:wrap;
}
.cms-row-body h4 em{
  font-family:'IBM Plex Mono',monospace; font-style:normal;
  font-size:.6rem; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-mute);
}
.cms-row-body p{ font-size:.85rem; color:var(--ink-soft); margin-bottom:9px; }

.cms-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.cms-chip{
  font-family:'IBM Plex Mono',monospace; font-size:.58rem; font-weight:600;
  letter-spacing:.05em; text-transform:uppercase;
  background:var(--mist); color:var(--bay);
  padding:4px 9px; border-radius:999px;
}
.cms-row.standard .cms-chip{ background:#fff; }

/* the "this demo is simplified" disclaimer above the footer */
.cms-note{
  flex-shrink:0;
  margin:6px 28px 0;
  padding:14px 16px;
  background:var(--mist); border-left:3px solid var(--bay);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  font-size:.82rem; line-height:1.5; color:var(--ink-soft);
}
.cms-note strong{ color:var(--marine); }

.cms-panel-foot{
  padding:18px 28px; border-top:1px solid var(--line); background:#fff;
  margin-top:18px;
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
}
.cms-panel-foot p{ font-size:.8rem; color:var(--ink-mute); }
