:root {
    --bg:#fff;
    --fg:#0a0a0a;
    --text:#171717;
    --muted:#525252;
    --faint:#a3a3a3;
    --line:#ebebeb;
    --hover:#f5f5f5;
    --accent:#f76b15;
    --accent-hover:#e05a0a;
    --top-h:60px;
    --display:"Manrope";
    --body:"Inter";
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background:var(--bg);
    color:var(--text);
    font-family:var(--body);
    -webkit-font-smoothing:antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:linear-gradient(to bottom,rgba(247,107,21,0.16),rgba(253,186,116,0.08) 280px,rgba(255,255,255,0) 560px) no-repeat, var(--bg);
}

.doodles {
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
}

.doodles span {
    position:absolute;
    left:var(--x);
    top:var(--y);
    width:var(--s);
    height:var(--s);
    color:rgba(247,101,27,0.2);
    transform:translate(-50%,-50%) rotate(var(--r));
}

.doodles svg {
    display:block;
    width:100%;
    height:100%;
}

a {
    color:inherit;
    text-decoration:none;
}

button {
    font:inherit;
    color:inherit;
}

.topbar {
    position:sticky;
    top:0;
    z-index:30;
    height:var(--top-h);
    display:flex;
    align-items:center;
    gap:32px;
    padding:0 24px;;
    background:var(--bg);
    border-bottom:2px solid var(--line);
}

.logo {
    font-family:var(--display);
    font-size:21px;
    font-weight:700;
    letter-spacing:-0.035em;
    line-height:1;
    color:var(--fg);
}

.nav {
    display:flex;
    gap:4px;
    list-style:none;
}

.tbtn {
    display:flex;
    align-items:center;
    gap:6px;
    height:34px;
    padding:0 12px;
    border:none;
    border-radius:10px;
    background:none;
    color:var(--muted);
    font-size:14px;
    font-weight:500;
    white-space:nowrap;
    cursor:pointer;
    transition:background 0.15s,color 0.15s;
}

.tbtn:hover,
.btn[aria-expanded="true"] {
    background:var(--hover);
    color:var(--fg);
} 

.tbtn svg {
    width:15px;
    height:15px;
    color:var(--faint);
}

.tbtn--strong {
    color:var(--fg);
}

.tbtn--solid {
    margin-left:4px;
    background:var(--accent);
    color:#fff;
}

.tbtn--solid:hover {
    background:var(--accent-hover);
    color:#fff;
}

.actions {
    display:flex;
    align-items:center;
    gap:4px;
    margin-left:auto;
}

.demo {
    padding:22px 22px 18px;
    background:var(--bg);
    border:2px solid var(--line);
    border-radius:18px;
    -webkit-user-select:none;
    user-select:none;
    cursor:default;
}

.demo__top {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:14px;
}

.demo__heading {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}

.demo__grade {
    flex-shrink:0;
    padding:3px 8px;
    border-radius:7px;
    background:rgba(247,107,21,0.1);
    color:#c2410c;
    font-size:12px;
    font-weight:600;
}

