:root {
    --ink: #1d1d1f;
    --ink-soft: #333336;
    --muted: #6e6e73;
    --line: #e5e5ea;
    --line-strong: #d2d2d7;
    --panel: #ffffff;
    --soft: #f5f5f7;
    --soft-warm: #fff8f2;
    --primary: #f97316;
    --primary-dark: #e85d04;
    --primary-deep: #c2410c;
    --primary-soft: #fff0e3;
    --teal: #0f9f7f;
    --danger: #c9344d;
    --warning: #a86012;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .035), 0 6px 20px rgba(0, 0, 0, .035);
    --shadow: 0 18px 55px rgba(0, 0, 0, .07);
    --radius: 20px;
    --radius-sm: 14px;
    color: var(--ink);
    background: var(--soft);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
    margin: 0;
    background: var(--soft);
    color: var(--ink);
    font-family: "Sukhumvit Set", "Thonburi", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

/* Application shell */
.app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 18px;
    background: rgba(255, 255, 255, .96);
    border-right: 1px solid var(--line);
    color: var(--ink);
    backdrop-filter: blur(24px) saturate(150%);
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 2px 8px 24px;
    font-weight: 720;
    letter-spacing: -.35px;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    background: linear-gradient(145deg, #ff8a3d, var(--primary));
    color: #fff;
    box-shadow: 0 8px 24px rgba(249, 115, 22, .24);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -.3px;
}
.brand small {
    display: block;
    margin-top: 1px;
    color: #9a9aa1;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .65px;
    text-transform: uppercase;
}
.workspace-pill {
    margin: 0 2px 18px;
    padding: 12px 13px;
    background: var(--soft-warm);
    border: 1px solid #ffe0ca;
    border-radius: 15px;
}
.workspace-pill small {
    display: block;
    color: #a45a26;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .65px;
    text-transform: uppercase;
}
.workspace-pill strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-label {
    padding: 11px 12px 6px;
    color: #a0a0a6;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.nav { display: grid; gap: 4px; }
.nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 13px;
    color: #56565c;
    font-size: 13px;
    font-weight: 620;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav a:hover {
    background: #faf6f2;
    color: var(--ink);
}
.nav a.active {
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-weight: 720;
}
.nav a.active::before {
    content: "";
    width: 4px;
    height: 18px;
    margin-left: -5px;
    border-radius: 999px;
    background: var(--primary);
}
.sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.main { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 32px;
    background: rgba(245, 245, 247, .82);
    border-bottom: 1px solid rgba(210, 210, 215, .68);
    backdrop-filter: blur(24px) saturate(180%);
}
.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-left > strong {
    font-size: 14px;
    font-weight: 720;
    letter-spacing: -.2px;
}
.mobile-menu {
    display: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 21px;
    cursor: pointer;
}
.user-chip,
.language-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #4d4d52;
    font-size: 11px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025);
}
.language-chip {
    min-width: 39px;
    justify-content: center;
    font-weight: 750;
}
.language-chip:hover { border-color: #ffc49d; color: var(--primary-deep); }
.avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 12px;
    font-weight: 800;
}
.content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 36px 36px 64px;
}
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}
.page-head h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 2.2vw, 36px);
    font-weight: 720;
    letter-spacing: -1.15px;
    line-height: 1.1;
}
.page-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}
.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

/* Controls */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}
.btn:hover {
    border-color: var(--line-strong);
    background: #fff;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .055);
    transform: translateY(-1px);
}
.btn-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(249, 115, 22, .18);
}
.btn-primary:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: #fff;
}
.btn-danger {
    border-color: #f3c8cf;
    background: #fff8f9;
    color: var(--danger);
}
.btn-small { min-height: 32px; padding: 6px 11px; font-size: 10.5px; }
.btn-ghost { background: transparent; }

/* Cards and grids */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
    padding: 21px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.card-head h2,
