* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: #f6f7fb; color: #1c2333; line-height: 1.55; }
header { background: #fff; border-bottom: 1px solid #e3e6ef; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.logo { font-weight: 800; font-size: 21px; color: #6a3df0; text-decoration: none; }
.logo span { color: #1c2333; }
nav a { color: #39415a; text-decoration: none; font-size: 14.5px; font-weight: 600; margin-left: 16px; }
nav a:hover { color: #6a3df0; }
.badge { font-size: 12px; background: #eafbf1; color: #137a3f; border: 1px solid #bde8cd; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 16px 48px; }
h1 { font-size: 30px; line-height: 1.25; margin-bottom: 8px; }
.sub { color: #55607a; margin-bottom: 22px; max-width: 740px; }
.tool { background: #fff; border: 1px solid #e3e6ef; border-radius: 14px; padding: 18px; box-shadow: 0 2px 10px rgba(20,30,80,.05); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } h1 { font-size: 24px; } nav a { margin-left: 10px; } }
label.boxlabel { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
textarea { width: 100%; min-height: 220px; resize: vertical; border: 1.5px solid #ccd3e4; border-radius: 10px; padding: 12px; font-family: Consolas, Menlo, monospace; font-size: 14px; line-height: 1.5; background: #fbfcff; color: #1c2333; }
textarea:focus { outline: none; border-color: #6a3df0; background: #fff; }
input[type="text"], input[type="number"], select { border: 1.5px solid #ccd3e4; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; background: #fbfcff; color: #1c2333; font-family: inherit; }
input[type="text"]:focus, input[type="number"]:focus, select:focus { outline: none; border-color: #6a3df0; background: #fff; }
input[type="text"].wide { width: 100%; }
.fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 720px) { .fieldrow { grid-template-columns: 1fr; } }
.fieldrow label.boxlabel { margin-bottom: 6px; }
.options { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 16px 0; }
.options label { font-size: 14px; display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.options input { width: 17px; height: 17px; accent-color: #6a3df0; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 16px; }
.stat { background: #f3efff; border: 1px solid #ddd2ff; border-radius: 10px; padding: 8px 16px; font-size: 14px; min-width: 104px; }
.stat b { font-size: 19px; color: #6a3df0; display: block; line-height: 1.2; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
button { border: none; border-radius: 10px; padding: 11px 18px; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.primary { background: #6a3df0; color: #fff; }
.primary:active { background: #532bc4; }
.light { background: #eef1f8; color: #1c2333; border: 1px solid #d5dbea; }
button:disabled { opacity: .45; cursor: not-allowed; }
.msg { font-size: 14px; color: #137a3f; font-weight: 600; min-height: 20px; margin-top: 10px; }
section.content { background: #fff; border: 1px solid #e3e6ef; border-radius: 14px; padding: 22px; margin-top: 22px; }
section.content h2 { font-size: 21px; margin-bottom: 10px; }
section.content h3 { font-size: 17px; margin: 16px 0 6px; }
section.content p, section.content li { color: #39415a; font-size: 15.5px; }
section.content ol, section.content ul { padding-left: 22px; }
section.content li { margin-bottom: 5px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: #fff; border: 1px solid #e3e6ef; border-radius: 14px; padding: 18px; text-decoration: none; color: #1c2333; display: block; }
.card:hover { border-color: #6a3df0; box-shadow: 0 4px 14px rgba(90,50,220,.10); }
.card h3 { font-size: 17px; margin-bottom: 6px; color: #6a3df0; }
.card p { font-size: 14px; color: #55607a; }
.casegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 720px) { .casegrid { grid-template-columns: 1fr; } }
.casebox { border: 1px solid #e3e6ef; border-radius: 10px; padding: 12px; background: #fbfcff; }
.casebox h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: #55607a; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.casebox pre { white-space: pre-wrap; word-break: break-word; font-family: Consolas, Menlo, monospace; font-size: 14px; min-height: 22px; }
.casebox button { padding: 5px 12px; font-size: 12.5px; }
.freq { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 8px; }
.freq th, .freq td { border-bottom: 1px solid #e3e6ef; padding: 7px 8px; text-align: left; }
.freq th { color: #55607a; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.freq .barcell { width: 34%; }
.diffbox { font-family: Consolas, Menlo, monospace; font-size: 13.5px; border: 1px solid #e3e6ef; border-radius: 10px; overflow: hidden; }
.diffbox div { padding: 6px 12px; white-space: pre-wrap; word-break: break-word; border-bottom: 1px solid #f0f2f8; }
.d-same { color: #55607a; background: #fff; }
.d-del { background: #fdeceb; color: #8a1f16; }
.d-add { background: #eafbf1; color: #14532d; }
.limitrow { margin: 10px 0; }
.limitrow .lr-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.bar { height: 9px; background: #eceef5; border-radius: 99px; overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; background: #6a3df0; width: 0%; transition: width .15s; }
.bar i.over { background: #d92d20; }
.over-text { color: #d92d20; }
footer { border-top: 1px solid #e3e6ef; background: #fff; padding: 26px 16px 34px; }
.footwrap { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 26px; }
.footcol { min-width: 170px; }
.footcol h4 { font-size: 14px; margin-bottom: 8px; }
.footcol a { display: block; color: #55607a; text-decoration: none; font-size: 14px; margin-bottom: 5px; }
.footcol a:hover { color: #6a3df0; }
.copyright { max-width: 1080px; margin: 18px auto 0; color: #7a849e; font-size: 13px; }
.hero { text-align: center; padding: 30px 0 6px; }
.hero h1 { font-size: 36px; }
@media (max-width: 720px) { .hero h1 { font-size: 27px; } }
.hero .sub { margin: 0 auto 8px; }
