:root {
    color-scheme: light;
    --navy-950: #090f32;
    --navy-900: #11194f;
    --navy-800: #20296d;
    --indigo-600: #4b55c5;
    --coral-600: #d73f35;
    --coral-500: #f45443;
    --mint-500: #1d8f7c;
    --mint-100: #dff8f1;
    --ink: #14182d;
    --muted: #5c627b;
    --surface: #ffffff;
    --surface-soft: #f3f4fa;
    --line: #d8dbea;
    --focus: #0067c5;
    --danger: #a52822;
    --shadow: 0 24px 60px rgb(25 31 78 / 12%);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #f6f7fb;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 0%, rgb(116 126 235 / 18%), transparent 28rem),
        linear-gradient(180deg, #f8f8fd 0%, #f2f4f9 100%);
    line-height: 1.55;
    overflow-x: hidden;
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
}

[hidden] {
    display: none !important;
}

a {
    color: #3541a9;
    text-underline-offset: 0.18em;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 0.9rem;
    background: var(--surface);
    border-radius: 0.5rem;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header,
.site-footer,
.page-container {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    min-height: 5rem;
    padding-top: env(safe-area-inset-top);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--navy-900);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.brand img {
    border-radius: 11px;
    box-shadow: 0 7px 18px rgb(17 25 79 / 22%);
}

.page-container {
    padding-block: clamp(1rem, 4vw, 3rem) 4rem;
}

.app-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
    gap: 1.25rem;
    align-items: start;
}

.hero {
    grid-column: 1 / -1;
    max-width: 48rem;
    padding-block: 1rem 1.5rem;
}

.eyebrow,
.section-kicker {
    margin: 0 0 0.4rem;
    color: var(--indigo-600);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    color: var(--navy-950);
    line-height: 1.12;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

h1 {
    margin: 0;
    font-size: clamp(2.75rem, 10vw, 5.5rem);
    letter-spacing: -0.065em;
}

.lead {
    margin: 0.4rem 0 0;
    color: var(--navy-800);
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.hero-copy {
    max-width: 42rem;
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.card,
.content-card {
    border: 1px solid rgb(216 219 234 / 88%);
    border-radius: var(--radius-lg);
    background: rgb(255 255 255 / 94%);
    box-shadow: var(--shadow);
}

.control-card {
    padding: clamp(1.15rem, 4vw, 2rem);
}

.section-label {
    margin: 0 0 0.7rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.status-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--navy-950);
    font-weight: 750;
}

.status-symbol {
    display: grid;
    flex: 0 0 2rem;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 2px solid currentcolor;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
}

.status-panel[data-state="ready"] {
    border-color: #9ea4de;
    background: #eff0ff;
}

.status-panel[data-state="active"] {
    border-color: #88cabb;
    background: var(--mint-100);
    color: #126b5d;
}

.status-panel[data-state="blocked"],
.status-panel[data-state="error"] {
    border-color: #e3a49f;
    background: #fff0ee;
    color: var(--danger);
}

.guide-panel,
.countdown-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #c9cdec;
    border-radius: var(--radius-md);
    background: #f5f5ff;
}

.guide-panel h3,
.guide-panel p {
    margin-top: 0;
}

.guide-panel p:last-child {
    margin-bottom: 0;
}

.guide-panel ol {
    margin: 0.7rem 0;
    padding-left: 1.4rem;
}

.guide-panel li + li {
    margin-top: 0.35rem;
}

.action-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.device-name-panel {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.device-name-panel label {
    color: var(--navy-950);
    font-weight: 800;
}

.device-name-panel input {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #aeb3c9;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--ink);
}

.device-name-panel > p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.device-name-panel .button {
    justify-self: start;
    min-height: 2.8rem;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 3.25rem;
    padding: 0.75rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:active:not(:disabled) {
    transform: translateY(0);
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.button-primary {
    background: var(--navy-900);
    color: #fff;
    box-shadow: 0 10px 24px rgb(17 25 79 / 20%);
}

.button-primary:hover:not(:disabled) {
    background: #1c276b;
}

.button-accent {
    width: 100%;
    background: var(--coral-600);
    color: #fff;
    box-shadow: 0 10px 24px rgb(215 63 53 / 18%);
}

.button-accent:hover:not(:disabled) {
    background: #bd3028;
}

.button-secondary {
    border-color: #aeb3da;
    background: #fff;
    color: var(--navy-900);
}

.button-quiet {
    width: 100%;
    min-height: 2.8rem;
    margin-top: 0.8rem;
    border-color: transparent;
    background: transparent;
    color: #555b75;
    font-size: 0.92rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.schedule-controls {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.schedule-controls legend {
    padding-inline: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.delay-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.delay-options label {
    position: relative;
}

.delay-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.delay-options span {
    display: grid;
    min-height: 2.7rem;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: #fff;
    color: var(--navy-900);
    font-weight: 750;
    cursor: pointer;
}

.delay-options input:checked + span {
    border-color: var(--navy-900);
    background: #e9ebff;
    box-shadow: inset 0 0 0 1px var(--navy-900);
}

.delay-options input:focus-visible + span {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.schedule-controls:disabled {
    opacity: 0.58;
}

.countdown-panel {
    display: grid;
    gap: 0.2rem;
    border-color: #85c8b9;
    background: var(--mint-100);
    color: #175e54;
}

.countdown-title {
    color: #0d5147;
    font-size: 1.05rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.small-copy {
    min-height: 1.4rem;
    margin-top: 0.65rem !important;
    color: var(--muted);
    font-size: 0.9rem;
}

.clipboard-helper {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.log-card {
    padding: 1.35rem;
}

.section-heading-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading-row h2 {
    margin: 0;
    font-size: 1.4rem;
}

.text-button {
    padding: 0.3rem;
    border: 0;
    background: transparent;
    color: #4f5672;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.event-log {
    display: grid;
    gap: 0.75rem;
    margin: 1.1rem 0 0;
    padding: 0;
    list-style: none;
}

.event-log li {
    position: relative;
    padding: 0.1rem 0 0.1rem 2rem;
    color: #30364f;
}

.event-log li::before {
    position: absolute;
    top: 0.15rem;
    left: 0;
    display: grid;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border-radius: 50%;
    background: var(--mint-100);
    color: #126b5d;
    content: "✓";
    font-size: 0.75rem;
    font-weight: 900;
}

.event-log li[data-kind="error"]::before {
    background: #fff0ee;
    color: var(--danger);
    content: "!";
}

.event-log time {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.empty-log {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.privacy-note {
    grid-column: 1 / -1;
    padding: 0.4rem 0.3rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.content-card {
    max-width: 48rem;
    margin-inline: auto;
    padding: clamp(1.25rem, 5vw, 2.5rem);
}

.content-card h1 {
    font-size: clamp(2rem, 7vw, 3.5rem);
}

.content-card h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.inline-button {
    margin-top: 1rem;
}

.received-card {
    text-align: center;
}

.presenter-card h1 {
    margin-bottom: 1rem;
}

.presenter-message {
    padding: 0.8rem 1rem;
    border: 1px solid #aeb3da;
    border-radius: 0.8rem;
    background: #f2f3ff;
    font-weight: 700;
}

.presenter-form,
.presenter-actions {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.presenter-form label {
    font-weight: 750;
}

.presenter-form input,
.presenter-message-fields input,
.presenter-message-fields textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #aeb3c9;
    border-radius: 0.75rem;
    background: #fff;
    color: var(--ink);
}

.presenter-message-fields textarea {
    min-height: 7rem;
    resize: vertical;
}

.presenter-fallback {
    margin-top: 1.5rem;
}

.presenter-fallback summary {
    cursor: pointer;
    font-weight: 750;
}

.presenter-email {
    margin: 2rem 0 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.presenter-email h2 {
    margin-top: 0;
}

.presenter-note {
    margin: 1.5rem 0;
    color: var(--muted);
}

.presenter-summary {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 1.4rem 0;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--mint-100);
    color: #126b5d;
}

.presenter-summary strong {
    font-size: 2rem;
}

.presenter-push {
    margin-top: 2rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--line);
}

.presenter-push h2 {
    margin-bottom: 0.5rem;
}

.presenter-push-form,
.presenter-message-fields {
    display: grid;
    gap: 0.8rem;
}

.presenter-push-form {
    margin-top: 1.25rem;
}

.presenter-message-fields label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 800;
}

.presenter-message-fields label span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.presenter-recipients {
    min-width: 0;
    margin: 0.5rem 0 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.presenter-recipients legend {
    padding-inline: 0.4rem;
    font-weight: 800;
}

.device-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.device-list label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: #fff;
    cursor: pointer;
}

.device-list label:hover {
    border-color: #aeb3da;
    background: #f8f8ff;
}

.device-list input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--navy-900);
}

.device-list span {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.device-list strong {
    font-weight: 800;
}

.device-list time {
    color: var(--muted);
    font-size: 0.85rem;
}

.success-mark {
    display: grid;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    background: var(--mint-100);
    color: #126b5d;
    font-size: 2rem;
    font-weight: 900;
}

.sent-time {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.sent-time dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 750;
    text-transform: uppercase;
}

.sent-time dd {
    margin: 0.25rem 0 0;
    font-weight: 750;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.4rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
}

@media (max-width: 760px) {
    .site-header,
    .site-footer,
    .page-container {
        width: min(100% - 1.25rem, 72rem);
    }

    .site-header {
        min-height: 4.4rem;
    }

    .page-container {
        padding-top: 0.25rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 0.75rem;
    }

    .control-card,
    .log-card {
        border-radius: 20px;
    }

    .site-footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