.card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 720;
    letter-spacing: -.25px;
}
.metric {
    position: relative;
    overflow: hidden;
    min-height: 126px;
}
.metric::after {
    content: "";
    position: absolute;
    top: -43px;
    right: -32px;
    width: 102px;
    height: 102px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, .13), rgba(249, 115, 22, 0) 70%);
    pointer-events: none;
}
.metric-label { color: var(--muted); font-size: 11px; font-weight: 620; }
.metric-value {
    margin-top: 10px;
    color: var(--ink);
    font-size: 30px;
    font-weight: 740;
    letter-spacing: -1.3px;
    line-height: 1.1;
}
.metric-foot { margin-top: 7px; color: var(--muted); font-size: 10.5px; }
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ecf8f4;
    color: #0b765e;
    font-size: 9.5px;
    font-weight: 760;
    letter-spacing: .15px;
    text-transform: uppercase;
}
.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.status.inactive,
.status.paused,
.status.draft { background: #f2f2f4; color: #74747a; }
.status.failed,
.status.suspended,
.status.archived,
.status.closed { background: #fff0f2; color: #b63149; }
.status.running,
.status.queued,
.status.trial,
.status.starter { background: var(--primary-soft); color: var(--primary-deep); }
.status.growth,
.status.enterprise { background: #f3efff; color: #6941c6; }

/* Tables */
.table-wrap {
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: #fbfbfc;
    color: #77777d;
    font-size: 9.5px;
    font-weight: 760;
    letter-spacing: .55px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid #efeff2;
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fffaf6; }
.cell-title { font-weight: 700; color: var(--ink); }
.cell-sub { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; gap: 7px; }
.field.span-2 { grid-column: span 2; }
.field label { color: var(--ink-soft); font-size: 11px; font-weight: 720; }
.field small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.input,
.select,
.textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    transition: border-color .14s ease, box-shadow .14s ease;
}
.input:focus,
.select:focus,
.textarea:focus {
    border-color: #ff9a58;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .11);
}
.textarea { min-height: 112px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11.5px; }
.check input { accent-color: var(--primary); }
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    overflow: auto;
    border-bottom: 1px solid var(--line);
}
.tabs a {
    padding: 10px 13px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 650;
    white-space: nowrap;
}
.tabs a.active { border-color: var(--primary); color: var(--primary-deep); }
.code {
    overflow: auto;
    padding: 15px;
    border-radius: 15px;
    background: #1d1d1f;
    color: #f5f5f7;
    font: 11px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-all;
}
.notice {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 14px;
    font-size: 11.5px;
}
.notice.success { border-color: #bfe8dc; background: #effaf6; color: #116b58; }
.notice.error { border-color: #f1c6ce; background: #fff2f4; color: #a62e44; }
.notice.warning { border-color: #f2d4ad; background: #fff8ec; color: #895817; }
.support-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 32px;
    border-bottom: 1px solid #ffd6b8;
    background: #fff3e8;
    color: #8b430f;
    font-size: 11px;
}
.empty { padding: 48px 20px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); }
.property-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 11px;
    font-weight: 800;
}
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 18px; }
.progress { height: 7px; overflow: hidden; border-radius: 999px; background: #ededf0; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.chart { display: flex; align-items: end; gap: 5px; height: 150px; padding-top: 15px; }
.chart-col { display: flex; flex: 1; align-items: end; gap: 2px; height: 100%; }
.chart-col span { flex: 1; min-height: 2px; border-radius: 5px 5px 0 0; }
.chart-col .accept { background: var(--primary); }
.chart-col .reject { background: #dd8d99; }
.chart-col .custom { background: #61bda9; }

/* Authentication */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, .9fr) minmax(520px, 1.1fr);
    background: #fff;
}
.auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 54px;
    background:
        radial-gradient(circle at 18% 12%, rgba(249, 115, 22, .2), transparent 34%),
        radial-gradient(circle at 85% 76%, rgba(255, 197, 147, .27), transparent 31%),
        #fff8f2;
    color: var(--ink);
    border-right: 1px solid #f3e8df;
}
.auth-art::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    right: -160px;
    bottom: -120px;
    border: 1px solid rgba(249, 115, 22, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(249, 115, 22, .04), 0 0 0 120px rgba(249, 115, 22, .025);
}
.auth-art h1 {
    max-width: 610px;
    margin: 16px 0;
    font-size: clamp(42px, 4.2vw, 66px);
    font-weight: 720;
    letter-spacing: -2.8px;
    line-height: 1.02;
}
.auth-art p {
    max-width: 540px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}
.auth-panel {
    display: grid;
    place-items: center;
    padding: 44px;
    background: #fff;
}
.auth-card {
    width: min(440px, 100%);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}
.auth-card h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 720;
    letter-spacing: -1px;
}
.auth-card > p { margin: 8px 0 24px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn { min-height: 44px; }

/* Landing */
.landing { min-height: 100vh; background: #fff; }
.landing-nav {
    position: relative;
    z-index: 10;
    width: min(1220px, 100%);
    height: 78px;
    margin: 0 auto;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.landing-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 760;
    letter-spacing: -.3px;
}
.landing-hero {
    position: relative;
    width: min(1220px, 100%);
    margin: 0 auto;
    padding: 88px 26px 112px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
    align-items: center;
    gap: 70px;
}
.landing-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 10px;
    left: -180px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, .10), rgba(249, 115, 22, 0) 68%);
}
.eyebrow {
    color: var(--primary-deep);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.35px;
    text-transform: uppercase;
}
.landing-hero h1 {
    max-width: 760px;
    margin: 16px 0 22px;
    color: var(--ink);
    font-size: clamp(52px, 5.2vw, 76px);
    font-weight: 720;
    letter-spacing: -3.8px;
    line-height: .99;
}
.landing-hero p {
    max-width: 660px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}
