.lifting-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 1rem 4rem;
}

/* Hamburger menu — absolutely positioned in the top-right of the page header.
   The page-header is `position: relative`, so this anchors cleanly without the
   iOS quirks that affect `position: fixed` under transformed ancestors. */
.menu-button {
    position: absolute;
    top: 1rem;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.18);
    background: #ffffff;
    color: #111;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}
.menu-button .bars-svg { display: block; }

.menu-panel {
    position: absolute;
    top: calc(1rem + 44px + 0.4rem);  /* page-header padding-top + button height + gap */
    right: 0;
    left: auto;
    z-index: 999;
    min-width: 240px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding: 0.4rem;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.15);
    background: #ffffff;
    color: #111;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.menu-panel[hidden] { display: none; }
.menu-panel a {
    display: block;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm, 10px);
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.3;
}
.menu-panel a:hover,
.menu-panel a:focus-visible { background: rgba(127,127,127,0.15); }

.lifting-page .page-header {
    padding: 1rem 0 1.25rem;
    text-align: left;
    position: relative;   /* containing block for the absolute menu panel */
}

/* Brand logo replacing the H1 text — spans the same width as the camera viewport below it */
.lifting-page .brand-h1 {
    margin: 0.5rem 0 0.75rem;
    line-height: 0;
}
.lifting-page .brand-logo {
    display: block;
    width: 100%;
    height: auto;
}

.lifting-page .page-header h1 { font-size: 1.5rem; }
.lifting-page .page-header p {
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* ===== Camera viewport ===== */
.viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #0b1020;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.viewport .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    gap: 12px;
    padding: 1.5rem;
    text-align: center;
}

.viewport .placeholder .big { font-size: 2.4rem; }
.viewport.live .placeholder { display: none; }

/* Centred angle indicator — visible only while the camera is running */
.viewport .angle-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font: 700 clamp(48px, 14vw, 96px) var(--font, system-ui, sans-serif);
    color: rgba(255,255,255,0.95);
    text-shadow:
        0 2px 10px rgba(0,0,0,0.65),
        0 0 2px rgba(0,0,0,0.85);
    letter-spacing: -0.02em;
    pointer-events: none;
    user-select: none;
    display: none;
}
.viewport.live .angle-indicator { display: block; }

.overlay-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.overlay-svg .ref-line {
    stroke: rgba(255,255,255,0.5);
    stroke-width: 1.5;
    stroke-dasharray: 6 5;
    transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

.overlay-svg .ref-line.active {
    stroke: #fff59d;
    stroke-width: 2.5;
    stroke-dasharray: none;
}

.overlay-svg .ref-line.plumb {
    stroke: rgba(255,255,255,0.35);
    stroke-dasharray: 2 4;
}

.overlay-svg .ref-line.plumb.active {
    stroke: #fff59d;
    stroke-width: 2.5;
    stroke-dasharray: none;
}

.overlay-svg .ref-label {
    fill: rgba(255,255,255,0.85);
    font: 600 7px var(--font);
    paint-order: stroke;
    stroke: rgba(0,0,0,0.65);
    stroke-width: 1.6px;
    stroke-linejoin: round;
}

/* Mode pill (top-right of viewport) */
.cam-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}

.cam-controls button {
    background: rgba(15, 17, 35, 0.72);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.cam-controls button:active { transform: scale(0.96); }

#btnCapture {
    background: rgba(99,102,241,0.92);
    border-color: rgba(255,255,255,0.3);
    padding: 8px 16px;
    font-size: 0.82rem;
}

/* Flash animation on capture */
.flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}
.flash.fire { animation: flash 0.35s ease-out; }
@keyframes flash {
    0%   { opacity: 0; }
    20%  { opacity: 0.85; }
    100% { opacity: 0; }
}

/* ===== Action bar ===== */
.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.action-row .btn { flex: 1; padding: 14px; font-size: 1rem; }

