.terms-page { background:#fff; color:#172d43; }
.terms-page .site-header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.terms-back, .terms-page-footer a { color:#0871b6; font-weight:650; text-decoration:underline; text-underline-offset:3px; }
.terms-main { max-width:850px; margin:40px auto 64px; padding:0 24px; }
.terms-document { color:#172d43; font-family:Arial,Helvetica,sans-serif; font-size:15px; font-weight:400; line-height:1.7; text-align:left; text-transform:none; letter-spacing:normal; overflow-wrap:anywhere; }
.terms-document h1 { color:#17334d; font-size:clamp(28px,5vw,40px); font-weight:700; line-height:1.2; text-align:left; text-transform:none; letter-spacing:-.02em; margin:0 0 12px; }
.terms-document h2 { color:#17334d; font-size:19px; font-weight:700; line-height:1.4; text-align:left; text-transform:none; letter-spacing:normal; margin:30px 0 10px; }
.terms-document p { margin:0 0 15px; }
.terms-document a { color:#0871b6; text-decoration:underline; text-underline-offset:3px; }
.terms-document .terms-date { color:#596a7a; font-size:13px; margin-bottom:24px; }
.terms-summary { background:#eff8fe; border-left:4px solid #2da2eb; border-radius:0 10px 10px 0; padding:18px 20px; margin:24px 0; }
.terms-end { border-top:1px solid #d5e6f1; padding-top:22px; margin-top:28px!important; }
.terms-page-footer { max-width:850px; margin:0 auto 36px; padding:0 24px; display:flex; flex-wrap:wrap; gap:12px 24px; font-size:13px; color:#596a7a; }
.signup-terms[hidden] { display:none!important; }
.signup-terms { padding:14px; border:1px solid #cee4f2; border-radius:10px; background:#f5faff; color:#17334d; font:14px/1.5 Arial,Helvetica,sans-serif; text-align:left; text-transform:none; }
.signup-terms-row { display:flex; align-items:flex-start; gap:10px; }
.auth-card .signup-terms input[type="checkbox"] { flex:0 0 18px; width:18px; height:18px; margin:2px 0 0; padding:0; accent-color:#0871b6; opacity:1; cursor:pointer; }
.signup-terms fieldset { border:0; padding:0; margin:0 0 18px; min-width:0; }
.signup-terms legend { font-weight:700; margin-bottom:12px; }
.signup-terms fieldset label { display:flex; flex-direction:column; gap:5px; margin-bottom:12px; }
.signup-terms fieldset input, .signup-terms fieldset select { width:100%; box-sizing:border-box; min-width:0; font:14px/1.4 Arial,sans-serif; padding:10px; border:1px solid #a7c3d6; border-radius:6px; color:#17334d; background:#fff; }
.signup-terms a { color:#0871b6; font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.signup-terms small { display:block; color:#526779; font-size:12px; margin:8px 0 0 28px; line-height:1.5; }
.terms-dialog { box-sizing:border-box; width:min(780px,calc(100% - 24px)); max-width:780px; height:min(820px,calc(100dvh - 32px)); max-height:calc(100dvh - 32px); border:1px solid #cfe1ee; border-radius:18px; padding:0; background:#fff; color:#172d43; box-shadow:0 18px 70px #17334d30; overflow:hidden; }
.terms-dialog[open] { display:flex; flex-direction:column; }
.terms-dialog::backdrop { background:#152f4b88; backdrop-filter:blur(3px); }
html:has(.terms-dialog[open]) { overflow:hidden; }
.terms-dialog-header { flex:none; display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:20px 24px 16px; border-bottom:1px solid #d5e6f1; }
.terms-dialog-header h2 { font:700 20px/1.3 Arial,Helvetica,sans-serif; color:#17334d; margin:0 0 7px; letter-spacing:normal; text-transform:none; }
.terms-dialog-header p { font:14px/1.5 Arial,Helvetica,sans-serif; color:#526779; margin:0; }
.terms-dialog-close { flex:none; background:#eef7fd; color:#17334d; border:1px solid #d5e6f1; border-radius:8px; font:600 14px/1 Arial,Helvetica,sans-serif; padding:11px 12px; cursor:pointer; }
.terms-scroll { flex:1; min-height:0; padding:24px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; scrollbar-gutter:stable; }
.terms-scroll:focus-visible { outline:3px solid #2da2eb; outline-offset:-3px; }
.terms-dialog-footer { display:block; box-sizing:border-box; flex:none; width:100%; max-width:none; margin:0; padding:16px 24px 20px; border-top:1px solid #d5e6f1; background:#f5faff; }
.terms-dialog-footer p { font:13px/1.5 Arial,Helvetica,sans-serif; color:#526779; margin:0 0 12px; }
.terms-dialog-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.terms-dialog-actions a { font:14px/1.5 Arial,Helvetica,sans-serif; color:#0871b6; text-decoration:underline; text-underline-offset:3px; }
.terms-dialog-actions button { font:650 14px/1.5 Arial,Helvetica,sans-serif; border:0; border-radius:8px; padding:12px 16px; background:#087dc7; color:#fff; cursor:pointer; }
.terms-dialog-actions button:disabled { background:#dbe8f0; color:#526779; cursor:not-allowed; opacity:1; }
@media(max-width:520px) {
  .terms-main { margin-top:28px; padding:0 18px; }
  .terms-dialog { width:calc(100% - 16px); height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); border-radius:12px; }
  .terms-dialog-header { padding:16px; gap:10px; }
  .terms-dialog-header h2 { font-size:18px; }
  .terms-scroll { padding:20px 16px; }
  .terms-dialog-footer { padding:14px 16px 16px; }
  .terms-dialog-actions { flex-direction:column-reverse; align-items:stretch; text-align:center; }
  .terms-dialog-actions button { width:100%; }
}
@media print {
  .terms-page .site-header, .terms-page-footer { display:none; }
  .terms-main { max-width:none; margin:0; padding:0; }
  .terms-document { color:#000; font-size:11pt; }
  .terms-document h2 { break-after:avoid; }
  .terms-summary { border:1px solid #aaa; background:none; }
}