.hero-panel {
    padding: 1px;
    border-radius: 29px;
    background: linear-gradient(145deg, #ffd5b7, #fff 45%, #f0f0f2);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .10);
    transform: rotate(.35deg);
}
.hero-window {
    min-height: 390px;
    padding: 22px;
    border-radius: 28px;
    background: #f8f8fa;
    transform: rotate(-.35deg);
}
.mini-banner {
    margin-top: 35px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.feature-strip {
    padding: 92px 26px 104px;
    background: var(--soft);
    border-top: 1px solid #ededf0;
}
.feature-inner { width: min(1220px, 100%); margin: 0 auto; }
.feature-inner h2 {
    max-width: 740px;
    margin: 9px 0 34px;
    font-size: clamp(34px, 3vw, 48px);
    font-weight: 720;
    letter-spacing: -1.8px;
    line-height: 1.08;
}
.feature-card {
    min-height: 170px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.feature-card strong { display: block; margin-bottom: 10px; font-size: 15px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.75; }

/* Super Admin */
.super-admin-shell { min-height: 100vh; background: var(--soft); }
.super-admin-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 max(24px, calc((100vw - 1500px) / 2 + 36px));
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(24px) saturate(180%);
}
.super-admin-topbar .status { background: var(--primary-soft); color: var(--primary-deep); }
.super-admin-content { width: min(1500px, 100%); margin: 0 auto; padding: 36px 36px 64px; }

.pagination { display: flex; gap: 5px; margin-top: 14px; }
.pagination > * {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 10.5px;
}
.inline-form { display: inline; }
.muted { color: var(--muted); }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.danger-text { color: var(--danger); }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
    .landing-hero { gap: 38px; }
    .landing-hero h1 { font-size: 52px; }
}

@media (max-width: 820px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        width: 264px;
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 16px 0 60px rgba(0, 0, 0, .12);
    }
    .sidebar.open { transform: translateX(0); }
    .mobile-menu { display: block; }
    .content,
    .super-admin-content { padding: 24px 16px 44px; }
    .topbar { padding: 0 16px; }
    .super-admin-topbar { padding: 12px 16px; }
    .grid-4,
    .grid-3,
    .grid-2,
    .form-grid { grid-template-columns: 1fr; }
    .field.span-2 { grid-column: auto; }
    .page-head { display: grid; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-panel { min-height: 100vh; padding: 24px; background: var(--soft); }
    .auth-card { padding: 25px 22px; }
    .landing-nav { height: auto; min-height: 72px; padding: 14px 18px; }
    .landing-nav .actions .btn:not(.btn-primary) { display: none; }
    .landing-hero { grid-template-columns: 1fr; padding: 58px 18px 78px; }
    .landing-hero h1 { font-size: 44px; letter-spacing: -2.3px; }
    .landing-hero p { font-size: 15px; }
    .hero-panel { display: none; }
    .feature-strip { padding: 66px 18px 76px; }
    .support-bar { padding: 9px 16px; }
    .user-chip span { display: none; }
}

@media (max-width: 520px) {
    .topbar-right { gap: 6px; }
    .topbar-right .btn-small { padding-inline: 9px; }
    .page-head h1 { font-size: 29px; }
    .card { padding: 17px; border-radius: 17px; }
    .landing-hero h1 { font-size: 39px; }
}

/* HostDrift Consent v1.1.0 — Tag Manager, privacy records and operating controls */
.tag-manager-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 18px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 28px rgba(30,30,35,.035);
}
.tag-manager-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 11px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: .18s ease;
}
.tag-manager-tabs a:hover { color: var(--ink); background: var(--soft); }
.tag-manager-tabs a.active { color: var(--primary-deep); background: var(--primary-soft); }

.mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 2px 4px 2px 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f5f5f7;
    color: #4d4d52;
    font-size: 10.5px;
    line-height: 1;
    font-weight: 700;
}
.mini-chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.mini-chip.off::before { background: #c7c7cc; }
.mini-chip.warn::before { background: var(--warning); }

.selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.selection-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 82px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.selection-card:hover { border-color: #ffc8a5; box-shadow: 0 8px 24px rgba(249,115,22,.07); transform: translateY(-1px); }
.selection-card input { margin-top: 2px; accent-color: var(--primary); }
.selection-card strong { display: block; margin-bottom: 4px; }
.selection-card small { display: block; color: var(--muted); line-height: 1.45; }

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.template-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 70%, #fff7f0 100%);
    box-shadow: 0 10px 34px rgba(30,30,35,.045);
}
.template-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 15px;
    font-weight: 800;
}
.template-card h3 { margin: 0 0 7px; font-size: 17px; }
.template-card p { margin: 0 0 15px; color: var(--muted); line-height: 1.6; font-size: 12px; }
.template-card .template-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }

