:root {
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --primary-dark: #075985;
    --secondary: #0d9488;
    --secondary-hover: #0f766e;
    --accent: #2563eb;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-focus: #38bdf8;
    --danger: #ef4444;
    --success: #10b981;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Nav */
header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.brand small {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-muted);
}

nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.925rem;
    transition: color 0.15s ease;
}

nav a:hover {
    color: var(--primary);
}

.inline {
    display: inline-block;
}

/* Hero Section */
.hero {
    margin: 2.5rem 0 1.5rem;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-muted);
    font-size: 0.975rem;
    margin-bottom: 1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card.center {
    text-align: center;
    padding: 3rem 2rem;
}

.card.narrow {
    max-width: 440px;
    margin: 3rem auto;
}

/* Questions & Form Elements */
.question {
    border-left: 4px solid var(--primary);
}

.hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: -0.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.925rem;
    color: var(--text-main);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: all 0.2s ease;
    margin-top: 0.35rem;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Radio & Checkbox Options */
.options {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 400;
    transition: all 0.15s ease;
    margin-bottom: 0;
}

.option:hover {
    background: var(--primary-light);
    border-color: #bae6fd;
}

.option input {
    accent-color: var(--primary);
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
}

.sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Matrix Likert Scale */
.matrix {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.matrix-row {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media(min-width: 640px) {
    .matrix-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .matrix-row > div:first-child {
        max-width: 60%;
        font-weight: 500;
        font-size: 0.925rem;
    }
}

.rating {
    display: flex;
    gap: 0.5rem;
}

.rating label {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
}

.rating input {
    display: none;
}

.rating span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.rating label:hover span {
    border-color: var(--primary);
    color: var(--primary);
}

.rating input:checked + span {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn.secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn.secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn.wide {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    margin-top: 1rem;
}

.link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: 500;
    padding: 0;
    text-decoration: underline;
}

.link:hover {
    color: var(--primary-hover);
}

/* Alerts */
.alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    font-size: 0.925rem;
    font-weight: 500;
}

/* Dashboard & KPIs */
.heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpis .card {
    margin-bottom: 0;
    text-align: center;
    padding: 1.25rem;
}

.kpis span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.kpis strong {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 800;
}

/* Charts & Progress Bars */
.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}

.bar-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

tr:hover td {
    background: #f8fafc;
}

/* Quotes / Texts */
.quote {
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #334155;
}

/* Thanks page check icon & code */
.check {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    font-weight: bold;
}

.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin: 1rem 0;
    border: 2px dashed #7dd3fc;
}

/* Editor question block */
.edit-question {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 2.5rem 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    border-top: 1px solid var(--border);
}
