:root {
    --utw-forest: #064e3b;
    --utw-forest-dark: #022c22;
    --utw-emerald: #059669;
    --utw-emerald-light: #ecfdf5;
    --utw-amber: #f59e0b;
    --utw-amber-soft: #fffbeb;
    --utw-bg: #f8faf9;
    --utw-card: #ffffff;
    --utw-ink: #0f172a;
    --utw-body: #334155;
    --utw-muted: #64748b;
    --utw-line: #e2e8f0;
    --utw-radius: 14px;
}

/* 1. Ironclad Anti-Overflow Reset */
*, *::before, *::after {
    box-sizing: border-box;
}
html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--utw-bg);
    color: var(--utw-ink);
    line-height: 1.65;
    font-size: 16px;
}
main, section, article, aside, nav, header, footer, div {
    min-width: 0;
}
img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}
p, h1, h2, h3, h4, li, td, th, code, a, span {
    overflow-wrap: anywhere;
    word-break: break-word;
}
code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.88em;
    color: #0f172a;
}
a {
    color: var(--utw-emerald);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--utw-forest);
    text-decoration: underline;
}

.utw-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Responsive Header */
.utw-header {
    background: linear-gradient(135deg, var(--utw-forest-dark) 0%, var(--utw-forest) 100%);
    color: #fff;
    padding: 16px 0;
    border-bottom: 3px solid var(--utw-amber);
}
.utw-head-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.utw-logo {
    color: #fff !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.utw-logo-mark {
    background: var(--utw-amber);
    color: #0f172a;
    font-weight: 900;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.utw-logo strong {
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    display: block;
    line-height: 1.2;
    letter-spacing: -0.2px;
}
.utw-logo small {
    font-size: 12.5px;
    color: #a7f3d0;
    display: block;
    line-height: 1.3;
}
.utw-find {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 999px;
    padding: 4px;
    width: 100%;
    max-width: 330px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.utw-find input {
    border: none;
    outline: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    color: var(--utw-ink);
    background: transparent;
}
.utw-find button {
    background: var(--utw-emerald);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}
.utw-find button:hover {
    background: var(--utw-forest);
}

/* 3. Topic Navigation (Wrap on Desktop, Smooth Touch Swipe on Mobile) */
.utw-topics {
    background: #ffffff;
    border-bottom: 1px solid var(--utw-line);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}
.utw-topic-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 11px 0;
}
.utw-topic-row li {
    flex-shrink: 0;
}
.utw-topic-row a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.utw-topic-row a:hover {
    background: var(--utw-emerald-light);
    color: var(--utw-forest);
    border-color: #a7f3d0;
}
.utw-topic-row a.active {
    background: var(--utw-forest);
    color: #ffffff;
}

/* 4. Hero Banner */
.utw-banner {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
    border: 1px solid #a7f3d0;
    border-radius: 18px;
    padding: 28px 32px;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.utw-banner-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: #ffffff;
    color: var(--utw-forest);
    border: 1px solid #6ee7b7;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}
.utw-banner h1 {
    margin: 0;
    font-size: clamp(1.38rem, 2.6vw, 2rem);
    color: var(--utw-forest-dark);
    line-height: 1.25;
    letter-spacing: -0.3px;
}
.utw-banner p {
    margin: 0;
    color: #065f46;
    max-width: 780px;
    font-size: clamp(0.92rem, 1.4vw, 1.02rem);
}

/* 5. Symmetrical Responsive Card Grid (3 Col Desktop -> 2 Col Tablet -> 1 Col Mobile) */
.utw-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 20px 0 48px;
}
.utw-card {
    background: var(--utw-card);
    border: 1px solid var(--utw-line);
    border-radius: var(--utw-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.utw-card:hover {
    border-color: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(6, 78, 59, 0.08);
}
.utw-card-head {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 12px;
    min-width: 0;
}
.utw-card-img {
    width: 56px;
    height: 56px;
    border-radius: 13px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--utw-line);
    background: #f1f5f9;
}
.utw-card-meta {
    min-width: 0;
    flex: 1;
}
.utw-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.utw-card h2, .utw-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.utw-card h2 a, .utw-card h3 a {
    color: var(--utw-ink);
    text-decoration: none;
}
.utw-card h2 a:hover, .utw-card h3 a:hover {
    color: var(--utw-emerald);
}
.utw-card-summary {
    font-size: 13.8px;
    color: var(--utw-body);
    margin: 0 0 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.utw-card-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    margin-top: auto;
}
.utw-card-dev {
    color: var(--utw-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}
.utw-card-link {
    font-weight: 700;
    color: var(--utw-emerald);
    white-space: nowrap;
    flex-shrink: 0;
}

/* 6. Detail Page Layout (Strict minmax(0, 1fr) Prevents Any Horizontal Bleed!) */
.utw-crumbs {
    font-size: 13px;
    color: var(--utw-muted);
    margin: 18px 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.utw-guide-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    margin-bottom: 52px;
}
.utw-main-box {
    background: #ffffff;
    border: 1px solid var(--utw-line);
    border-radius: 18px;
    padding: 30px;
    min-width: 0;
    max-width: 100%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}
.utw-hero-app {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--utw-line);
    margin-bottom: 20px;
}
.utw-hero-app img {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    border: 1px solid var(--utw-line);
    flex-shrink: 0;
    object-fit: cover;
}
.utw-main-box h1 {
    font-size: clamp(1.32rem, 2.4vw, 1.75rem);
    margin: 4px 0 8px;
    color: var(--utw-forest-dark);
    line-height: 1.28;
}
.utw-mobile-cta {
    display: none;
    margin: 0 0 20px;
}

.utw-takeaways {
    background: var(--utw-amber-soft);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 22px 0;
}
.utw-takeaways h2 {
    margin: 0 0 10px;
    font-size: 16.5px;
    color: #92400e;
}
.utw-takeaways ul {
    margin: 0;
    padding-left: 20px;
    color: #451a03;
    font-size: 14.5px;
}
.utw-takeaways li {
    margin-bottom: 6px;
}

.utw-sec-title {
    font-size: clamp(1.12rem, 1.8vw, 1.28rem);
    color: var(--utw-forest-dark);
    margin: 28px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}
.utw-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.utw-tool-item {
    background: #f8fafc;
    border: 1px solid var(--utw-line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--utw-body);
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.utw-tool-check {
    color: var(--utw-emerald);
    font-weight: 800;
    flex-shrink: 0;
}

/*Bounded Horizontal Screenshot Carousel */
.utw-screens {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 14px;
    scroll-snap-type: x proximity;
}
.utw-screens img {
    height: 220px;
    width: auto;
    max-width: 78vw;
    flex: 0 0 auto;
    border-radius: 12px;
    border: 1px solid var(--utw-line);
    object-fit: cover;
    scroll-snap-align: start;
}

.utw-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 14px 0;
    display: grid;
    gap: 10px;
}
.utw-steps li {
    counter-increment: step;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14.5px;
    color: #14532d;
}
.utw-steps li::before {
    content: counter(step);
    background: var(--utw-emerald);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.utw-who-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.utw-who-card {
    border: 1px solid var(--utw-line);
    border-radius: 12px;
    padding: 14px;
    background: #fafafa;
}
.utw-who-card strong {
    color: var(--utw-forest);
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}
.utw-who-card p {
    margin: 0;
    font-size: 13.5px;
    color: var(--utw-body);
}

/* Sticky Sidebar on Desktop */
.utw-aside {
    position: sticky;
    top: 68px;
    min-width: 0;
}
.utw-panel {
    background: #ffffff;
    border: 1px solid var(--utw-line);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}
.utw-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    background: var(--utw-emerald);
    color: #ffffff !important;
    padding: 13px 18px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none !important;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    transition: background 0.15s ease, transform 0.15s ease;
}
.utw-dl-btn:hover {
    background: var(--utw-forest);
    transform: translateY(-1px);
}
.utw-meta-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--utw-body);
}
.utw-meta-list li {
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.utw-meta-list li:last-child {
    border-bottom: none;
}
.utw-meta-list span.lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--utw-muted);
    font-weight: 700;
}

/* Footer */
.utw-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 40px 0 28px;
    font-size: 14px;
    margin-top: 40px;
}
.utw-footer a {
    color: #6ee7b7;
}
.utw-foot-cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================================= */
@media (max-width: 1024px) {
    .utw-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .utw-guide-wrap {
        grid-template-columns: minmax(0, 1fr);
    }
    .utw-aside {
        position: static;
    }
    .utw-mobile-cta {
        display: block;
    }
}

@media (max-width: 820px) {
    .utw-head-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .utw-find {
        max-width: 100%;
    }
    .utw-topic-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 10px 0;
    }
    .utw-topic-row::-webkit-scrollbar {
        display: none;
    }
    .utw-who-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .utw-foot-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
}

@media (max-width: 640px) {
    .utw-shell {
        padding: 0 14px;
    }
    .utw-banner {
        padding: 20px 18px;
        margin: 16px 0;
        border-radius: 14px;
    }
    .utw-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .utw-main-box {
        padding: 18px 16px;
        border-radius: 14px;
    }
    .utw-hero-app {
        gap: 14px;
    }
    .utw-hero-app img {
        width: 66px;
        height: 66px;
        border-radius: 14px;
    }
    .utw-tools-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .utw-screens img {
        height: 190px;
    }
}