.code-block {
    overflow: auto;
    margin: 12px 0 0;
    padding: 16px 17px;
    border: 1px solid #2e3038;
    border-radius: 15px;
    background: #1d1d1f;
    color: #f5f5f7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}
.code-block.compact { padding: 12px 14px; font-size: 10.8px; }
.code-wrap {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .91em;
}
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row .input, .copy-row .code-wrap { flex: 1; min-width: 0; }

.filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}
.filter-grid .wide { grid-column: span 2; }
.filter-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--line);
}
.detail-grid > div { min-width: 0; padding: 14px 15px; background: #fff; }
.detail-grid small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10.5px; }
.detail-grid strong { display: block; font-size: 12px; line-height: 1.45; }
.detail-grid.compact > div { padding: 11px 12px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 11px;
}
.choice-card.on { border-color: #b9e9db; background: #f2fbf8; color: #166b57; }
.choice-card.off { border-color: #f2d0d4; background: #fff7f8; color: #9c3541; }

.version-row {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}
.version-row + .version-row { margin-top: 8px; }

.settings-shell { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr); gap: 16px; align-items: start; }
.reference-steps { counter-reset: step; display: grid; gap: 10px; }
.reference-step { position: relative; padding: 14px 14px 14px 50px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.reference-step::before { counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 13px; width: 24px; height: 24px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-deep); font-weight: 800; font-size: 10px; }
.reference-step strong { display: block; margin-bottom: 3px; }
.reference-step small { color: var(--muted); line-height: 1.5; }

.privacy-note {
    padding: 13px 15px;
    border: 1px solid #bfe7da;
    border-radius: 14px;
    background: #f5fcfa;
    color: #28695b;
    font-size: 11.5px;
    line-height: 1.55;
}

@media (max-width: 1200px) {
    .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .settings-shell { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .selection-grid,
    .template-grid,
    .choice-grid,
    .detail-grid,
    .filter-grid { grid-template-columns: 1fr; }
    .filter-grid .wide { grid-column: auto; }
    .copy-row { align-items: stretch; flex-direction: column; }
    .tag-manager-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .tag-manager-tabs a { white-space: nowrap; }
}

/* Workspace switcher */
.workspace-switcher {
    position: relative;
}
.workspace-switcher summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .88);
    color: #55555b;
    font-size: 10.5px;
    font-weight: 720;
    cursor: pointer;
    user-select: none;
    transition: border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.workspace-switcher summary::-webkit-details-marker { display: none; }
.workspace-switcher summary::marker { content: ""; }
.workspace-switcher[open] summary,
.workspace-switcher summary:hover {
    border-color: #ffc49d;
    color: var(--primary-deep);
    box-shadow: 0 5px 16px rgba(249, 115, 22, .08);
}
.sidebar-workspace-switcher { margin-top: 10px; }
.sidebar-workspace-switcher summary {
    border-color: #ffd9bf;
    background: rgba(255, 255, 255, .72);
}
.workspace-switcher-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    width: min(310px, calc(100vw - 32px));
    max-height: 390px;
    overflow: auto;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 50px rgba(33, 33, 38, .15);
    backdrop-filter: blur(24px) saturate(170%);
}
.topbar-workspace-switcher { margin: 0; }
.topbar-workspace-switcher summary {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
}
.topbar-workspace-switcher .workspace-switcher-menu {
    right: 0;
    left: auto;
}
.workspace-switcher-menu form { margin: 0; }
.workspace-switcher-item {
    width: 100%;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #4e4e54;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    transition: background .14s ease, color .14s ease;
}
.workspace-switcher-item:hover {
    background: #fff6ef;
    color: var(--primary-deep);
}
.workspace-switcher-item.active {
    background: var(--primary-soft);
    color: var(--primary-deep);
}
.workspace-switcher-item > span:nth-child(2) { min-width: 0; }
.workspace-switcher-item strong {
    display: block;
    overflow: hidden;
    font-size: 11px;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workspace-switcher-item small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workspace-switcher-home { color: var(--ink); }
.workspace-switcher-divider {
    height: 1px;
    margin: 6px 4px;
    background: var(--line);
}
.workspace-status-dot {
    width: 8px;
    height: 8px;
    justify-self: center;
    border-radius: 999px;
    background: #a9a9af;
    box-shadow: 0 0 0 4px #f1f1f3;
}
.workspace-status-dot.active { background: #26a77f; box-shadow: 0 0 0 4px #e7f7f1; }
.workspace-status-dot.suspended { background: #e5a93e; box-shadow: 0 0 0 4px #fff5dc; }
.workspace-status-dot.closed { background: #d76472; box-shadow: 0 0 0 4px #fff0f2; }
.workspace-switcher-check {
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
}
.workspace-switcher-more {
    display: block;
    margin: 5px 3px 2px;
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--primary-deep);
    font-size: 9.5px;
    font-weight: 720;
    text-align: center;
}
.workspace-switcher-more:hover { background: var(--primary-soft); }

@media (max-width: 820px) {
    .topbar-workspace-switcher > summary > span:first-child { display: none; }
    .topbar-workspace-switcher summary { min-width: 40px; justify-content: center; }
    .topbar-workspace-switcher .workspace-switcher-menu {
        position: fixed;
        top: 68px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: 60vh;
    }
}

/* HostDrift Consent v1.1.6 — scalable workspace directory */
.workspace-directory-link,
.workspace-directory-toplink {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid #ffd8bc;
    border-radius: 12px;
    background: rgba(255,255,255,.8);
    color: var(--primary-deep);
    font-size: 10.5px;
    font-weight: 740;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.workspace-directory-link { width: 100%; margin-top: 10px; }
.workspace-directory-link:hover,
.workspace-directory-toplink:hover {
    border-color: #ffb27e;
    background: #fff;
    box-shadow: 0 6px 18px rgba(249,115,22,.09);
    transform: translateY(-1px);
}
.workspace-directory-toplink {
    min-height: 38px;
    padding: 8px 13px;
    border-color: var(--line);
    border-radius: 999px;
    color: #4d4d52;
}
.workspace-directory-toplink-icon { color: var(--primary); font-size: 13px; }

.btn-secondary {
    background: #f7f7f9;
    color: #55555b;
}
.btn-secondary:hover { background: #fff; }

.workspace-directory {
    scroll-margin-top: 96px;
    padding: 0;
    overflow: hidden;
}
.workspace-directory-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--line);
}
.workspace-directory-head h2 {
    margin: 3px 0 5px;
    font-size: 22px;
    letter-spacing: -.65px;
}
.workspace-directory-filters {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 180px 180px auto auto;
    align-items: center;
    gap: 9px;
    padding: 16px 22px;
    background: #fbfbfc;
    border-bottom: 1px solid var(--line);
}
.workspace-directory-search {
    position: relative;
    min-width: 0;
}
.workspace-directory-search > span {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: #9a9aa1;
    font-size: 16px;
    pointer-events: none;
}
.workspace-directory-search .input { padding-left: 37px; }
.workspace-directory-list { display: grid; }
.workspace-directory-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 17px 22px;
    border-bottom: 1px solid #ededf0;
    transition: background .14s ease;
}
.workspace-directory-row:last-child { border-bottom: 0; }
.workspace-directory-row:hover { background: #fffaf6; }
.workspace-directory-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid #ffd9bf;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff4eb, #fffaf6);
    color: var(--primary-deep);
    font-size: 11px;
    font-weight: 820;
    letter-spacing: -.3px;
}
.workspace-directory-main { min-width: 0; }
.workspace-directory-titleline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.workspace-directory-titleline h3 {
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
    letter-spacing: -.25px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workspace-directory-titleline p {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workspace-directory-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}
.workspace-directory-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 9px;
    color: #85858b;
    font-size: 9.5px;
}
.workspace-directory-meta strong { color: #56565c; }
.workspace-directory-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 190px;
}
.workspace-directory-actions form { margin: 0; }
.workspace-directory-actions form .btn {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.workspace-directory-actions form .btn:hover {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    color: #fff;
}
.workspace-directory-empty {
    padding: 52px 24px;
    text-align: center;
}
.workspace-directory-empty strong { font-size: 14px; }
.workspace-directory-empty p { margin: 7px 0 0; }
.workspace-directory-pagination {
    padding: 14px 22px 20px;
    border-top: 1px solid var(--line);
}
.workspace-directory-pagination nav > div:first-child { margin-bottom: 10px; }

@media (max-width: 1050px) {
    .workspace-directory-filters { grid-template-columns: minmax(220px, 1fr) 150px 150px auto; }
    .workspace-directory-filters .btn-secondary { grid-column: 1 / -1; justify-self: start; }
    .workspace-directory-row { grid-template-columns: 42px minmax(0, 1fr); }
    .workspace-directory-actions { grid-column: 2; justify-content: flex-start; min-width: 0; }
}

@media (max-width: 720px) {
    .workspace-directory-toplink > span:last-child { display: none; }
    .workspace-directory-toplink { min-width: 40px; justify-content: center; padding-inline: 10px; }
    .workspace-directory-head { display: grid; padding: 18px 16px 14px; }
    .workspace-directory-filters { grid-template-columns: 1fr; padding: 14px 16px; }
    .workspace-directory-filters .btn-secondary { grid-column: auto; justify-self: stretch; }
    .workspace-directory-row { grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 15px 16px; }
    .workspace-directory-avatar { width: 38px; height: 38px; border-radius: 12px; }
    .workspace-directory-titleline { display: grid; gap: 8px; }
    .workspace-directory-badges { justify-content: flex-start; }
    .workspace-directory-actions { grid-column: 1 / -1; }
    .workspace-directory-actions .btn { flex: 1; }
}

/* ==========================================================
   HostDrift Consent v1.1.7 — Professional marketing landing
   ========================================================== */
.hd-landing {
    margin: 0;
    min-height: 100vh;
    color: #1d1d1f;
    background: #fff;
    font-family: "Sukhumvit Set", "Thonburi", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.hd-landing * { box-sizing: border-box; }
.hd-landing a { text-decoration: none; }
.hd-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(0,0,0,.055);
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.hd-nav-wrap {
    width: min(1240px, 100%);
    min-height: 76px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
.hd-brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 760;
    letter-spacing: -.25px;
}
.hd-brand .brand-mark,
.hd-footer-brand .brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(145deg,#ff8a2a,#f97316 58%,#e85d04);
    box-shadow: 0 7px 20px rgba(249,115,22,.22);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: -.1px;
}
.hd-nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}
.hd-nav-links a,
.hd-signin {
    color: #5b5b61;
    font-size: 12.5px;
    font-weight: 650;
    transition: color .18s ease;
}
.hd-nav-links a:hover,
.hd-signin:hover { color: #f97316; }
.hd-nav-actions { display: flex; align-items: center; gap: 11px; }
.hd-nav-actions .btn { min-height: 38px; padding: 9px 16px; }

.hd-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 104px 28px 118px;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(430px, .94fr);
    align-items: center;
    gap: 78px;
}
.hd-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 720px;
    height: 720px;
    left: -350px;
    top: -180px;
    border-radius: 50%;
    background: radial-gradient(circle,rgba(249,115,22,.12),rgba(249,115,22,0) 68%);
    pointer-events: none;
}
.hd-kicker {
    color: #e85d04;
    font-size: 10.5px;
    font-weight: 820;
    letter-spacing: 1.55px;
    text-transform: uppercase;
}
.hd-hero-title {
    max-width: 760px;
    margin: 18px 0 26px;
    color: #1d1d1f;
    font-size: clamp(54px,5.3vw,78px);
    font-weight: 730;
    line-height: 1.035;
    letter-spacing: -3.7px;
    text-wrap: balance;
}
html[lang="th"] .hd-hero-title {
    font-weight: 700;
    line-height: 1.23;
    letter-spacing: -1.65px;
    word-break: keep-all;
    overflow-wrap: normal;
}
.hd-hero-lead {
    max-width: 700px;
    margin: 0;
    color: #6e6e73;
    font-size: 17px;
    line-height: 1.82;
}
html[lang="th"] .hd-hero-lead { line-height: 1.9; }
.hd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    margin-top: 30px;
}
.hd-btn-large { min-height: 48px !important; padding: 13px 22px !important; font-size: 13px !important; }
.hd-text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e85d04;
    font-size: 12.5px;
    font-weight: 720;
}
.hd-text-link span { transition: transform .18s ease; }
.hd-text-link:hover span { transform: translateX(3px); }
.hd-proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    margin-top: 34px;
    color: #6e6e73;
    font-size: 10.5px;
    font-weight: 650;
}
.hd-proof-row span { display: inline-flex; align-items: center; gap: 7px; }
.hd-proof-row i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249,115,22,.10);
}