/* ===== Lookup ===== */
.lookup-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.lookup-card h2 {
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.picker { margin-bottom: 14px; }

/* Angle picker placed under the camera, outside the lookup card */
.picker-standalone {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.picker label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.picker label .hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Segmented button groups */
.seg-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.seg-group.seg-angle { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 480px) {
    .seg-group { grid-template-columns: repeat(4, 1fr); }
}

.seg-group button {
    appearance: none;
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 10px;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.2;
}

.seg-group button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.seg-group button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(99,102,241,0.25);
}

.seg-group button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* WLL result */
.wll-result {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    margin-top: 4px;
}

.wll-result .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-hover);
    font-weight: 600;
}

.wll-result .big-value {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 4px 0;
}

.wll-result .big-value .unit {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-left: 6px;
    font-weight: 500;
}

.wll-result .config {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wll-result.danger { background: #fef2f2; }
.wll-result.danger .label { color: var(--error); }
.wll-result.danger .big-value { color: var(--error); }

/* Band hint */
.band-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 6px 10px;
    background: var(--primary-light);
    color: var(--primary-hover);
    border-radius: 999px;
    font-weight: 500;
    margin-top: 10px;
}

.band-hint.warn  { background: #fff7ed; color: #c2410c; }
.band-hint.error { background: #fef2f2; color: var(--error); }

#anglePicker.disabled label { opacity: 0.5; }

/* ===== Fibre colour swatch grid ===== */
.colour-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (min-width: 480px) {
    .colour-grid { grid-template-columns: repeat(4, 1fr); }
}

.colour-swatch {
    appearance: none;
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 14px 8px 10px;
    cursor: pointer;
    text-align: center;
    color: #fff;
    font-family: var(--font);
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-sm);
    line-height: 1.1;
    position: relative;
}

.colour-swatch .name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.9;
    margin-bottom: 2px;
}

.colour-swatch .wll {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.colour-swatch .dia {
    display: block;
    font-size: 0.68rem;
    opacity: 0.75;
    margin-top: 2px;
    font-weight: 500;
}

.colour-swatch:hover { transform: translateY(-2px); }

.colour-swatch.active {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.35), var(--shadow-md);
    transform: translateY(-2px);
}

.disclaimer {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .wll-result .big-value { font-size: 2.2rem; }
}

/* ===== Wind load card ===== */
.hint-inline {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 4px;
}

.formula {
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wind-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

@media (max-width: 480px) {
    .wind-grid { grid-template-columns: 1fr; }
}

.suffix-input {
    position: relative;
}

.suffix-input input {
    padding-right: 38px;
}

.suffix-input span {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
}

.wind-result {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-lighter));
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wind-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.92rem;
}

.wind-row .rk {
    color: var(--text-secondary);
}

.wind-row .rv {
    font-weight: 600;
    color: var(--text);
}

.wind-row .unit {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.82rem;
    margin-left: 2px;
}

.wind-row.total {
    border-top: 1px solid rgba(99,102,241,0.2);
    padding-top: 8px;
    margin-top: 4px;
}

.wind-row.total .rk {
    color: var(--primary-hover);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.wind-row.total .rv {
    font-size: 1.4rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ===== About / SEO content block ===== */
.about {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.about h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text);
}

.about p { margin-bottom: 10px; }

.about ul {
    padding-left: 1.1rem;
    margin: 0 0 10px;
}

.about li { margin-bottom: 4px; }

.about strong { color: var(--text); }

.about .lang-no {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* ===== Liability notice ===== */
.notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: linear-gradient(180deg, #fffaf2, #fff7ed);
    border: 1px solid #fed7aa;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.notice-icon {
    font-size: 1.5rem;
    line-height: 1;
    color: #b45309;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-body { flex: 1; }

.notice-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.notice-body p {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.55;
    margin: 0 0 8px;
}

.notice-body p:last-child { margin-bottom: 0; }
