/* Analogous generator tool: mobile-first, light card */
.acg-tool {
    --acg-bg: #ffffff;
    --acg-surface: #f8fafc;
    --acg-border: #e2e8f0;
    --acg-text: #0f172a;
    --acg-muted: #64748b;
    --acg-accent: #2563eb;
    --acg-accent-hover: #1d4ed8;
    --acg-accent-on: #ffffff;
    --acg-radius: 16px;
    --acg-radius-sm: 12px;
    --acg-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --acg-focus: 0 0 0 2px var(--acg-accent);
    background: var(--acg-bg);
    border: 1px solid var(--acg-border);
    border-radius: var(--acg-radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--acg-shadow);
}

@media (min-width: 768px) {
    .acg-tool {
        padding: 1.75rem 2rem;
    }
}

/* Headings */
.acg-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--acg-muted);
    margin: 0 0 0.75rem 0;
}

/* Base color pick */
.acg-pick {
    margin-bottom: 1.5rem;
}

.acg-pick-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.acg-swatch-wrap {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.acg-color-picker {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    border-radius: var(--acg-radius-sm);
    cursor: pointer;
    opacity: 0;
    inset: 0;
}

.acg-color-picker:focus-visible {
    outline: 2px solid var(--acg-accent);
    outline-offset: 2px;
}

.acg-preview {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: var(--acg-radius-sm);
    border: 2px solid var(--acg-border);
    background: #3498db;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.acg-hex-wrap {
    flex: 1;
    min-width: 0;
}

.acg-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--acg-muted);
    margin-bottom: 0.35rem;
}

.acg-hex-input {
    width: 100%;
    max-width: 140px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9375rem;
    
    color: var(--acg-text);
    background: var(--acg-surface);
    border: 1px solid var(--acg-border);
    border-radius: var(--acg-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acg-hex-input:focus {
    border-color: var(--acg-accent);
    box-shadow: var(--acg-focus);
    outline: none;
}

.acg-hex-input::placeholder {
    color: var(--acg-muted);
}

/* Angle control */
.acg-angle {
    margin-bottom: 1.5rem;
}

.acg-angle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.acg-angle-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--acg-accent);
    font-variant-numeric: tabular-nums;
}

.acg-range {
    width: 100%;
    height: 8px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: var(--acg-surface);
    border-radius: 4px;
    border: 1px solid var(--acg-border);
}

.acg-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--acg-accent);
    border: 2px solid var(--acg-bg);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    margin-top: -7px;
}

.acg-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--acg-accent);
    border: 2px solid var(--acg-bg);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.acg-range:focus {
    outline: none;
}

.acg-range:focus-visible::-webkit-slider-thumb {
    box-shadow: var(--acg-focus);
}

.acg-range:focus-visible::-moz-range-thumb {
    box-shadow: var(--acg-focus);
}

.acg-hint {
    font-size: 0.8125rem;
    color: var(--acg-muted);
    margin: 0.5rem 0 0 0;
}

/* Main palette strip */
.acg-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .acg-palette {
        gap: 1rem;
    }
}

.acg-swatch {
    border-radius: var(--acg-radius-sm);
    overflow: hidden;
    border: 2px solid var(--acg-border);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    min-height: 100px;
}

@media (min-width: 768px) {
    .acg-swatch {
        min-height: 120px;
    }
}

.acg-swatch:hover {
    transform: scale(1.02);
    border-color: var(--acg-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.acg-swatch:focus-visible {
    outline: none;
    border-color: var(--acg-accent);
    box-shadow: var(--acg-focus);
}

.acg-swatch-color {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
    .acg-swatch-color {
        height: 88px;
        font-size: 0.8125rem;
    }
}

.acg-swatch-info {
    padding: 0.6rem 0.75rem;
    background: var(--acg-surface);
    font-size: 0.75rem;
    color: var(--acg-muted);
    border-top: 1px solid var(--acg-border);
}

.acg-swatch-info strong {
    color: var(--acg-text);
    font-weight: 500;
}

/* Color wheel */
.acg-wheel-wrap {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.acg-wheel {
    width: min(280px, 100%);
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    background: conic-gradient(
        #ff0000, #ff4000, #ff8000, #ffbf00, #ffff00, #bfff00, #80ff00, #40ff00,
        #00ff00, #00ff40, #00ff80, #00ffbf, #00ffff, #00bfff, #0080ff, #0040ff,
        #0000ff, #4000ff, #8000ff, #bf00ff, #ff00ff, #ff00bf, #ff0080, #ff0040, #ff0000
    );
    border: 3px solid var(--acg-border);
    box-shadow: inset 0 0 0 2px var(--acg-surface), 0 4px 16px rgba(0, 0, 0, 0.08);
}

.acg-pointer {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    border: 3px solid #ffffff;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.acg-pointer-base {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

/* Variations */
.acg-variations {
    margin-bottom: 1.5rem;
}

.acg-variation-group {
    margin-bottom: 1rem;
}

.acg-variation-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--acg-muted);
    margin: 0 0 0.5rem 0;
}

.acg-variation-strip {
    display: flex;
    border-radius: var(--acg-radius-sm);
    overflow: hidden;
    border: 1px solid var(--acg-border);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-height: 48px;
}

.acg-variation-strip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.acg-variation-color {
    flex: 1;
    min-width: 0;
}

/* Design examples */
.acg-examples {
    margin-bottom: 1.5rem;
}

.acg-example {
    margin-bottom: 0.75rem;
}

.acg-example:last-child {
    margin-bottom: 0;
}

.acg-example-label {
    display: block;
    font-size: 0.75rem;
    color: var(--acg-muted);
    margin-bottom: 0.35rem;
}

.acg-example-bar {
    height: 44px;
    border-radius: var(--acg-radius-sm);
    border: 1px solid var(--acg-border);
}

/* Actions */
.acg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.acg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--acg-radius-sm);
    border: 1px solid var(--acg-border);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    background: var(--acg-surface);
    color: var(--acg-text);
}

.acg-btn:hover {
    background: var(--acg-border);
    border-color: var(--acg-muted);
}

.acg-btn:focus-visible {
    outline: none;
    border-color: var(--acg-accent);
    box-shadow: var(--acg-focus);
}

.acg-btn-primary {
    background: var(--acg-accent);
    border-color: var(--acg-accent);
    color: var(--acg-accent-on);
}

.acg-btn-primary:hover {
    background: var(--acg-accent-hover);
    border-color: var(--acg-accent-hover);
    color: var(--acg-accent-on);
}

.acg-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

/* About */
.acg-about {
    padding-top: 1.25rem;
    border-top: 1px solid var(--acg-border);
}

.acg-about-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--acg-text);
    margin: 0 0 0.5rem 0;
}

.acg-about-p {
    font-size: 0.875rem;
    color: var(--acg-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.acg-about-list {
    font-size: 0.875rem;
    color: var(--acg-muted);
    line-height: 1.6;
    margin: 0;
    padding-left: 1.25rem;
}

.acg-about-list li {
    margin-bottom: 0.25rem;
}

.acg-about-list li:last-child {
    margin-bottom: 0;
}