.hd-hero-product {
    position: relative;
    padding: 1px;
    border-radius: 30px;
    background: linear-gradient(145deg,#ffd7bb,#fff 48%,#ededf0);
    box-shadow: 0 38px 110px rgba(20,20,24,.12);
}
.hd-hero-product::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: -90px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle,rgba(249,115,22,.13),rgba(249,115,22,0) 70%);
}
.hd-product-window {
    min-height: 474px;
    padding: 26px;
    border-radius: 29px;
    background: #f7f7f9;
}
.hd-window-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.hd-window-top > div { display: grid; gap: 5px; }
.hd-window-label { color: #86868b; font-size: 10px; font-weight: 650; }
.hd-window-top strong { color: #1d1d1f; font-size: 15px; letter-spacing: -.25px; }
.hd-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    color: #347a58;
    border: 1px solid #e8e8eb;
    font-size: 9px;
    font-weight: 750;
}
.hd-live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #35a66f; }
.hd-consent-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-top: 24px;
}
.hd-consent-item {
    min-height: 86px;
    padding: 14px;
    display: grid;
    align-content: space-between;
    border: 1px solid #e6e6e9;
    border-radius: 16px;
    background: #fff;
}
.hd-consent-item span { color: #86868b; font-size: 9.5px; }
.hd-consent-item strong { font-size: 11px; }
.hd-consent-item.is-on strong { color: #347a58; }
.hd-consent-item.is-off { background: #fbfbfc; }
.hd-consent-item.is-off strong { color: #a04b3f; }
.hd-runtime-card {
    margin-top: 14px;
    padding: 17px;
    border: 1px solid #e5e5e8;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(25,25,30,.045);
}
.hd-runtime-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 11px;
    border-bottom: 1px solid #f0f0f2;
}
.hd-runtime-head span { font-size: 11px; font-weight: 750; }
.hd-runtime-head small { color: #929297; font-size: 8.5px; }
.hd-tag-row {
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f2f2f4;
}
.hd-tag-row:last-child { border-bottom: 0; }
.hd-tag-row > div { display: flex; align-items: center; gap: 9px; }
.hd-tag-row strong { font-size: 10px; font-weight: 700; }
.hd-app-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #f5f5f7;
    color: #4d4d52;
    font-size: 8px;
    font-weight: 820;
}
.hd-state { padding: 5px 8px; border-radius: 999px; font-size: 8.5px; font-weight: 750; }
.hd-state.allowed { color: #347a58; background: #eef8f2; }
.hd-state.blocked { color: #a04b3f; background: #fff0ed; }
.hd-window-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: #929297;
    font-size: 8.5px;
}

.hd-section { padding: 112px 28px; }
.hd-section-soft { background: #f5f5f7; border-top: 1px solid #eeeeef; border-bottom: 1px solid #eeeeef; }
.hd-section-inner { width: min(1184px,100%); margin: 0 auto; }
.hd-section-heading { max-width: 790px; margin-bottom: 46px; }
.hd-section-heading h2,
.hd-workflow-copy h2,
.hd-dark-heading h2,
.hd-final-inner h2 {
    margin: 10px 0 18px;
    color: #1d1d1f;
    font-size: clamp(36px,3.6vw,52px);
    font-weight: 720;
    line-height: 1.08;
    letter-spacing: -2.1px;
    text-wrap: balance;
}
html[lang="th"] .hd-section-heading h2,
html[lang="th"] .hd-workflow-copy h2,
html[lang="th"] .hd-dark-heading h2,
html[lang="th"] .hd-final-inner h2 {
    line-height: 1.31;
    letter-spacing: -.85px;
    font-weight: 690;
}
.hd-section-heading > p,
.hd-workflow-copy > p,
.hd-final-inner > div > p {
    margin: 0;
    color: #6e6e73;
    font-size: 15px;
    line-height: 1.82;
}
.hd-feature-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.hd-feature-card {
    min-height: 258px;
    padding: 26px;
    border: 1px solid #e6e6e8;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(20,20,24,.035);
    transition: transform .2s ease, box-shadow .2s ease;
}
.hd-feature-card:hover { transform: translateY(-3px); box-shadow: 0 18px 46px rgba(20,20,24,.065); }
.hd-feature-index { color: #f97316; font-size: 10px; font-weight: 800; }
.hd-feature-card h3 { margin: 34px 0 12px; font-size: 15px; line-height: 1.5; letter-spacing: -.2px; }
.hd-feature-card p { margin: 0; color: #77777c; font-size: 11px; line-height: 1.85; }

.hd-workflow-layout { display: grid; grid-template-columns: minmax(0,.92fr) minmax(440px,1.08fr); align-items: center; gap: 88px; }
.hd-workflow-copy .hd-text-link { margin-top: 25px; }
.hd-flow-card {
    padding: 30px;
    border: 1px solid #e7e7e9;
    border-radius: 28px;
    background: linear-gradient(180deg,#fff,#fafafa);
    box-shadow: 0 25px 75px rgba(20,20,24,.08);
}
.hd-flow-step { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 15px; }
.hd-flow-step > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg,#ff8b2c,#f97316);
    box-shadow: 0 8px 20px rgba(249,115,22,.20);
    font-size: 11px;
    font-weight: 800;
}
.hd-flow-step > div { display: grid; gap: 4px; }
.hd-flow-step strong { font-size: 12px; }
.hd-flow-step small { color: #838388; font-size: 9.5px; line-height: 1.6; }
.hd-flow-line { width: 1px; height: 37px; margin: 7px 0 7px 20px; background: linear-gradient(#ffd8bc,#f0f0f2); }

.hd-section-dark { background: #1d1d1f; }
.hd-section-dark .hd-kicker { color: #ff9a52; }
.hd-dark-heading { max-width: 820px; margin-bottom: 48px; }
.hd-dark-heading h2 { color: #fff; }
.hd-ops-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid #343437; border-radius: 24px; background: #343437; }
.hd-ops-grid > div { min-height: 210px; padding: 26px; background: #252527; }
.hd-ops-grid strong { color: #fff; font-size: 13px; }
.hd-ops-grid p { margin: 13px 0 0; color: #a9a9ae; font-size: 10.5px; line-height: 1.8; }

.hd-final-cta { padding: 96px 28px; background: #fff; }
.hd-final-inner {
    width: min(1184px,100%);
    margin: 0 auto;
    padding: 52px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    border: 1px solid #f0d7c5;
    border-radius: 30px;
    background: linear-gradient(135deg,#fff8f3,#fff 60%);
    box-shadow: 0 24px 70px rgba(249,115,22,.08);
}
.hd-final-inner > div { max-width: 760px; }
.hd-final-inner h2 { font-size: clamp(32px,3vw,45px); }
.hd-final-inner .btn { flex: 0 0 auto; }

.hd-footer { padding: 28px; border-top: 1px solid #ededee; background: #fafafa; }
.hd-footer-inner { width: min(1184px,100%); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.hd-footer-brand { display: flex; align-items: center; gap: 11px; }
.hd-footer-brand > span:last-child { display: grid; gap: 2px; }
.hd-footer-brand strong { font-size: 11.5px; }
.hd-footer-brand small { color: #8b8b90; font-size: 9px; }
.hd-footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; color: #8b8b90; font-size: 9.5px; }
.hd-footer-links a { color: #6e6e73; }
.hd-footer-links a:hover { color: #f97316; }

@media (max-width: 1080px) {
    .hd-nav-links { display: none; }
    .hd-hero { grid-template-columns: 1fr 440px; gap: 42px; padding-top: 82px; }
    .hd-hero-title { font-size: 55px; }
    html[lang="th"] .hd-hero-title { font-size: 54px; }
    .hd-feature-grid,.hd-ops-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .hd-workflow-layout { gap: 48px; }
}
@media (max-width: 850px) {
    .hd-nav-wrap { min-height: 70px; padding: 10px 18px; }
    .hd-signin { display: none; }
    .hd-hero { grid-template-columns: 1fr; padding: 70px 20px 82px; }
    .hd-hero-copy { max-width: 720px; }
    .hd-hero-title { font-size: 50px; letter-spacing: -2.4px; }
    html[lang="th"] .hd-hero-title { font-size: 48px; line-height: 1.25; letter-spacing: -1.1px; }
    .hd-hero-product { max-width: 620px; width: 100%; }
    .hd-section { padding: 82px 20px; }
    .hd-workflow-layout { grid-template-columns: 1fr; }
    .hd-flow-card { max-width: 650px; }
    .hd-final-cta { padding: 70px 20px; }
    .hd-final-inner { padding: 42px 34px; display: grid; }
    .hd-footer-inner { display: grid; }
    .hd-footer-links { justify-content: flex-start; }
}
@media (max-width: 600px) {
    .hd-brand { font-size: 13px; }
    .hd-nav-actions .language-chip { display: none; }
    .hd-nav-actions .btn { padding-inline: 12px; font-size: 10px; }
    .hd-hero { padding-top: 54px; }
    .hd-hero-title { margin-top: 13px; font-size: 42px; line-height: 1.06; letter-spacing: -2px; }
    html[lang="th"] .hd-hero-title { font-size: 40px; line-height: 1.28; letter-spacing: -.65px; }
    .hd-hero-lead { font-size: 14.5px; line-height: 1.8; }
    .hd-hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
    .hd-proof-row { display: grid; gap: 12px; }
    .hd-product-window { min-height: 0; padding: 18px; }
    .hd-consent-grid { grid-template-columns: 1fr; }
    .hd-runtime-head { display: grid; }
    .hd-window-foot { display: grid; }
    .hd-feature-grid,.hd-ops-grid { grid-template-columns: 1fr; }
    .hd-feature-card { min-height: 0; }
    .hd-section-heading h2,.hd-workflow-copy h2,.hd-dark-heading h2,.hd-final-inner h2 { font-size: 34px; letter-spacing: -1.15px; }
    html[lang="th"] .hd-section-heading h2,
    html[lang="th"] .hd-workflow-copy h2,
    html[lang="th"] .hd-dark-heading h2,
    html[lang="th"] .hd-final-inner h2 { line-height: 1.34; letter-spacing: -.5px; }
    .hd-flow-card { padding: 22px; }
    .hd-final-inner { padding: 34px 24px; }
}