.demo__topic {
    overflow:hidden;
    color:var(--faint);
    font-size:13px;
    font-weight:500;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.demo__title {
    flex-shrink:0;
    color:var(--fg);
    font-family:var(--display);
    font-size:18px;
    font-weight:700;
    letter-spacing:-0.02em;
}

.calc {
    position:relative;
    display:grid;
    place-items:center;
    width:30px;
    height:30px;
    color:var(--muted);
}

.calc > svg {
    width:22px;
    height:22px;
}

.calc__badge {
    position:absolute;
    right:-2px;
    bottom:0;
    display:none;
    place-items:center;
    width:15px;
    height:15px;
    border:2px solid var(--bg);
    border-radius:50%;
    color:#fff;
}

.calc__badge--yes {
    background:#22c55e;
}

.calc__badge--no {
    display:grid;
    background:#ef4444;
}

.calc__badge svg {
    width:9px;
    height:9px;
    stroke-width:3.5;
}

.calc.is-allowed .calc__badge--yes {
    display:grid;
}

.calc.is-allowed .calc__badge--no {
    display:none;
}

.demo__text {
    color:var(--fg);
    font-size:16px;
    line-height:1.6;
}

.demo .katex {
    font-size:1.15em;
}

.demo__answer {
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:18px;
}

.demo__box {
    display:flex;
    align-items:center;
    height:44px;
    padding:0 14px;
    border:2px solid var(--line);
    border-radius:10px;
    color:var(--fg);
    font-size:16px;
    transition:border-color 0.2s, background 0.2s;
}

.demo__box::after {
    content:"";
    width:1.5px;
    height:20px;
    margin-left:2px;
    background:var(--fg);
    animation:blink 1s steps(1) infinite;
}

.demo.is-marked .demo__box {
    border-color:#22c55e;
    background:#f0fdf4;
}

.demo.is-marked .demo__box::after {
    display:none;
}

@keyframes blink {
    50% {
        opacity:0;
    }
}

.demo__check {
    height:44px;
    padding:0 16px;
    border:none;
    border-radius:10px;
    background:var(--accent);
    color:#fff;
    font-size:14px;
    font-weight:500;
    transition:transform 0.1s,background 0.15s;
}

.demo__check.is-pressed {
    transform:scale(0.95);
    background:var(--accent-hover);
}

.demo__foot {
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:28px;
    margin-top:14px;
}

.demo__mark {
    display:flex;
    align-items:center;
    gap:6px;
    color:#16a34a;
    font-size:14px;
    font-weight:500;
    opacity:0;
    transform:translateY(4px);
    transition:opacity 0.25s,transform 0.25s;
}

.demo__mark svg {
    width:16px;
    height:16px;
}

.demo.is-marked .demo__mark {
    opacity:1;
    transform:none;
}

.demo__marks {
    color:var(--faint);
    font-size:13px;
}

.demo__body {
    transition:opacity 0.3s;
}

.demo__body.is-hidden {
    opacity:0;
}

#question_card_demo {
    max-width: 400px;
}

.chat {
    padding: 22px;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: 18px;
    user-select: none;
}

.chat__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    color: var(--fg);
}

.chat__head svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.chat__log {
    height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#aitutor_card_demo {
    max-width: 400px;
}

.bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
    animation: pop 0.2s ease;
}

.bubble--student {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bubble--tutor {
    align-self: flex-start;
    background: var(--hover);
    color: var(--fg);
    border-bottom-left-radius: 4px;
}

.bubble .katex {
    font-size: 1.1em;
}

.bubble--typing {
    display: flex;
    gap: 4px;
    padding: 14px;
}

.bubble--typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--faint);
    animation: bounce 1s infinite;
}

.bubble--typing span:nth-child(2) {
    animation-delay: 0.15s;
}
.bubble--typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes pop {
    from {
        opacity: 0; transform: translateY(6px);
    }
}
@keyframes bounce {
    50% {
        transform: translateY(-4px);
    }
}

.hero {
    position:relative;
    z-index:0;
    max-width:1080px;
    margin:0 auto;
    flex:1;
    width:100%;
    padding:clamp(40px,11vh,112px) 40px clamp(32px,7vh,72px);
    display:grid;
    grid-template-columns:minmax(0,520px) minmax(0,400px);
    justify-content:space-between;
    align-items:center;
    column-gap:64px;
}

.hero__title {
    color:var(--fg);
    font-family:var(--display);
    font-size:clamp(24px,3.1vw,36px);
    font-weight:700;
    letter-spacing:-0.045em;
    line-height:1.05;
}

.hero__title span {
    font-weight:800;
}

.hero__sub {
    max-width:420px;
    margin-top:20px;
    color:var(--muted);
    font-size:17px;
    line-height:1.55;
    letter-spacing:-0.01em;
}

.hero__cta {
    margin-top:32px;
}

.features__head {
    text-align:center;
    max-width:880px;
    margin:0 auto;
    padding:88px 24px 0;
}

.features__title {
    color:var(--fg);
    font-family:var(--display);
    font-size:clamp(32px,4.4vw,46px);
    font-weight:700;
    letter-spacing:-0.04em;
    line-height:1.08;
}

.features__sub {
    max-width:500px;
    margin:16px auto 0;
    color:var(--muted);
    font-size:17px;
    line-height:1.55;
}