/**
 * Seylan Gem Guides
 * Matches sg-lookfeel / sg-appraisal green palette (EB Garamond / Source Sans 3).
 */
.sg-guides {
    --sg-g-ink: #1a1a1a;
    --sg-g-muted: #6b6b6b;
    --sg-g-line: rgba(26, 26, 26, 0.1);
    --sg-g-green: #0a5c38;
    --sg-g-green-deep: #063d26;
    --sg-g-cream: #f7f6f3;
    --sg-g-forest: #0c1f17;
    --sg-g-display: "EB Garamond", "Times New Roman", serif;
    --sg-g-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
    --sg-g-radius: 2px;
}

.sg-guides__hero {
    position: relative;
    padding: 72px 0 64px;
    background:
        radial-gradient(ellipse 80% 60% at 90% 10%, rgba(10, 92, 56, 0.18), transparent 55%),
        linear-gradient(165deg, #0c1f17 0%, #12241c 45%, #0a5c38 100%);
    color: #fff;
    overflow: hidden;
}

.sg-guides__hero--compact {
    padding: 56px 0 48px;
}

.sg-guides__hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    opacity: 0.45;
}

.sg-guides__hero .container {
    position: relative;
    z-index: 1;
}

.sg-guides__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-family: var(--sg-g-sans);
    font-size: 0.78rem;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.65);
}

.sg-guides__crumbs a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.sg-guides__crumbs a:hover {
    color: #fff;
    text-decoration: underline;
}

.sg-guides__brand {
    font-family: var(--sg-g-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 16px;
}

.sg-guides__hero h1 {
    font-family: var(--sg-g-display) !important;
    font-weight: 500 !important;
    font-size: clamp(2.1rem, 4.2vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #fff !important;
    max-width: 20ch;
    margin: 0 0 14px;
}

.sg-guides__lede {
    font-family: var(--sg-g-sans);
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    max-width: 38rem;
    margin: 0 0 28px;
}

.sg-guides__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sg-guides__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: var(--sg-g-radius);
    font-family: var(--sg-g-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sg-guides__btn--primary {
    background: #fff;
    color: var(--sg-g-ink);
    border: 1px solid #fff;
}

.sg-guides__btn--primary:hover {
    background: var(--sg-g-cream);
    color: var(--sg-g-ink);
}

.sg-guides__btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.sg-guides__btn--ghost:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sg-guides__btn--green {
    background: var(--sg-g-green);
    color: #fff;
    border: 1px solid var(--sg-g-green);
}

.sg-guides__btn--green:hover {
    background: var(--sg-g-green-deep);
    border-color: var(--sg-g-green-deep);
    color: #fff;
}

.sg-guides__section {
    padding: 64px 0;
}

.sg-guides__section--cream {
    background: var(--sg-g-cream);
}

.sg-guides__eyebrow {
    font-family: var(--sg-g-sans);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sg-g-green);
    margin: 0 0 10px;
}

.sg-guides__section h2,
.sg-guides__block h2 {
    font-family: var(--sg-g-display) !important;
    font-weight: 500 !important;
    font-size: clamp(1.65rem, 2.6vw, 2.2rem);
    color: var(--sg-g-ink) !important;
    margin: 0 0 10px;
}

.sg-guides__sub {
    font-family: var(--sg-g-sans);
    font-size: 0.98rem;
    color: var(--sg-g-muted);
    max-width: 40rem;
    margin: 0 0 28px;
    line-height: 1.55;
}

.sg-guides__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.sg-guides__card {
    border: 1px solid var(--sg-g-line);
    border-radius: var(--sg-g-radius);
    padding: 28px 24px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sg-guides__card:hover {
    border-color: rgba(10, 92, 56, 0.35);
    box-shadow: 0 8px 28px rgba(12, 31, 23, 0.06);
}

.sg-guides__card-eyebrow {
    font-family: var(--sg-g-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sg-g-green);
    margin: 0;
}

.sg-guides__card h3 {
    font-family: var(--sg-g-display) !important;
    font-weight: 500 !important;
    font-size: 1.75rem;
    margin: 0;
    color: var(--sg-g-ink) !important;
}

.sg-guides__card h3 a {
    color: inherit;
    text-decoration: none;
}

.sg-guides__card h3 a:hover {
    color: var(--sg-g-green);
}

.sg-guides__card > p {
    font-family: var(--sg-g-sans);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--sg-g-muted);
    margin: 0;
    flex: 1;
}

.sg-guides__card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.sg-guides__text-link {
    font-family: var(--sg-g-sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sg-g-green);
    text-decoration: none;
}

.sg-guides__text-link:hover {
    color: var(--sg-g-green-deep);
    text-decoration: underline;
}

.sg-guides__notice {
    font-family: var(--sg-g-sans);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--sg-g-muted);
    border-left: 3px solid var(--sg-g-green);
    padding: 14px 18px;
    background: rgba(10, 92, 56, 0.04);
    margin-top: 8px;
}

.sg-guides__notice strong {
    color: var(--sg-g-ink);
}

.sg-guides__teasers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.sg-guides__teaser {
    padding: 8px 0;
}

.sg-guides__teaser h3 {
    font-family: var(--sg-g-display) !important;
    font-weight: 500 !important;
    font-size: 1.35rem;
    color: var(--sg-g-ink) !important;
    margin: 0 0 8px;
}

.sg-guides__teaser p {
    font-family: var(--sg-g-sans);
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--sg-g-muted);
    margin: 0 0 12px;
}

