.aips {
	--aips-ink: #142033;
	--aips-muted: #5a6577;
	--aips-line: #dfe3ea;
	--aips-bg: #ffffff;
	--aips-soft: #f5f6f9;
	--aips-navy: #0f1f3d;
	--aips-gold: #c9a227;
	--aips-accent: #c86b4a;
	max-width: 880px;
	margin: 0 auto;
	color: var(--aips-ink);
	font-family: inherit;
	line-height: 1.55;
}
.aips[data-target="chatgpt"] { --aips-accent: #0e8f6f; }
.aips[data-target="gemini"] { --aips-accent: #3b6fd8; }
.aips *, .aips *::before, .aips *::after { box-sizing: border-box; }

.aips-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.aips-tab {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 10px; border: 1.5px solid var(--aips-line); border-radius: 12px;
	background: var(--aips-bg); color: var(--aips-ink); font: inherit; font-weight: 600; cursor: pointer;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.aips-tab:hover { border-color: #b9c0cc; }
.aips-tab[aria-selected="true"] { border-color: var(--aips-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--aips-accent) 18%, transparent); }
.aips-dot { width: 10px; height: 10px; border-radius: 50%; background: #bbb; }
.aips-tab--claude .aips-dot { background: #c86b4a; }
.aips-tab--chatgpt .aips-dot { background: #0e8f6f; }
.aips-tab--gemini .aips-dot { background: #3b6fd8; }

.aips-card {
	background: var(--aips-bg); border: 1px solid var(--aips-line); border-radius: 16px;
	padding: 22px; box-shadow: 0 6px 24px rgba(15, 31, 61, .06);
}
.aips-types { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.aips-types legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.aips-type input { position: absolute; opacity: 0; pointer-events: none; }
.aips-type span {
	display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--aips-line);
	background: var(--aips-soft); font-weight: 600; font-size: .95em; cursor: pointer;
}
.aips-type input:checked + span { background: var(--aips-accent); border-color: var(--aips-accent); color: #fff; }
.aips-type input:focus-visible + span { outline: 2px solid var(--aips-navy); outline-offset: 2px; }
.aips-type-hint { color: var(--aips-muted); font-size: .92em; margin: 4px 0 16px; min-height: 1.4em; }

.aips-label { display: block; font-weight: 700; margin-bottom: 6px; }
.aips textarea, .aips select {
	width: 100%; font: inherit; color: var(--aips-ink); background: #fff;
	border: 1.5px solid var(--aips-line); border-radius: 10px; padding: 12px;
}
.aips textarea { resize: vertical; min-height: 110px; }
.aips textarea:focus, .aips select:focus { outline: none; border-color: var(--aips-accent); }
.aips-meta { text-align: right; font-size: .8em; color: var(--aips-muted); margin-top: 4px; }

.aips-examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.aips-chip {
	font: inherit; font-size: .82em; padding: 6px 10px; border-radius: 8px; border: 1px dashed #c4cad4;
	background: transparent; color: var(--aips-muted); cursor: pointer; text-align: left;
}
.aips-chip:hover { color: var(--aips-ink); border-color: var(--aips-accent); }

.aips-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.aips-field span { display: block; font-size: .85em; font-weight: 600; margin-bottom: 4px; color: var(--aips-muted); }

.aips-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.aips-go {
	width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
	padding: 15px 18px; border: 0; border-radius: 12px; background: var(--aips-navy); color: #fff;
	font: inherit; font-weight: 700; font-size: 1.05em; cursor: pointer; transition: transform .1s, background .15s;
}
.aips-go:hover { background: #1b335f; }
.aips-go:active { transform: translateY(1px); }
.aips-go:disabled { opacity: .75; cursor: progress; }
.aips-spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: aips-spin .8s linear infinite; }
.aips.is-loading .aips-spinner { display: inline-block; }
@keyframes aips-spin { to { transform: rotate(360deg); } }
.aips-quota { text-align: center; font-size: .88em; color: var(--aips-muted); margin: 10px 0 0; }
.aips-refill-link { font-weight: 700; color: var(--aips-accent); }

.aips-alert {
	margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: #fff6e8; border: 1px solid #f0d39a; color: #5c4210;
}
.aips-alert p { margin: 0 0 10px; }
.aips-alert p:last-child { margin-bottom: 0; }

.aips-output { margin-top: 20px; border: 1px solid var(--aips-line); border-radius: 16px; overflow: hidden; background: #fff; }
.aips-output-bar {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
	padding: 12px 16px; background: var(--aips-soft); border-bottom: 1px solid var(--aips-line);
}
.aips-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.aips-btn {
	display: inline-block; padding: 8px 14px; border-radius: 9px; border: 1.5px solid var(--aips-line);
	background: #fff; color: var(--aips-ink) !important; font: inherit; font-size: .9em; font-weight: 600; text-decoration: none !important; cursor: pointer;
}
.aips-btn--primary { background: var(--aips-accent); border-color: var(--aips-accent); color: #fff !important; }
.aips-btn.is-copied { border-color: #2e9d5b; }

.aips-result { padding: 18px 20px 22px; overflow-wrap: anywhere; }
.aips-result h2, .aips-result h3, .aips-result h4 { margin: 1.2em 0 .5em; line-height: 1.3; color: var(--aips-navy); }
.aips-result h2 { font-size: 1.25em; } .aips-result h3 { font-size: 1.12em; } .aips-result h4 { font-size: 1em; }
.aips-result > :first-child { margin-top: 0; }
.aips-result p, .aips-result ul, .aips-result ol { margin: 0 0 .9em; }
.aips-result :not(pre) > code { background: var(--aips-soft); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.aips-code { border: 1px solid #263248; border-radius: 10px; overflow: hidden; margin: 0 0 1em; }
.aips-code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #1b2638; color: #9fb0c8; font-size: .78em; text-transform: uppercase; letter-spacing: .04em; }
.aips-copy { font: inherit; text-transform: none; letter-spacing: 0; font-size: 1.1em; padding: 3px 10px; border-radius: 6px; border: 1px solid #3a4a64; background: #24324a; color: #e6edf7; cursor: pointer; }
.aips-copy.is-copied { background: #2e9d5b; border-color: #2e9d5b; }
.aips-code pre { margin: 0; padding: 14px; background: #0f1726; color: #e6edf7; overflow-x: auto; font-size: .86em; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.aips-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: none; padding: 0; }

.aips-disclaimer { font-size: .75em; color: var(--aips-muted); text-align: center; margin-top: 14px; }

@media (max-width: 600px) {
	.aips-card { padding: 16px; }
	.aips-row { grid-template-columns: 1fr; }
	.aips-chip:nth-child(n+4) { display: none; }
	.aips-tab { padding: 10px 6px; font-size: .92em; }
	.aips-output-bar { flex-direction: column; align-items: stretch; }
	.aips-actions .aips-btn { flex: 1; text-align: center; }
}

/* ---- Membership ---- */
.aips-account {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
	padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--aips-navy); color: #e8edf6; font-size: .92em;
}
.aips-account:empty { display: none; }
.aips-acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.aips-account .aips-btn { padding: 7px 12px; }
.aips-meters { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.aips-meter b { color: #fff; font-size: 1.1em; }
.aips-meter--muted { color: #9fb0c8; }

.aips-join {
	background: #fff; border: 2px solid var(--aips-gold); border-radius: 16px; padding: 22px; margin-bottom: 14px;
	box-shadow: 0 6px 24px rgba(15, 31, 61, .08);
}
.aips-join-title { margin: 0 0 10px; color: var(--aips-navy); font-size: 1.3em; }
.aips-perks { margin: 0 0 16px; padding-left: 1.2em; }
.aips-perks li { margin-bottom: 4px; }
.aips-join input[type=text], .aips-join input[type=email], .aips-join input[type=password] {
	width: 100%; font: inherit; border: 1.5px solid var(--aips-line); border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--aips-ink);
}
.aips-join input:focus { outline: none; border-color: var(--aips-gold); }
.aips-join .aips-field { display: block; margin-bottom: 12px; }
.aips-join .aips-row { margin-bottom: 0; }
.aips-go--join, .aips-start-sub { background: var(--aips-gold); color: var(--aips-navy); }
.aips-go--join:hover, .aips-start-sub:hover { background: #d8b342; }
.aips-signup.is-loading .aips-spinner, .aips-start-sub:disabled .aips-spinner { display: inline-block; border-color: rgba(15,31,61,.25); border-top-color: var(--aips-navy); }
.aips-fine { font-size: .82em; color: var(--aips-muted); text-align: center; margin: 10px 0 0; }
.aips-alert--ok { background: #ebf8f0; border-color: #a9dcbc; color: #17502d; }
.aips-alert .aips-btn { margin-top: 4px; }

/* ---- AI News ---- */
.aips-news { max-width: 1100px; margin: 0 auto; color: #142033; }
.aips-news-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.aips-news-head h2 { margin: 0; color: #0f1f3d; }
.aips-news-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.aips-nf { font: inherit; font-size: .9em; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1.5px solid #dfe3ea; background: #fff; color: #142033; cursor: pointer; }
.aips-nf[aria-selected="true"] { background: #0f1f3d; border-color: #0f1f3d; color: #fff; }
.aips-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.aips-news-card { background: #fff; border: 1px solid #dfe3ea; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, transform .15s; }
.aips-news-card:hover { box-shadow: 0 8px 24px rgba(15,31,61,.08); transform: translateY(-1px); }
.aips-news-card[hidden] { display: none; }
.aips-news-meta { display: flex; justify-content: space-between; font-size: .78em; color: #5a6577; text-transform: uppercase; letter-spacing: .03em; }
.aips-news-src { font-weight: 700; color: #c9a227; }
.aips-news-card h3 { font-size: 1.02em; line-height: 1.35; margin: 2px 0; }
.aips-news-card h3 a { color: #0f1f3d; text-decoration: none; }
.aips-news-card h3 a:hover { text-decoration: underline; }
.aips-news-card p { font-size: .9em; color: #5a6577; margin: 0; line-height: 1.5; }
.aips-news-tag { align-self: flex-start; font-size: .72em; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-top: auto; background: #f5f6f9; }
.aips-news-tag--claude { color: #a4502f; background: #fbeee8; }
.aips-news-tag--chatgpt { color: #0b6f56; background: #e6f6f1; }
.aips-news-tag--gemini { color: #2a56b3; background: #e9f0fd; }
.aips-news-more-wrap { text-align: center; margin-top: 16px; }
.aips-news-credit, .aips-news-empty, .aips-news-none { text-align: center; font-size: .82em; color: #5a6577; margin-top: 10px; }
