/* Deliberately plain: system fonts, white background, simple controls */
body[data-view="offline"] {
    background: #ffffff;
    color: #222222;
    font: 14px/1.5 Arial, Helvetica, sans-serif;
}

#offline-site {
    background: #ffffff;
    color: #222222;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
}

.off-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.off-header {
    border-bottom: 1px solid #cccccc;
    background: #f8f9fa;
}

.off-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    gap: 16px;
    flex-wrap: wrap;
}

.off-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: #222222;
    text-decoration: none;
}

.off-logo__box {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: #444444;
    color: #ffffff;
    font-size: 13px;
}

#offline-site nav ul {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#offline-site nav a {
    color: #0645ad;
    text-decoration: underline;
    font-size: 13px;
}

/* Tight, Compact Offline Hero Section */
.off-hero {
    padding: 12px 0;               /* Reduced vertical height */
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.off-hero-box {
    border: 1px solid #cccccc;
    background: #fafafa;
    padding: 10px 16px;            /* Tight inner padding */
    border-radius: 6px;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.off-title-compact {
    font-size: 0.95rem;            /* Smaller, compact font size */
    line-height: 1.25;
    margin: 0 0 4px;              /* Minimal bottom margin */
    font-weight: 700;
    color: #111111;
}

.off-lead {
    font-size: 0.8rem;             /* Compact lead text */
    margin: 0 0 8px;              /* Tight margin above switch */
    color: #555555;
}

/* The ON / OFF switch in the offline hero: big and obvious */
.off-hero .switch-wrap {
    gap: 8px;
}

.off-hero .mode-switch {
    padding: 12px 24px;
    font-size: 16px;
    gap: 14px;
    border-width: 3px;
    box-shadow: 0 3px 0 #1f2937;
}

.off-hero .ms-track {
    width: 72px;
    height: 34px;
}

.off-hero .ms-knob {
    width: 26px;
    height: 26px;
    top: 4px;
    left: 4px;
}

.off-hero .mode-switch[aria-checked="true"] .ms-knob {
    transform: translateX(38px);
}

.off-hero .ms-label--on {
    color: #15803d;
}

.off-hero .mode-status {
    font-size: 12px;
}

/* Attention pulse while the intro popup is showing */
.mode-switch.is-spotlight {
    animation: off-pulse 1.3s ease-out infinite;
}

@keyframes off-pulse {
    0%   { box-shadow: 0 3px 0 #1f2937, 0 0 0 0 rgba(21, 128, 61, .65); }
    70%  { box-shadow: 0 3px 0 #1f2937, 0 0 0 16px rgba(21, 128, 61, 0); }
    100% { box-shadow: 0 3px 0 #1f2937, 0 0 0 0 rgba(21, 128, 61, 0); }
}

/* Intro popup (created by intro.js) */
.off-coach {
    position: absolute;
    z-index: 90;
    box-sizing: border-box;
    padding: 18px 20px 16px;
    border-radius: 12px;
    background: #1f2937;
    color: #ffffff;
    font: 15px/1.5 Arial, Helvetica, sans-serif;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
    animation: off-coach-in .45s cubic-bezier(.2, 1.4, .4, 1);
}

.off-coach::before {
    content: "";
    position: absolute;
    top: -9px;
    left: var(--ax, 50%);
    width: 18px;
    height: 18px;
    background: #1f2937;
    transform: translateX(-50%) rotate(45deg);
}

.off-coach strong {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
}

.off-coach p {
    margin: 0 0 12px;
}

.off-coach b {
    color: #4ade80;
}

.off-coach__ok {
    font: inherit;
    font-weight: 700;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: #4ade80;
    color: #052e16;
    cursor: pointer;
}

.off-coach__ok:hover {
    background: #86efac;
}

@keyframes off-coach-in {
    from { opacity: 0; transform: translateY(12px) scale(.94); }
    to   { opacity: 1; transform: none; }
}

/* Sections */
.off-sec {
    padding: 24px 0;
    border-bottom: 1px solid #eeeeee;
}

.off-sec h2 {
    margin: 0 0 14px;
    font-size: 1.2rem;
    color: #111111;
}

/* Service Tabs System */
.off-tabs-wrapper {
    border: 1px solid #cccccc;
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
}

.off-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    background: #f1f3f5;
    border-bottom: 1px solid #cccccc;
}

.off-tab-btn {
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-right: 1px solid #dddddd;
    border-bottom: 2px solid transparent;
    color: #444444;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.off-tab-btn:hover {
    background: #e9ecef;
    color: #111111;
}

.off-tab-btn.is-active {
    background: #ffffff;
    color: #0645ad;
    border-bottom: 2px solid #0645ad;
}

.off-tabs-content {
    padding: 20px;
}

.off-tab-panel {
    display: none;
}

.off-tab-panel.is-active {
    display: block;
}

.off-tab-panel h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: #111111;
}

.off-tab-panel p {
    margin: 0;
    font-size: 0.9rem;
    color: #444444;
    line-height: 1.5;
}

/* Form Styles */
.off-btn {
    font: inherit;
    padding: 8px 16px;
    background: #e5e5e5;
    border: 1px solid #888888;
    border-radius: 3px;
    cursor: pointer;
}

.off-btn:hover {
    background: #d8d8d8;
}

#offline-site .field input,
#offline-site .field select,
#offline-site .field textarea {
    border: 1px solid #888888;
    background: #ffffff;
    color: #222222;
    border-radius: 2px;
}

.off-footer {
    padding: 16px 0;
    background: #f8f9fa;
    color: #666666;
    font-size: 12px;
}

@media (max-width: 600px) {
    .off-tabs-bar { flex-direction: column; }
    .off-tab-btn { width: 100%; border-right: none; border-bottom: 1px solid #dddddd; text-align: left; }
}

/* Service tab panel content */
.off-tab-panel h3 { font-size: 1.15rem; padding-bottom: 8px; border-bottom: 1px solid #e5e5e5; margin-bottom: 12px; }
.off-tab-panel h4 { margin: 16px 0 6px; font-size: 0.9rem; color: #111111; }
.off-tab-panel p + p { margin-top: 10px; }
.off-panel-lead { font-weight: 600; color: #222222 !important; }
.off-list { margin: 0 0 4px; padding-left: 20px; font-size: 0.9rem; color: #444444; line-height: 1.6; }
.off-list li { margin: 2px 0; }
.off-note { margin-top: 14px !important; padding: 8px 12px; background: #f6f6f6; border-left: 3px solid #888888; font-size: 0.85rem !important; }
.off-more { margin-top: 14px !important; }
.off-more a { color: #0645ad; font-size: 0.85rem; }

/* Skip the build animation: always visible, for repeat visitors */
.off-skip-wrap {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-width: min(300px, calc(100vw - 32px));
}

.off-skip-hint {
    position: relative;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    border: 2px solid #1f2937;
    font: 600 14px/1.4 Arial, Helvetica, sans-serif;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}

/* little arrow pointing down at the button */
.off-skip-hint::after {
    content: "";
    position: absolute;
    bottom: -9px;
    right: 44px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-right: 2px solid #1f2937;
    border-bottom: 2px solid #1f2937;
    transform: rotate(45deg);
}

.off-skip {
    padding: 16px 30px;
    border-radius: 999px;
    background: #15803d;
    color: #ffffff;
    font: 700 18px/1 Arial, Helvetica, sans-serif;
    letter-spacing: .02em;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(21, 128, 61, .45), 0 0 0 3px #ffffff;
    transition: background .2s, transform .2s;
    animation: off-skip-pulse 2.2s ease-out infinite;
}

.off-skip:hover {
    background: #166534;
    transform: translateY(-2px);
    animation-play-state: paused;
}

.off-skip:focus-visible {
    outline: 3px solid #1f2937;
    outline-offset: 4px;
}

@keyframes off-skip-pulse {
    0%   { box-shadow: 0 8px 24px rgba(21, 128, 61, .45), 0 0 0 3px #ffffff, 0 0 0 3px rgba(21, 128, 61, .6); }
    70%  { box-shadow: 0 8px 24px rgba(21, 128, 61, .45), 0 0 0 3px #ffffff, 0 0 0 16px rgba(21, 128, 61, 0); }
    100% { box-shadow: 0 8px 24px rgba(21, 128, 61, .45), 0 0 0 3px #ffffff, 0 0 0 3px rgba(21, 128, 61, 0); }
}

/* hide it while the build or the return-to-offline animation runs */
body.is-transforming .off-skip-wrap,
body.is-locked .off-skip-wrap {
    display: none;
}

@media (max-width: 600px) {
    .off-skip { padding: 14px 24px; font-size: 16px; }
    .off-skip-hint { font-size: 13px; }
}