.sg-guides__teaser a {
    font-family: var(--sg-g-sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sg-g-green);
    text-decoration: none;
}

.sg-guides__teaser a:hover {
    color: var(--sg-g-green-deep);
    text-decoration: underline;
}

.sg-guides__layout {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 40px;
    align-items: start;
}

.sg-guides__table-wrap {
    overflow-x: auto;
    margin: 0 0 36px;
    border: 1px solid var(--sg-g-line);
    border-radius: var(--sg-g-radius);
}

.sg-guides__table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--sg-g-sans);
    font-size: 0.94rem;
    margin: 0;
}

.sg-guides__table th,
.sg-guides__table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--sg-g-line);
    vertical-align: top;
}

.sg-guides__table tr:last-child th,
.sg-guides__table tr:last-child td {
    border-bottom: none;
}

.sg-guides__table th {
    width: 34%;
    font-weight: 600;
    color: var(--sg-g-ink);
    background: rgba(10, 92, 56, 0.04);
}

.sg-guides__table td {
    color: var(--sg-g-muted);
}

.sg-guides__block {
    margin-bottom: 28px;
}

.sg-guides__block p {
    font-family: var(--sg-g-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--sg-g-muted);
    margin: 0;
    max-width: 42rem;
}

.sg-guides__aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 88px;
}

.sg-guides__aside-panel {
    border: 1px solid var(--sg-g-line);
    border-radius: var(--sg-g-radius);
    padding: 22px 20px;
    background: #fff;
}

.sg-guides__aside-title {
    font-family: var(--sg-g-display) !important;
    font-weight: 500 !important;
    font-size: 1.45rem !important;
    color: var(--sg-g-ink) !important;
    margin: 0 0 14px !important;
}

.sg-guides__aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sg-guides__aside-list li {
    border-top: 1px solid var(--sg-g-line);
}

.sg-guides__aside-list li:first-child {
    border-top: none;
}

.sg-guides__aside-list a {
    display: block;
    padding: 10px 0;
    font-family: var(--sg-g-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sg-g-green);
    text-decoration: none;
}

.sg-guides__aside-list a:hover {
    color: var(--sg-g-green-deep);
    text-decoration: underline;
}

.sg-guides__formal {
    padding: 64px 0;
    background:
        linear-gradient(165deg, #0c1f17 0%, #12241c 50%, #0a5c38 100%);
    color: #fff;
}

.sg-guides__formal h2 {
    font-family: var(--sg-g-display) !important;
    font-weight: 500 !important;
    font-size: clamp(1.65rem, 2.6vw, 2.2rem);
    color: #fff !important;
    margin: 0 0 12px;
}

.sg-guides__formal p {
    font-family: var(--sg-g-sans);
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    max-width: 36rem;
    margin: 0 0 24px;
}

.sg-guides .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 991px) {
    .sg-guides__grid,
    .sg-guides__teasers,
    .sg-guides__layout {
        grid-template-columns: 1fr;
    }

    .sg-guides__aside {
        position: static;
    }

    .sg-guides__hero {
        padding: 52px 0 44px;
    }
}

@media (max-width: 575px) {
    .sg-guides__card-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .sg-guides__table th {
        width: 40%;
    }
}
